From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [linux-next:master 15921/15982] drivers/hid/hid-steam.c:557 steam_send_report_id() warn: check sign expansion for '__UNIQUE_ID_x__578'
Date: Tue, 18 Aug 2026 19:06:39 +0800 [thread overview]
Message-ID: <202608181947.hUO73pDG-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: "Paul E. McKenney" <paulmck@kernel.org>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e6664f2b33db9b6811eb4cec109f06cb2b4f458d
commit: fb2488318acd47809769edf3e6210958dcff9034 [15921/15982] Merge branch 'non-rcu/next' of https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
:::::: branch date: 18 hours ago
:::::: commit date: 19 hours ago
config: x86_64-randconfig-161-20260818 (https://download.01.org/0day-ci/archive/20260818/202608181947.hUO73pDG-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
smatch: v0.5.0-9187-g5189e3fb
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202608181947.hUO73pDG-lkp@intel.com/
smatch warnings:
drivers/hid/hid-steam.c:557 steam_send_report_id() warn: check sign expansion for '__UNIQUE_ID_x__578'
vim +/__UNIQUE_ID_x__578 +557 drivers/hid/hid-steam.c
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 516
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 517 static int steam_send_report_id(struct steam_device *steam,
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 518 u8 *cmd, int size, u8 report_id)
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 519 {
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 520 struct hid_report *r;
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 521 u8 *buf;
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 522 unsigned int retries = 50;
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 523 int ret;
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 524 u32 len;
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 525
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 526 r = steam->hdev->report_enum[HID_FEATURE_REPORT].report_id_hash[report_id];
cd11d1a6114bd4 Lee Jones 2022-07-08 527 if (!r) {
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 528 hid_err(steam->hdev, "No HID_FEATURE_REPORT present for ID %u\n", report_id);
cd11d1a6114bd4 Lee Jones 2022-07-08 529 return -EINVAL;
cd11d1a6114bd4 Lee Jones 2022-07-08 530 }
cd11d1a6114bd4 Lee Jones 2022-07-08 531
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 532 len = hid_report_len(r);
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 533 if (len < 64)
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 534 return -EINVAL;
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 535
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 536 buf = hid_alloc_report_buf(r, GFP_KERNEL);
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 537 if (!buf)
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 538 return -ENOMEM;
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 539
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 540 /* The report ID is always consistent */
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 541 buf[0] = report_id;
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 542 memcpy(buf + 1, cmd, size);
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 543
de435b770cd949 Vicki Pfau 2026-07-29 544 hid_dbg(steam->hdev, "Sending report %*ph\n", size, cmd);
de435b770cd949 Vicki Pfau 2026-07-29 545
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 546 if (!(steam->quirks & STEAM_QUIRK_IBEX))
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 547 len += 1;
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 548
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 549 /*
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 550 * Sometimes the wireless controller fails with EPIPE
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 551 * when sending a feature report.
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 552 * Doing a HID_REQ_SET_REPORT and waiting for a while
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 553 * seems to fix that.
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 554 */
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 555 do {
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 556 ret = hid_hw_raw_request(steam->hdev, report_id,
0a80b4e8ec6a6e Vicki Pfau 2026-08-11 @557 buf, max(size + 1, len),
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 558 HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 559 if (ret != -EPIPE)
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 560 break;
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 561 msleep(20);
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 562 } while (--retries);
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 563
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 564 kfree(buf);
cfa66cba6d02ff Vicki Pfau 2026-08-11 565 /*
cfa66cba6d02ff Vicki Pfau 2026-08-11 566 * Don't log if the failure is -ENODEV, as this
cfa66cba6d02ff Vicki Pfau 2026-08-11 567 * can happen normally on disconnect.
cfa66cba6d02ff Vicki Pfau 2026-08-11 568 */
cfa66cba6d02ff Vicki Pfau 2026-08-11 569 if (ret < 0 && ret != -ENODEV)
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 570 hid_err(steam->hdev, "%s: error %d (%*ph)\n", __func__,
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 571 ret, size, cmd);
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 572 return ret;
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 573 }
c164d6abf3841f Rodrigo Rivas Costa 2018-04-16 574
:::::: The code at line 557 was first introduced by commit
:::::: 0a80b4e8ec6a6e40937c7abdf8fb2ebe6cc7c1e5 HID: steam: Initial 2026 Steam Controller support
:::::: TO: Vicki Pfau <vi@endrift.com>
:::::: CC: Jiri Kosina <jkosina@suse.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-08-18 11:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202608181947.hUO73pDG-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.