* [chrome-os:chromeos-6.6 265/293] drivers/hid/i2c-hid/i2c-hid-core.c:178:12-13: WARNING opportunity for min()
@ 2024-05-09 20:22 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-09 20:22 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: cros-kernel-buildreports@googlegroups.com
TO: Guenter Roeck <groeck@google.com>
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-6.6
head: 5d220f942b4447d636ce50c7378fafdc4f3c135c
commit: c09dd0deb97a324865ea2d7123bb294ddf0c9021 [265/293] FROMGIT: HID: i2c-hid: Retry address probe after delay
:::::: branch date: 15 hours ago
:::::: commit date: 34 hours ago
config: x86_64-randconfig-102-20240510 (https://download.01.org/0day-ci/archive/20240510/202405100458.FZ6dPcHT-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
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: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202405100458.FZ6dPcHT-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/hid/i2c-hid/i2c-hid-core.c:178:12-13: WARNING opportunity for min()
vim +178 drivers/hid/i2c-hid/i2c-hid-core.c
71af01a8c85ad8 drivers/hid/i2c-hid/i2c-hid.c HungNien Chen 2016-11-10 162
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 163 static int i2c_hid_probe_address(struct i2c_hid *ihid)
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 164 {
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 165 int ret;
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 166
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 167 /*
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 168 * Some STM-based devices need 400µs after a rising clock edge to wake
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 169 * from deep sleep, in which case the first read will fail. Try after a
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 170 * short sleep to see if the device came alive on the bus. Certain
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 171 * Weida Tech devices also need this.
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 172 */
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 173 ret = i2c_smbus_read_byte(ihid->client);
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 174 if (ret < 0) {
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 175 usleep_range(400, 500);
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 176 ret = i2c_smbus_read_byte(ihid->client);
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 177 }
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 @178 return ret < 0 ? ret : 0;
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 179 }
c09dd0deb97a32 drivers/hid/i2c-hid/i2c-hid-core.c Kenny Levinsen 2024-04-30 180
--
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:[~2024-05-09 20:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09 20:22 [chrome-os:chromeos-6.6 265/293] drivers/hid/i2c-hid/i2c-hid-core.c:178:12-13: WARNING opportunity for min() kernel test robot
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.