linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: sony: Fix unused function warning
@ 2022-11-28 16:55 José Expósito
  2022-12-20 14:38 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: José Expósito @ 2022-11-28 16:55 UTC (permalink / raw)
  To: jikos
  Cc: benjamin.tissoires, rydberg, linux-input, linux-kernel,
	José Expósito

Compiling this driver without setting "CONFIG_SONY_FF" generates the
following warning:

	drivers/hid/hid-sony.c:2358:20: warning: unused function
	'sony_send_output_report' [-Wunused-function]
	static inline void sony_send_output_report(struct sony_sc *sc)
	                   ^
	1 warning generated.

Add the missing preprocessor check to fix it.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/hid/hid-sony.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 03691cdcfb8e..13125997ab5e 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -2355,11 +2355,13 @@ static void motion_send_output_report(struct sony_sc *sc)
 	hid_hw_output_report(hdev, (u8 *)report, MOTION_REPORT_0x02_SIZE);
 }
 
+#ifdef CONFIG_SONY_FF
 static inline void sony_send_output_report(struct sony_sc *sc)
 {
 	if (sc->send_output_report)
 		sc->send_output_report(sc);
 }
+#endif
 
 static void sony_state_worker(struct work_struct *work)
 {
-- 
2.38.1


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

* Re: [PATCH] HID: sony: Fix unused function warning
  2022-11-28 16:55 [PATCH] HID: sony: Fix unused function warning José Expósito
@ 2022-12-20 14:38 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2022-12-20 14:38 UTC (permalink / raw)
  To: José Expósito
  Cc: benjamin.tissoires, rydberg, linux-input, linux-kernel

On Mon, 28 Nov 2022, José Expósito wrote:

> Compiling this driver without setting "CONFIG_SONY_FF" generates the
> following warning:
> 
> 	drivers/hid/hid-sony.c:2358:20: warning: unused function
> 	'sony_send_output_report' [-Wunused-function]
> 	static inline void sony_send_output_report(struct sony_sc *sc)
> 	                   ^
> 	1 warning generated.
> 
> Add the missing preprocessor check to fix it.
> 
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>

Thanks for fixing this, now applied.

-- 
Jiri Kosina
SUSE Labs


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

end of thread, other threads:[~2022-12-20 14:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 16:55 [PATCH] HID: sony: Fix unused function warning José Expósito
2022-12-20 14:38 ` Jiri Kosina

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