2020-10-12 12:52:06 +00:00
|
|
|
|
From 6c3a754ac2c37c2783ab8f72cedd3bd0917fbe21 Mon Sep 17 00:00:00 2001
|
|
|
|
|
Message-Id: <6c3a754ac2c37c2783ab8f72cedd3bd0917fbe21.1601675152.git.zanussi@kernel.org>
|
|
|
|
|
In-Reply-To: <5b5a156f9808b1acf1205606e03da117214549ea.1601675151.git.zanussi@kernel.org>
|
|
|
|
|
References: <5b5a156f9808b1acf1205606e03da117214549ea.1601675151.git.zanussi@kernel.org>
|
2018-10-30 12:40:05 +00:00
|
|
|
|
From: Kurt Kanzenbach <kurt@linutronix.de>
|
|
|
|
|
Date: Mon, 24 Sep 2018 10:29:01 +0200
|
2020-09-04 20:10:21 +00:00
|
|
|
|
Subject: [PATCH 166/333] tty: serial: pl011: explicitly initialize the flags
|
2019-04-08 23:49:20 +00:00
|
|
|
|
variable
|
2018-10-30 12:40:05 +00:00
|
|
|
|
MIME-Version: 1.0
|
|
|
|
|
Content-Type: text/plain; charset=UTF-8
|
|
|
|
|
Content-Transfer-Encoding: 8bit
|
2020-10-12 12:52:06 +00:00
|
|
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.148-rt64.tar.xz
|
2018-10-30 12:40:05 +00:00
|
|
|
|
|
|
|
|
|
Silence the following gcc warning:
|
|
|
|
|
|
|
|
|
|
drivers/tty/serial/amba-pl011.c: In function ‘pl011_console_write’:
|
|
|
|
|
./include/linux/spinlock.h:260:3: warning: ‘flags’ may be used uninitialized in this function [-Wmaybe-uninitialized]
|
|
|
|
|
_raw_spin_unlock_irqrestore(lock, flags); \
|
|
|
|
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
drivers/tty/serial/amba-pl011.c:2214:16: note: ‘flags’ was declared here
|
|
|
|
|
unsigned long flags;
|
|
|
|
|
^~~~~
|
|
|
|
|
|
|
|
|
|
The code is correct. Thus, initializing flags to zero doesn't change the
|
|
|
|
|
behavior and resolves the warning.
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
|
|
|
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
|
---
|
2019-04-08 23:49:20 +00:00
|
|
|
|
drivers/tty/serial/amba-pl011.c | 2 +-
|
2018-10-30 12:40:05 +00:00
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
2019-04-08 23:49:20 +00:00
|
|
|
|
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
|
2020-10-12 12:52:06 +00:00
|
|
|
|
index f4a01c7909fb..0b535a85d282 100644
|
2018-10-30 12:40:05 +00:00
|
|
|
|
--- a/drivers/tty/serial/amba-pl011.c
|
|
|
|
|
+++ b/drivers/tty/serial/amba-pl011.c
|
2020-01-03 23:36:11 +00:00
|
|
|
|
@@ -2209,7 +2209,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
|
2018-10-30 12:40:05 +00:00
|
|
|
|
{
|
|
|
|
|
struct uart_amba_port *uap = amba_ports[co->index];
|
|
|
|
|
unsigned int old_cr = 0, new_cr;
|
|
|
|
|
- unsigned long flags;
|
|
|
|
|
+ unsigned long flags = 0;
|
|
|
|
|
int locked = 1;
|
|
|
|
|
|
|
|
|
|
clk_enable(uap->clk);
|
2020-01-03 23:36:11 +00:00
|
|
|
|
--
|
2020-06-22 13:14:16 +00:00
|
|
|
|
2.17.1
|
2020-01-03 23:36:11 +00:00
|
|
|
|
|