Re: [hid:for-6.6/steelseries 1/1] drivers/hid/hid-steelseries.c:378:12: sparse: sparse: symbol 'arctis_1_battery_request' was not declared. Should it be static?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 15 Aug 2023, kernel test robot wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-6.6/steelseries
> head:   a0c76896c3fbdc2e7c70b980b3bb38a6ac445971
> commit: a0c76896c3fbdc2e7c70b980b3bb38a6ac445971 [1/1] HID: steelseries: Add support for Arctis 1 XBox
> config: i386-randconfig-i061-20230814 (https://download.01.org/0day-ci/archive/20230815/202308150123.SRaAiV75-lkp@xxxxxxxxx/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce: (https://download.01.org/0day-ci/archive/20230815/202308150123.SRaAiV75-lkp@xxxxxxxxx/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202308150123.SRaAiV75-lkp@xxxxxxxxx/
> 
> sparse warnings: (new ones prefixed by >>)
> >> drivers/hid/hid-steelseries.c:378:12: sparse: sparse: symbol 'arctis_1_battery_request' was not declared. Should it be static?

Just pushed the patch below to hid.git as a fixup.

Thanks.

From: Jiri Kosina <jkosina@xxxxxxx>
Subject: [PATCH] HID: steelseries: arctis_1_battery_request[] should be static

arctis_1_battery_request[] is not used outside of this module, and as such 
should be static.

Fixes: a0c76896c3fbdc2 ("HID: steelseries: Add support for Arctis 1 XBox")
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Jiri Kosina <jkosina@xxxxxxx>
---
 drivers/hid/hid-steelseries.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c
index 495377686123..43d2cf7153d7 100644
--- a/drivers/hid/hid-steelseries.c
+++ b/drivers/hid/hid-steelseries.c
@@ -375,7 +375,7 @@ static void steelseries_srws1_remove(struct hid_device *hdev)
 #define STEELSERIES_HEADSET_BATTERY_TIMEOUT_MS	3000
 
 #define ARCTIS_1_BATTERY_RESPONSE_LEN		8
-const char arctis_1_battery_request[] = { 0x06, 0x12 };
+static const char arctis_1_battery_request[] = { 0x06, 0x12 };
 
 static int steelseries_headset_arctis_1_fetch_battery(struct hid_device *hdev)
 {

-- 
Jiri Kosina
SUSE Labs




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux