All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Tomasz Pakuła" <tomasz.pakula.oficjalny@gmail.com>,
	jikos@kernel.org, bentiss@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	oleg@makarenk.ooo, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, tomasz.pakula.oficjalny@gmail.com
Subject: Re: [PATCH v2] HID: pidff: Fix condition effect bit clearing
Date: Thu, 5 Feb 2026 05:07:56 +0800	[thread overview]
Message-ID: <202602050440.e5LEMod6-lkp@intel.com> (raw)
In-Reply-To: <20260204133138.475880-1-tomasz.pakula.oficjalny@gmail.com>

Hi Tomasz,

kernel test robot noticed the following build warnings:

[auto build test WARNING on hid/for-next]
[also build test WARNING on linus/master v6.19-rc8 next-20260204]
[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/Tomasz-Paku-a/HID-pidff-Fix-condition-effect-bit-clearing/20260204-213418
base:   https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
patch link:    https://lore.kernel.org/r/20260204133138.475880-1-tomasz.pakula.oficjalny%40gmail.com
patch subject: [PATCH v2] HID: pidff: Fix condition effect bit clearing
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260205/202602050440.e5LEMod6-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260205/202602050440.e5LEMod6-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602050440.e5LEMod6-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/hid/usbhid/hid-pidff.c:1456:7: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
    1456 |                 if (test_and_clear_bit(FF_SPRING, dev->ffbit)   |
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1457 |                     test_and_clear_bit(FF_DAMPER, dev->ffbit)   |
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1458 |                     test_and_clear_bit(FF_FRICTION, dev->ffbit) |
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                                                 ||
    1459 |                     test_and_clear_bit(FF_INERTIA, dev->ffbit))
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/usbhid/hid-pidff.c:1456:7: note: cast one or both operands to int to silence this warning
>> drivers/hid/usbhid/hid-pidff.c:1456:7: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
    1456 |                 if (test_and_clear_bit(FF_SPRING, dev->ffbit)   |
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1457 |                     test_and_clear_bit(FF_DAMPER, dev->ffbit)   |
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                                                 ||
    1458 |                     test_and_clear_bit(FF_FRICTION, dev->ffbit) |
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/usbhid/hid-pidff.c:1456:7: note: cast one or both operands to int to silence this warning
>> drivers/hid/usbhid/hid-pidff.c:1456:7: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
    1456 |                 if (test_and_clear_bit(FF_SPRING, dev->ffbit)   |
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                                                 ||
    1457 |                     test_and_clear_bit(FF_DAMPER, dev->ffbit)   |
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hid/usbhid/hid-pidff.c:1456:7: note: cast one or both operands to int to silence this warning
   3 warnings generated.


vim +1456 drivers/hid/usbhid/hid-pidff.c

  1398	
  1399	#define PIDFF_FIND_FIELDS(name, report, strict) \
  1400		pidff_find_fields(pidff->name, pidff_ ## name, \
  1401			pidff->reports[report], \
  1402			ARRAY_SIZE(pidff_ ## name), strict, &pidff->quirks)
  1403	
  1404	/*
  1405	 * Fill and check the pidff_usages
  1406	 */
  1407	static int pidff_init_fields(struct pidff_device *pidff, struct input_dev *dev)
  1408	{
  1409		if (PIDFF_FIND_FIELDS(set_effect, PID_SET_EFFECT, 1)) {
  1410			hid_err(pidff->hid, "unknown set_effect report layout\n");
  1411			return -ENODEV;
  1412		}
  1413	
  1414		PIDFF_FIND_FIELDS(block_load, PID_BLOCK_LOAD, 0);
  1415		if (!pidff->block_load[PID_EFFECT_BLOCK_INDEX].value) {
  1416			hid_err(pidff->hid, "unknown pid_block_load report layout\n");
  1417			return -ENODEV;
  1418		}
  1419	
  1420		if (PIDFF_FIND_FIELDS(effect_operation, PID_EFFECT_OPERATION, 1)) {
  1421			hid_err(pidff->hid, "unknown effect_operation report layout\n");
  1422			return -ENODEV;
  1423		}
  1424	
  1425		if (PIDFF_FIND_FIELDS(block_free, PID_BLOCK_FREE, 1)) {
  1426			hid_err(pidff->hid, "unknown pid_block_free report layout\n");
  1427			return -ENODEV;
  1428		}
  1429	
  1430		if (pidff_find_special_fields(pidff) || pidff_find_effects(pidff, dev))
  1431			return -ENODEV;
  1432	
  1433		if (PIDFF_FIND_FIELDS(set_envelope, PID_SET_ENVELOPE, 1)) {
  1434			if (test_and_clear_bit(FF_CONSTANT, dev->ffbit))
  1435				hid_warn(pidff->hid,
  1436					 "has constant effect but no envelope\n");
  1437			if (test_and_clear_bit(FF_RAMP, dev->ffbit))
  1438				hid_warn(pidff->hid,
  1439					 "has ramp effect but no envelope\n");
  1440	
  1441			if (test_and_clear_bit(FF_PERIODIC, dev->ffbit))
  1442				hid_warn(pidff->hid,
  1443					 "has periodic effect but no envelope\n");
  1444		}
  1445	
  1446		if (PIDFF_FIND_FIELDS(set_constant, PID_SET_CONSTANT, 1) &&
  1447		    test_and_clear_bit(FF_CONSTANT, dev->ffbit))
  1448			hid_warn(pidff->hid, "unknown constant effect layout\n");
  1449	
  1450		if (PIDFF_FIND_FIELDS(set_ramp, PID_SET_RAMP, 1) &&
  1451		    test_and_clear_bit(FF_RAMP, dev->ffbit))
  1452			hid_warn(pidff->hid, "unknown ramp effect layout\n");
  1453	
  1454		if (PIDFF_FIND_FIELDS(set_condition, PID_SET_CONDITION, 1)) {
  1455			/* Bitwise to ensure all the bits will be cleared */
> 1456			if (test_and_clear_bit(FF_SPRING, dev->ffbit)   |
  1457			    test_and_clear_bit(FF_DAMPER, dev->ffbit)   |
  1458			    test_and_clear_bit(FF_FRICTION, dev->ffbit) |
  1459			    test_and_clear_bit(FF_INERTIA, dev->ffbit))
  1460				hid_warn(pidff->hid, "unknown condition effect layout\n");
  1461		}
  1462	
  1463		if (PIDFF_FIND_FIELDS(set_periodic, PID_SET_PERIODIC, 1) &&
  1464		    test_and_clear_bit(FF_PERIODIC, dev->ffbit))
  1465			hid_warn(pidff->hid, "unknown periodic effect layout\n");
  1466	
  1467		PIDFF_FIND_FIELDS(pool, PID_POOL, 0);
  1468	
  1469		if (!PIDFF_FIND_FIELDS(device_gain, PID_DEVICE_GAIN, 1))
  1470			set_bit(FF_GAIN, dev->ffbit);
  1471	
  1472		return 0;
  1473	}
  1474	

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

  reply	other threads:[~2026-02-04 21:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 13:31 [PATCH v2] HID: pidff: Fix condition effect bit clearing Tomasz Pakuła
2026-02-04 21:07 ` kernel test robot [this message]
2026-02-05  0:41   ` Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202602050440.e5LEMod6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oleg@makarenk.ooo \
    --cc=tomasz.pakula.oficjalny@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.