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: <202408071743.00IxSKrf-lkp@intel.com>
Date: Wed, 7 Aug 2024 17:50:02 +0800
From: kernel test robot <lkp@...el.com>
To: "Luke D. Jones" <luke@...nes.dev>, linux-input@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	bentiss@...nel.org, jikos@...nel.org,
	"Luke D. Jones" <luke@...nes.dev>
Subject: Re: [PATCH] hid-asus-ally: Add full gamepad support

Hi Luke,

kernel test robot noticed the following build warnings:

[auto build test WARNING on hid/for-next]
[also build test WARNING on next-20240807]
[cannot apply to linus/master v6.11-rc2]
[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/Luke-D-Jones/hid-asus-ally-Add-full-gamepad-support/20240806-170850
base:   https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
patch link:    https://lore.kernel.org/r/20240806081212.56860-1-luke%40ljones.dev
patch subject: [PATCH] hid-asus-ally: Add full gamepad support
config: parisc-allmodconfig (https://download.01.org/0day-ci/archive/20240807/202408071743.00IxSKrf-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240807/202408071743.00IxSKrf-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/202408071743.00IxSKrf-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/hid/hid-asus-ally.c: In function 'ally_x_create':
>> drivers/hid/hid-asus-ally.c:565:17: warning: variable 'max_output_report_size' set but not used [-Wunused-but-set-variable]
     565 |         uint8_t max_output_report_size;
         |                 ^~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/hid-asus-ally.c: In function '__gamepad_store_deadzones':
>> drivers/hid/hid-asus-ally.c:1177:13: warning: variable 'cmd' set but not used [-Wunused-but-set-variable]
    1177 |         int cmd, side, is_tr;
         |             ^~~
   In file included from drivers/hid/hid-asus-ally.c:24:
   drivers/hid/hid-asus-ally.c: At top level:
>> drivers/hid/hid-asus-ally.h:321:44: warning: 'btn_mapping_rt_attr_group' defined but not used [-Wunused-const-variable=]
     321 |         ALLY_BTN_ATTRS_GROUP(btn_##_fname, btn_mapping_##_fname)
         |                                            ^~~~~~~~~~~~
   drivers/hid/hid-asus-ally.h:306:45: note: in definition of macro 'ALLY_BTN_ATTRS_GROUP'
     306 |         static const struct attribute_group _fname##_attr_group = {       \
         |                                             ^~~~~~
   drivers/hid/hid-asus-ally.c:895:1: note: in expansion of macro 'ALLY_BTN_MAPPING'
     895 | ALLY_BTN_MAPPING(rt, btn_pair_lt_rt, btn_pair_side_right);
         | ^~~~~~~~~~~~~~~~
>> drivers/hid/hid-asus-ally.h:321:44: warning: 'btn_mapping_lt_attr_group' defined but not used [-Wunused-const-variable=]
     321 |         ALLY_BTN_ATTRS_GROUP(btn_##_fname, btn_mapping_##_fname)
         |                                            ^~~~~~~~~~~~
   drivers/hid/hid-asus-ally.h:306:45: note: in definition of macro 'ALLY_BTN_ATTRS_GROUP'
     306 |         static const struct attribute_group _fname##_attr_group = {       \
         |                                             ^~~~~~
   drivers/hid/hid-asus-ally.c:894:1: note: in expansion of macro 'ALLY_BTN_MAPPING'
     894 | ALLY_BTN_MAPPING(lt, btn_pair_lt_rt, btn_pair_side_left);
         | ^~~~~~~~~~~~~~~~


vim +/max_output_report_size +565 drivers/hid/hid-asus-ally.c

   562	
   563	static struct ally_x_device *ally_x_create(struct hid_device *hdev)
   564	{
 > 565		uint8_t max_output_report_size;
   566		struct ally_x_device *ally_x;
   567		struct ff_report *report;
   568		int ret;
   569	
   570		ally_x = devm_kzalloc(&hdev->dev, sizeof(*ally_x), GFP_KERNEL);
   571		if (!ally_x)
   572			return ERR_PTR(-ENOMEM);
   573	
   574		ally_x->hdev = hdev;
   575		INIT_WORK(&ally_x->output_worker, ally_x_work);
   576		spin_lock_init(&ally_x->lock);
   577		ally_x->output_worker_initialized = true;
   578		ally_x->qam_btns_steam_mode =
   579			true; /* Always default to steam mode, it can be changed by userspace attr */
   580	
   581		max_output_report_size = sizeof(struct ally_x_input_report);
   582		report = devm_kzalloc(&hdev->dev, sizeof(*report), GFP_KERNEL);
   583		if (!report) {
   584			ret = -ENOMEM;
   585			goto free_ally_x;
   586		}
   587	
   588		/* None of these bytes will change for the FF command for now */
   589		report->report_id = 0x0D;
   590		report->ff.enable = 0x0F; /* Enable all by default */
   591		report->ff.pulse_sustain_10ms = 0xFF; /* Duration */
   592		report->ff.pulse_release_10ms = 0x00; /* Start Delay */
   593		report->ff.loop_count = 0xEB; /* Loop Count */
   594		ally_x->ff_packet = report;
   595	
   596		ally_x->input = ally_x_setup_input(hdev);
   597		if (IS_ERR(ally_x->input)) {
   598			ret = PTR_ERR(ally_x->input);
   599			goto free_ff_packet;
   600		}
   601	
   602		if (sysfs_create_file(&hdev->dev.kobj, &dev_attr_ally_x_qam_mode.attr)) {
   603			ret = -ENODEV;
   604			goto unregister_input;
   605		}
   606	
   607		ally_x->update_ff = true;
   608		if (ally_x->output_worker_initialized)
   609			schedule_work(&ally_x->output_worker);
   610	
   611		hid_info(hdev, "Registered Ally X controller using %s\n",
   612			 dev_name(&ally_x->input->dev));
   613		return ally_x;
   614	
   615	unregister_input:
   616		input_unregister_device(ally_x->input);
   617	free_ff_packet:
   618		kfree(ally_x->ff_packet);
   619	free_ally_x:
   620		kfree(ally_x);
   621		return ERR_PTR(ret);
   622	}
   623	

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