From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [char-misc:char-misc-testing 29/36] drivers/nvmem/lan9662-otpc.c:43 lan9662_otp_wait_flag_clear() warn: signedness bug returning '(-110)'
Date: Tue, 27 Sep 2022 11:05:29 +0300 [thread overview]
Message-ID: <202209261902.qJDWZGUZ-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-testing
head: 0f65caa911019561d71ceb70f0d1c7a965b3045f
commit: 9e8f208ad5229ddda97cd4a83ecf89c735d99592 [29/36] nvmem: lan9662-otp: add support
config: openrisc-randconfig-m041-20220926
compiler: or1k-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/nvmem/lan9662-otpc.c:43 lan9662_otp_wait_flag_clear() warn: signedness bug returning '(-110)'
vim +43 drivers/nvmem/lan9662-otpc.c
9e8f208ad5229d Horatiu Vultur 2022-09-16 39 static bool lan9662_otp_wait_flag_clear(void __iomem *reg, u32 flag)
9e8f208ad5229d Horatiu Vultur 2022-09-16 40 {
9e8f208ad5229d Horatiu Vultur 2022-09-16 41 u32 val;
9e8f208ad5229d Horatiu Vultur 2022-09-16 42
9e8f208ad5229d Horatiu Vultur 2022-09-16 @43 return readl_poll_timeout(reg, val, !(val & flag),
9e8f208ad5229d Horatiu Vultur 2022-09-16 44 OTP_SLEEP_US, OTP_TIMEOUT_US);
readl_poll_timeout() returns zero on success or a negative error code.
Better to make lan9662_otp_wait_flag_clear() return ints. Returning
false/true (as opposed to true/false or zero/negative) for
success/failure is pants.
9e8f208ad5229d Horatiu Vultur 2022-09-16 45 }
reply other threads:[~2022-09-27 8:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202209261902.qJDWZGUZ-lkp@intel.com \
--to=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=horatiu.vultur@microchip.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=srinivas.kandagatla@linaro.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®