linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparc: i8042-sparcio.h: fix unused kbd_res warning
@ 2014-08-19 21:09 Vincent Stehlé
  2014-08-19 21:18 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Stehlé @ 2014-08-19 21:09 UTC (permalink / raw)
  To: linux-kernel, linux-input, sparclinux
  Cc: Vincent Stehlé, Dmitry Torokhov, David S. Miller

kbd_res is used only when CONFIG_PCI is defined; condition its declaration as
well. This fixes the following compilation warning:

  drivers/input/serio/i8042-sparcio.h:20:25: warning: ‘kbd_res’ defined but not used [-Wunused-variable]

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
---

Hi,

This can be seen with e.g. sparc alldefconfig.

Best regards,

V.

 drivers/input/serio/i8042-sparcio.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
index d6aa4c6..93cb791 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -17,7 +17,6 @@ static int i8042_aux_irq = -1;
 #define I8042_MUX_PHYS_DESC "sparcps2/serio%d"
 
 static void __iomem *kbd_iobase;
-static struct resource *kbd_res;
 
 #define I8042_COMMAND_REG	(kbd_iobase + 0x64UL)
 #define I8042_DATA_REG		(kbd_iobase + 0x60UL)
@@ -44,6 +43,8 @@ static inline void i8042_write_command(int val)
 
 #ifdef CONFIG_PCI
 
+static struct resource *kbd_res;
+
 #define OBP_PS2KBD_NAME1	"kb_ps2"
 #define OBP_PS2KBD_NAME2	"keyboard"
 #define OBP_PS2MS_NAME1		"kdmouse"
-- 
2.1.0.rc1

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sparc: i8042-sparcio.h: fix unused kbd_res warning
  2014-08-19 21:09 [PATCH] sparc: i8042-sparcio.h: fix unused kbd_res warning Vincent Stehlé
@ 2014-08-19 21:18 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2014-08-19 21:18 UTC (permalink / raw)
  To: Vincent Stehlé
  Cc: linux-kernel, linux-input, sparclinux, David S. Miller

On Tue, Aug 19, 2014 at 11:09:37PM +0200, Vincent Stehlé wrote:
> kbd_res is used only when CONFIG_PCI is defined; condition its declaration as
> well. This fixes the following compilation warning:
> 
>   drivers/input/serio/i8042-sparcio.h:20:25: warning: ‘kbd_res’ defined but not used [-Wunused-variable]
> 
> Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>

Applied, thank you.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-19 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-19 21:09 [PATCH] sparc: i8042-sparcio.h: fix unused kbd_res warning Vincent Stehlé
2014-08-19 21:18 ` Dmitry Torokhov

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).