linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Zanussi <zanussi@kernel.org>
To: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Cc: rostedt@goodmis.org, tglx@linutronix.de, C.Emde@osadl.org,
	jkacur@redhat.com, bigeasy@linutronix.de,
	daniel.wagner@siemens.com, julia@ni.com
Subject: [PATCH RT 6/9] tty: serial: pl011: explicitly initialize the flags variable
Date: Fri, 21 Dec 2018 09:21:18 -0600	[thread overview]
Message-ID: <cbe003d988c3904bb5164e6b83282bafc85f6bd0.1545347029.git.tom.zanussi@linux.intel.com> (raw)
In-Reply-To: <cover.1545347029.git.tom.zanussi@linux.intel.com>
In-Reply-To: <cover.1545347029.git.tom.zanussi@linux.intel.com>

v3.18.129-rt111 rt-stable review patch.  If anyone has any objections,
please let me know.

------------------
From: Kurt Kanzenbach <kurt@linutronix.de>

[ Upstream commit 3260983a587d528811a15fc00fa2a9e4473c4453 ]

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>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 drivers/tty/serial/amba-pl011.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 5ef2c62bb904..dede68aa679e 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1930,7 +1930,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
 {
 	struct uart_amba_port *uap = amba_ports[co->index];
 	unsigned int status, old_cr, new_cr;
-	unsigned long flags;
+	unsigned long flags = 0;
 	int locked = 1;
 
 	clk_enable(uap->clk);
-- 
2.14.1


  parent reply	other threads:[~2018-12-21 15:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21 15:21 [PATCH RT 0/9] Linux 3.18.129-rt111-rc1 Tom Zanussi
2018-12-21 15:21 ` [PATCH RT 1/9] efi: Allow efi=runtime Tom Zanussi
2018-12-21 15:21 ` [PATCH RT 2/9] efi: Disable runtime services on RT Tom Zanussi
2018-12-21 15:21 ` [PATCH RT 3/9] crypto: cryptd - add a lock instead preempt_disable/local_bh_disable Tom Zanussi
2018-12-21 15:21 ` [PATCH RT 4/9] sched/core: Avoid __schedule() being called twice in a row Tom Zanussi
2018-12-21 15:21 ` [PATCH RT 5/9] work-simple: drop a shit statement in SWORK_EVENT_PENDING Tom Zanussi
2018-12-21 15:21 ` Tom Zanussi [this message]
2018-12-21 15:21 ` [PATCH RT 7/9] pinctrl: bcm2835: Use raw spinlock for RT compatibility Tom Zanussi
2018-12-21 15:21 ` [PATCH RT 8/9] drm/i915: disable tracing on -RT Tom Zanussi
2018-12-21 15:21 ` [PATCH RT 9/9] Linux 3.18.129-rt111-rc1 Tom Zanussi

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=cbe003d988c3904bb5164e6b83282bafc85f6bd0.1545347029.git.tom.zanussi@linux.intel.com \
    --to=zanussi@kernel.org \
    --cc=C.Emde@osadl.org \
    --cc=bigeasy@linutronix.de \
    --cc=daniel.wagner@siemens.com \
    --cc=jkacur@redhat.com \
    --cc=julia@ni.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).