Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1316824 > unrolled thread

[PATCH] input: xpad: remove unused function

Started byArnd Bergmann <arnd@arndb.de>
First post2016-01-25 16:40 +0100
Last post2016-01-28 00:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] input: xpad: remove unused function Arnd Bergmann <arnd@arndb.de> - 2016-01-25 16:40 +0100
    Re: [PATCH] input: xpad: remove unused function Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-01-28 00:50 +0100

#1316824 — [PATCH] input: xpad: remove unused function

FromArnd Bergmann <arnd@arndb.de>
Date2016-01-25 16:40 +0100
Subject[PATCH] input: xpad: remove unused function
Message-ID<qURpg-60C-7@gated-at.bofh.it>
There are two definitions of xpad_identify_controller(), one is used
when CONFIG_JOYSTICK_XPAD_LEDS is set, but the other one is empty
and never used, and we get a gcc warning about it:

drivers/input/joystick/xpad.c:1210:13: warning: 'xpad_identify_controller' defined but not used [-Wunused-function]

This removes the second definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: cae705baa40b ("Input: xpad - re-send LED command on present event")
---
 drivers/input/joystick/xpad.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 6727954ab74b..e8a84d12b7ff 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1207,7 +1207,6 @@ static void xpad_led_disconnect(struct usb_xpad *xpad)
 #else
 static int xpad_led_probe(struct usb_xpad *xpad) { return 0; }
 static void xpad_led_disconnect(struct usb_xpad *xpad) { }
-static void xpad_identify_controller(struct usb_xpad *xpad) { }
 #endif
 
 static int xpad_start_input(struct usb_xpad *xpad)
-- 
2.7.0

[toc] | [next] | [standalone]


#1320149

FromDmitry Torokhov <dmitry.torokhov@gmail.com>
Date2016-01-28 00:50 +0100
Message-ID<qVI0y-2V1-7@gated-at.bofh.it>
In reply to#1316824
On Mon, Jan 25, 2016 at 04:30:41PM +0100, Arnd Bergmann wrote:
> There are two definitions of xpad_identify_controller(), one is used
> when CONFIG_JOYSTICK_XPAD_LEDS is set, but the other one is empty
> and never used, and we get a gcc warning about it:
> 
> drivers/input/joystick/xpad.c:1210:13: warning: 'xpad_identify_controller' defined but not used [-Wunused-function]
> 
> This removes the second definition.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: cae705baa40b ("Input: xpad - re-send LED command on present event")

Applied, thank you.

> ---
>  drivers/input/joystick/xpad.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
> index 6727954ab74b..e8a84d12b7ff 100644
> --- a/drivers/input/joystick/xpad.c
> +++ b/drivers/input/joystick/xpad.c
> @@ -1207,7 +1207,6 @@ static void xpad_led_disconnect(struct usb_xpad *xpad)
>  #else
>  static int xpad_led_probe(struct usb_xpad *xpad) { return 0; }
>  static void xpad_led_disconnect(struct usb_xpad *xpad) { }
> -static void xpad_identify_controller(struct usb_xpad *xpad) { }
>  #endif
>  
>  static int xpad_start_input(struct usb_xpad *xpad)
> -- 
> 2.7.0
> 

-- 
Dmitry

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web