public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: "Tomasz Pakuła" <tomasz.pakula.oficjalny@gmail.com>,
	jikos@kernel.org, bentiss@kernel.org, llvm@lists.linux.dev,
	oe-kbuild-all@lists.linux.dev, oleg@makarenk.ooo,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] HID: pidff: Fix condition effect bit clearing
Date: Wed, 4 Feb 2026 17:41:06 -0700	[thread overview]
Message-ID: <20260205004106.GA2386589@ax162> (raw)
In-Reply-To: <202602050440.e5LEMod6-lkp@intel.com>

On Thu, Feb 05, 2026 at 05:07:56AM +0800, kernel test robot wrote:
> 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.

As the use of the bitwise operation is intentional here per the comment,
I think going back to v1 to avoid introducing this warning would be
better than casting one of these operands to int to silence it with the
v2 structuring of the code. v1 matches what I have done elsewhere in the
kernel to make it obvious that each function should be called (without a
comment):

  2e70570656ad ("drm/i915: Avoid bitwise vs logical OR warning in snb_wm_latency_quirk()")
  a02dcde595f7 ("Input: touchscreen - avoid bitwise vs logical OR warning")

Cheers,
Nathan

      reply	other threads:[~2026-02-05  0:41 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
2026-02-05  0:41   ` Nathan Chancellor [this message]

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=20260205004106.GA2386589@ax162 \
    --to=nathan@kernel.org \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox