* [PATCH] rtc: meson: remove redundant assignment to variable retries
@ 2019-11-22 22:52 Colin King
2019-11-23 9:40 ` Martin Blumenstingl
2019-11-26 22:14 ` Alexandre Belloni
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2019-11-22 22:52 UTC (permalink / raw)
To: Alessandro Zummo, Alexandre Belloni, Kevin Hilman, linux-rtc,
linux-arm-kernel, linux-amlogic
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable retries is being initialized with a value that is never
read and it is being updated later with a new value in a for-loop.
The initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/rtc/rtc-meson.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-meson.c b/drivers/rtc/rtc-meson.c
index 9bd8478db34b..47ebcf834cc2 100644
--- a/drivers/rtc/rtc-meson.c
+++ b/drivers/rtc/rtc-meson.c
@@ -131,7 +131,7 @@ static u32 meson_rtc_get_data(struct meson_rtc *rtc)
static int meson_rtc_get_bus(struct meson_rtc *rtc)
{
- int ret, retries = 3;
+ int ret, retries;
u32 val;
/* prepare bus for transfers, set all lines low */
--
2.24.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rtc: meson: remove redundant assignment to variable retries
2019-11-22 22:52 [PATCH] rtc: meson: remove redundant assignment to variable retries Colin King
@ 2019-11-23 9:40 ` Martin Blumenstingl
2019-11-26 22:14 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Martin Blumenstingl @ 2019-11-23 9:40 UTC (permalink / raw)
To: Colin King
Cc: linux-rtc, Alessandro Zummo, Alexandre Belloni, Kevin Hilman,
kernel-janitors, linux-kernel, linux-amlogic, linux-arm-kernel
Hi Colin,
On Fri, Nov 22, 2019 at 11:52 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable retries is being initialized with a value that is never
> read and it is being updated later with a new value in a for-loop.
> The initialization is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
thank you for addressing this!
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Martin
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rtc: meson: remove redundant assignment to variable retries
2019-11-22 22:52 [PATCH] rtc: meson: remove redundant assignment to variable retries Colin King
2019-11-23 9:40 ` Martin Blumenstingl
@ 2019-11-26 22:14 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2019-11-26 22:14 UTC (permalink / raw)
To: Colin King
Cc: linux-rtc, Alessandro Zummo, Kevin Hilman, kernel-janitors,
linux-kernel, linux-amlogic, linux-arm-kernel
On 22/11/2019 22:52:10+0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable retries is being initialized with a value that is never
> read and it is being updated later with a new value in a for-loop.
> The initialization is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/rtc/rtc-meson.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied, thanks.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-26 22:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 22:52 [PATCH] rtc: meson: remove redundant assignment to variable retries Colin King
2019-11-23 9:40 ` Martin Blumenstingl
2019-11-26 22:14 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).