* [PATCH][next] serial: lpc32xx_hs: remove redundant check and assignment of hsu_rate
@ 2024-02-15 23:29 Colin Ian King
0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2024-02-15 23:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Vladimir Zapolskiy, linux-serial,
linux-arm-kernel
Cc: kernel-janitors, linux-kernel
Variable hsu_rate is being checked for an upper limit and is assigned
a value that is never read. The if statement and assignment are
redundant and can be removed.
Cleans up clang scan build warning:
drivers/tty/serial/lpc32xx_hs.c:237:3: warning: Value stored
to 'hsu_rate' is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/tty/serial/lpc32xx_hs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/tty/serial/lpc32xx_hs.c b/drivers/tty/serial/lpc32xx_hs.c
index ec20329f0603..269efc5e2d51 100644
--- a/drivers/tty/serial/lpc32xx_hs.c
+++ b/drivers/tty/serial/lpc32xx_hs.c
@@ -233,8 +233,6 @@ static unsigned int __serial_get_clock_div(unsigned long uartclk,
hsu_rate++;
}
- if (hsu_rate > 0xFF)
- hsu_rate = 0xFF;
return goodrate;
}
--
2.39.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-15 23:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 23:29 [PATCH][next] serial: lpc32xx_hs: remove redundant check and assignment of hsu_rate Colin Ian King
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®