* [PATCH] nvmem: lan9662-otp: Change return type of lan9662_otp_wait_flag_clear()
@ 2022-09-27 20:59 Horatiu Vultur
2022-11-11 17:47 ` Srinivas Kandagatla
0 siblings, 1 reply; 2+ messages in thread
From: Horatiu Vultur @ 2022-09-27 20:59 UTC (permalink / raw)
To: linux-kernel
Cc: srinivas.kandagatla, gregkh, Horatiu Vultur, kernel test robot,
Dan Carpenter
The blamed commit introduced the following smatch warning in the
function lan9662_otp_wait_flag_clear:
drivers/nvmem/lan9662-otpc.c:43 lan9662_otp_wait_flag_clear() warn: signedness bug returning '(-110)'
Fix this by changing the return type of the function
lan9662_otp_wait_flag_clear() to be int instead of bool.
Fixes: 9e8f208ad5229d ("nvmem: lan9662-otp: add support")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
drivers/nvmem/lan9662-otpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/lan9662-otpc.c b/drivers/nvmem/lan9662-otpc.c
index f6732fd216d80..f4348c97f6e59 100644
--- a/drivers/nvmem/lan9662-otpc.c
+++ b/drivers/nvmem/lan9662-otpc.c
@@ -36,7 +36,7 @@ struct lan9662_otp {
void __iomem *base;
};
-static bool lan9662_otp_wait_flag_clear(void __iomem *reg, u32 flag)
+static int lan9662_otp_wait_flag_clear(void __iomem *reg, u32 flag)
{
u32 val;
--
2.33.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] nvmem: lan9662-otp: Change return type of lan9662_otp_wait_flag_clear()
2022-09-27 20:59 [PATCH] nvmem: lan9662-otp: Change return type of lan9662_otp_wait_flag_clear() Horatiu Vultur
@ 2022-11-11 17:47 ` Srinivas Kandagatla
0 siblings, 0 replies; 2+ messages in thread
From: Srinivas Kandagatla @ 2022-11-11 17:47 UTC (permalink / raw)
To: Horatiu Vultur, linux-kernel; +Cc: gregkh, kernel test robot, Dan Carpenter
On 27/09/2022 21:59, Horatiu Vultur wrote:
> The blamed commit introduced the following smatch warning in the
> function lan9662_otp_wait_flag_clear:
> drivers/nvmem/lan9662-otpc.c:43 lan9662_otp_wait_flag_clear() warn: signedness bug returning '(-110)'
>
> Fix this by changing the return type of the function
> lan9662_otp_wait_flag_clear() to be int instead of bool.
>
> Fixes: 9e8f208ad5229d ("nvmem: lan9662-otp: add support")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> ---
Applied thanks,
--srini
> drivers/nvmem/lan9662-otpc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvmem/lan9662-otpc.c b/drivers/nvmem/lan9662-otpc.c
> index f6732fd216d80..f4348c97f6e59 100644
> --- a/drivers/nvmem/lan9662-otpc.c
> +++ b/drivers/nvmem/lan9662-otpc.c
> @@ -36,7 +36,7 @@ struct lan9662_otp {
> void __iomem *base;
> };
>
> -static bool lan9662_otp_wait_flag_clear(void __iomem *reg, u32 flag)
> +static int lan9662_otp_wait_flag_clear(void __iomem *reg, u32 flag)
> {
> u32 val;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-11 17:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 20:59 [PATCH] nvmem: lan9662-otp: Change return type of lan9662_otp_wait_flag_clear() Horatiu Vultur
2022-11-11 17:47 ` Srinivas Kandagatla
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®