lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202408151231.kUWzsw88-lkp@intel.com>
Date: Thu, 15 Aug 2024 12:19:12 +0800
From: kernel test robot <lkp@...el.com>
To: Stuart Hayhurst <stuart.a.hayhurst@...il.com>,
	linux-input@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev,
	Stuart Hayhurst <stuart.a.hayhurst@...il.com>,
	Jiri Kosina <jikos@...nel.org>,
	Benjamin Tissoires <bentiss@...nel.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: corsair-void: Add Corsair Void headset family driver

Hi Stuart,

kernel test robot noticed the following build warnings:

[auto build test WARNING on hid/for-next]
[also build test WARNING on linus/master v6.11-rc3 next-20240814]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Stuart-Hayhurst/HID-corsair-void-Add-Corsair-Void-headset-family-driver/20240815-004208
base:   https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
patch link:    https://lore.kernel.org/r/20240813153819.840275-3-stuart.a.hayhurst%40gmail.com
patch subject: [PATCH] HID: corsair-void: Add Corsair Void headset family driver
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240815/202408151231.kUWzsw88-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240815/202408151231.kUWzsw88-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408151231.kUWzsw88-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/hid/hid-corsair-void.c: In function 'corsair_void_probe':
>> drivers/hid/hid-corsair-void.c:646:36: warning: variable 'psy_cfg' set but not used [-Wunused-but-set-variable]
     646 |         struct power_supply_config psy_cfg;
         |                                    ^~~~~~~


vim +/psy_cfg +646 drivers/hid/hid-corsair-void.c

   640	
   641	static int corsair_void_probe(struct hid_device *hid_dev,
   642				      const struct hid_device_id *hid_id)
   643	{
   644		int ret = 0;
   645		struct corsair_void_drvdata *drvdata;
 > 646		struct power_supply_config psy_cfg;
   647		char *name;
   648		int name_length;
   649	
   650		if (!hid_is_usb(hid_dev))
   651			return -EINVAL;
   652	
   653		drvdata = devm_kzalloc(&hid_dev->dev, sizeof(struct corsair_void_drvdata),
   654				       GFP_KERNEL);
   655		if (!drvdata)
   656			return -ENOMEM;
   657	
   658		hid_set_drvdata(hid_dev, drvdata);
   659		psy_cfg.drv_data = drvdata;
   660		dev_set_drvdata(&hid_dev->dev, drvdata);
   661	
   662		drvdata->dev = &hid_dev->dev;
   663		drvdata->hid_dev = hid_dev;
   664		drvdata->is_wired = hid_id->driver_data == CORSAIR_VOID_WIRED;
   665	
   666		drvdata->sidetone_max = CORSAIR_VOID_SIDETONE_MAX_WIRELESS;
   667		if (drvdata->is_wired)
   668			drvdata->sidetone_max = CORSAIR_VOID_SIDETONE_MAX_WIRED;
   669	
   670		/* Set initial values for no wireless headset attached */
   671		/* If a headset is attached, it'll be prompted later */
   672		corsair_void_set_unknown_wireless_data(drvdata);
   673		corsair_void_set_unknown_batt(drvdata);
   674	
   675		/* Receiver version won't be reset after init */
   676		/* Headset version already set via set_unknown_wireless_data */
   677		drvdata->fw_receiver_major = 0;
   678		drvdata->fw_receiver_minor = 0;
   679	
   680		ret = hid_parse(hid_dev);
   681		if (ret) {
   682			hid_err(hid_dev, "parse failed (reason: %d)\n", ret);
   683			return ret;
   684		}
   685	
   686		name_length = snprintf(NULL, 0, "corsair-void-%d-battery", hid_dev->id);
   687		name = devm_kzalloc(drvdata->dev, name_length + 1, GFP_KERNEL);
   688		if (!name)
   689			return -ENOMEM;
   690		snprintf(name, name_length + 1, "corsair-void-%d-battery", hid_dev->id);
   691	
   692		drvdata->battery_desc.name = name;
   693		drvdata->battery_desc.type = POWER_SUPPLY_TYPE_BATTERY;
   694		drvdata->battery_desc.properties = corsair_void_battery_props;
   695		drvdata->battery_desc.num_properties = ARRAY_SIZE(corsair_void_battery_props);
   696		drvdata->battery_desc.get_property = corsair_void_battery_get_property;
   697	
   698		drvdata->battery = NULL;
   699		INIT_WORK(&drvdata->battery_remove_work,
   700			  corsair_void_battery_remove_work_handler);
   701		INIT_WORK(&drvdata->battery_add_work,
   702			  corsair_void_battery_add_work_handler);
   703		ret = devm_mutex_init(drvdata->dev, &drvdata->battery_mutex);
   704		if (ret)
   705			return ret;
   706	
   707		ret = sysfs_create_group(&hid_dev->dev.kobj, &corsair_void_attr_group);
   708		if (ret)
   709			return ret;
   710	
   711		ret = hid_hw_start(hid_dev, HID_CONNECT_DEFAULT);
   712		if (ret) {
   713			hid_err(hid_dev, "hid_hw_start failed (reason: %d)\n", ret);
   714			goto failed_after_sysfs;
   715		}
   716	
   717		/* Any failures after here should go to failed_after_hid_start */
   718	
   719		/* Refresh battery data, in case wireless headset is already connected */
   720		INIT_DELAYED_WORK(&drvdata->delayed_status_work,
   721				  corsair_void_status_work_handler);
   722		schedule_delayed_work(&drvdata->delayed_status_work,
   723				      msecs_to_jiffies(100));
   724	
   725		/* Refresh firmware versions */
   726		INIT_DELAYED_WORK(&drvdata->delayed_firmware_work,
   727				  corsair_void_firmware_work_handler);
   728		schedule_delayed_work(&drvdata->delayed_firmware_work,
   729				      msecs_to_jiffies(100));
   730	
   731		goto success;
   732	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ