All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: nintendo: fix unused const warning
@ 2022-05-28 21:23 Daniel J. Ogorchock
  2022-05-29 19:15 ` Silvan Jegen
  2022-06-08  9:49 ` Jiri Kosina
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel J. Ogorchock @ 2022-05-28 21:23 UTC (permalink / raw)
  To: linux-input; +Cc: jikos, Daniel J. Ogorchock

JC_RUMBLE_ZERO_AMP_PKT_CNT is only used when force feedback support in
the driver is enabled. Place the declaration in the CONFIG_NINTENDO_FF
ifdef to avoid a warning when compiling without rumble support.

Signed-off-by: Daniel J. Ogorchock <djogorchock@gmail.com>
---
 drivers/hid/hid-nintendo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c
index 2204de889739f..dcd0f16de7b51 100644
--- a/drivers/hid/hid-nintendo.c
+++ b/drivers/hid/hid-nintendo.c
@@ -292,6 +292,7 @@ static const struct joycon_rumble_amp_data joycon_rumble_amplitudes[] = {
 };
 static const u16 JC_RUMBLE_DFLT_LOW_FREQ = 160;
 static const u16 JC_RUMBLE_DFLT_HIGH_FREQ = 320;
+static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
 #endif /* IS_ENABLED(CONFIG_NINTENDO_FF) */
 static const u16 JC_RUMBLE_PERIOD_MS = 50;
 
@@ -402,8 +403,6 @@ struct joycon_input_report {
 #define JC_RUMBLE_DATA_SIZE	8
 #define JC_RUMBLE_QUEUE_SIZE	8
 
-static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
-
 static const char * const joycon_player_led_names[] = {
 	LED_FUNCTION_PLAYER1,
 	LED_FUNCTION_PLAYER2,
-- 
2.36.1


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

* Re: [PATCH] HID: nintendo: fix unused const warning
  2022-05-28 21:23 [PATCH] HID: nintendo: fix unused const warning Daniel J. Ogorchock
@ 2022-05-29 19:15 ` Silvan Jegen
  2022-06-08  9:49 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Silvan Jegen @ 2022-05-29 19:15 UTC (permalink / raw)
  To: Daniel J. Ogorchock; +Cc: linux-input, jikos

"Daniel J. Ogorchock" <djogorchock@gmail.com> wrote:
> JC_RUMBLE_ZERO_AMP_PKT_CNT is only used when force feedback support in
> the driver is enabled. Place the declaration in the CONFIG_NINTENDO_FF
> ifdef to avoid a warning when compiling without rumble support.
> 
> Signed-off-by: Daniel J. Ogorchock <djogorchock@gmail.com>
> ---

LGTM!

Reviewed-by: Silvan Jegen <s.jegen@gmail.com>


> [...]

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

* Re: [PATCH] HID: nintendo: fix unused const warning
  2022-05-28 21:23 [PATCH] HID: nintendo: fix unused const warning Daniel J. Ogorchock
  2022-05-29 19:15 ` Silvan Jegen
@ 2022-06-08  9:49 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2022-06-08  9:49 UTC (permalink / raw)
  To: Daniel J. Ogorchock; +Cc: linux-input

On Sat, 28 May 2022, Daniel J. Ogorchock wrote:

> JC_RUMBLE_ZERO_AMP_PKT_CNT is only used when force feedback support in
> the driver is enabled. Place the declaration in the CONFIG_NINTENDO_FF
> ifdef to avoid a warning when compiling without rumble support.
> 
> Signed-off-by: Daniel J. Ogorchock <djogorchock@gmail.com>
> ---
>  drivers/hid/hid-nintendo.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c
> index 2204de889739f..dcd0f16de7b51 100644
> --- a/drivers/hid/hid-nintendo.c
> +++ b/drivers/hid/hid-nintendo.c
> @@ -292,6 +292,7 @@ static const struct joycon_rumble_amp_data joycon_rumble_amplitudes[] = {
>  };
>  static const u16 JC_RUMBLE_DFLT_LOW_FREQ = 160;
>  static const u16 JC_RUMBLE_DFLT_HIGH_FREQ = 320;
> +static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
>  #endif /* IS_ENABLED(CONFIG_NINTENDO_FF) */
>  static const u16 JC_RUMBLE_PERIOD_MS = 50;
>  
> @@ -402,8 +403,6 @@ struct joycon_input_report {
>  #define JC_RUMBLE_DATA_SIZE	8
>  #define JC_RUMBLE_QUEUE_SIZE	8
>  
> -static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
> -
>  static const char * const joycon_player_led_names[] = {
>  	LED_FUNCTION_PLAYER1,

Applied, thanks Daniel.

-- 
Jiri Kosina
SUSE Labs


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

end of thread, other threads:[~2022-06-08 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-28 21:23 [PATCH] HID: nintendo: fix unused const warning Daniel J. Ogorchock
2022-05-29 19:15 ` Silvan Jegen
2022-06-08  9:49 ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.