From: Markus Elfring <Markus.Elfring@web.de>
To: Ma Ke <make24@iscas.ac.cn>,
linux-phy@lists.infradead.org, kernel-janitors@vger.kernel.org,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh@kernel.org>, Roger Quadros <rogerq@kernel.org>,
Sergio Paracuellos <sergio.paracuellos@gmail.com>,
Swapnil Jakhade <sjakhade@cadence.com>,
Vinod Koul <vkoul@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] phy: cadence-torrent: Check return value on register read
Date: Tue, 2 Jul 2024 09:43:17 +0200 [thread overview]
Message-ID: <def496b0-ea98-467c-be47-77d965bb3a88@web.de> (raw)
In-Reply-To: <20240702032042.3993031-1-make24@iscas.ac.cn>
> cdns_torrent_dp_set_power_state() does not consider that ret might be
> overwritten. Add return value check of regmap_read_poll_timeout() after
> register read in cdns_torrent_dp_set_power_state().
I suggest to improve such a change description another bit.
1. A return value is stored in the mentioned local variable.
2. Unfortunately, it was not immediately checked.
* https://cwe.mitre.org/data/definitions/252.html
* https://wiki.sei.cmu.edu/confluence/display/c/EXP12-C.+Do+not+ignore+values+returned+by+functions
3. How do you think about to avoid a repeated reference to a function name?
…
> Signed-off-by: Ma Ke <make24@iscas.ac.cn>
* Why was the personal name “Haoxiang Li” not specified here?
* Under which circumstances will applications of the Developer's Certificate of Origin
be clarified better?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc6#n398
How do you think about to use a summary phrase like “Complete error handling
in cdns_torrent_dp_set_power_state()”?
Regards,
Markus
next prev parent reply other threads:[~2024-07-02 7:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 3:20 Ma Ke
2024-07-02 7:43 ` Markus Elfring [this message]
2024-07-02 13:12 ` Vinod Koul
2024-07-02 11:54 ` Roger Quadros
2024-07-02 13:35 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=def496b0-ea98-467c-be47-77d965bb3a88@web.de \
--to=markus.elfring@web.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=kishon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=make24@iscas.ac.cn \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--cc=sergio.paracuellos@gmail.com \
--cc=sjakhade@cadence.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®