]> git.baikalelectronics.ru Git - kernel.git/commit
ipmi: avoid gcc warning
authorArnd Bergmann <arnd@arndb.de>
Wed, 28 Jan 2015 15:00:11 +0000 (16:00 +0100)
committerCorey Minyard <cminyard@mvista.com>
Fri, 20 Feb 2015 02:58:18 +0000 (20:58 -0600)
commit8f1256c5e54bbb223a9bf13e787b261375ee1c1c
treeddc2a596ae5f6abfe58271ffec0417f40685f05c
parentee2ead1703fc2c3210ee739b58bfd5f52624ccf0
ipmi: avoid gcc warning

A new harmless warning has come up on ARM builds with gcc-4.9:

drivers/char/ipmi/ipmi_msghandler.c: In function 'smi_send.isra.11':
include/linux/spinlock.h:372:95: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
  raw_spin_unlock_irqrestore(&lock->rlock, flags);
                                                                                               ^
drivers/char/ipmi/ipmi_msghandler.c:1490:16: note: 'flags' was declared here
  unsigned long flags;
                ^

This could be worked around by initializing the 'flags' variable, but it
seems better to rework the code to avoid this.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 842c03da4951d ("ipmi: Make the message handler easier to use for SMI interfaces")
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_msghandler.c