* [paulmckrcu:dev 11/55] drivers/hid/hid-steam.c:557 steam_send_report_id() warn: check sign expansion for '__UNIQUE_ID_x__466'
@ 2026-09-10 14:26 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-10 14:26 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: "Paul E. McKenney" <paulmck@kernel.org>
tree: https://github.com/paulmckrcu/linux dev
head: 9aee678be24173e110c6e93762d2773ef0d43f7a
commit: 84985853d9c8b05166230f0fb91ccebc1f95da08 [11/55] timers: Mark updates to hlist_node ->pprev field
:::::: branch date: 14 hours ago
:::::: commit date: 7 days ago
config: x86_64-randconfig-161-20260910 (https://download.01.org/0day-ci/archive/20260910/202609102134.fsoUTAsF-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
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/202609102134.fsoUTAsF-lkp@intel.com/
smatch warnings:
drivers/hid/hid-steam.c:557 steam_send_report_id() warn: check sign expansion for '__UNIQUE_ID_x__466'
vim +/__UNIQUE_ID_x__466 +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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-10 14:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10 14:26 [paulmckrcu:dev 11/55] drivers/hid/hid-steam.c:557 steam_send_report_id() warn: check sign expansion for '__UNIQUE_ID_x__466' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox