* [linux-next:master 4344/13038] drivers/hid/hid-sony.c:1726:41: warning: Uninitialized variables: entry.lock, entry.list_node, entry.hdev, entry.touchpad, entry.sensor_dev, entry.quirks, entry.state_worker, entry.send_output_report, entry.battery, entry.battery_desc, entry.device_id, en...
@ 2023-02-16 1:12 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-02-16 1:12 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check warning: drivers/hid/hid-sony.c:1726:41: warning: Uninitialized variables: entry.lock, entry.list_node, entry.hdev, entry.touchpad, entry.sensor_dev, entry.quirks, entry.state_worker, entry.send_output_report, entry.battery, entry.battery_desc, entry.device_id, entry.output_report_dmabuf, entry.state_worker_initialized, entry.defer_initialization, entry.battery_capacity, entry.battery_status, entry.led_count, entry.ghl_urb, entry.ghl_poke_timer [uninitvar]"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Roderick Colenbrander <roderick@gaikai.com>
CC: Jiri Kosina <jkosina@suse.cz>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9d9019bcea1aac7eed64a1a4966282b6b7b141c8
commit: 4f1f391869eecb11d57e9e07ddec143ff3dc08ee [4344/13038] HID: sony: remove DualShock4 support.
:::::: branch date: 21 hours ago
:::::: commit date: 4 weeks ago
compiler: or1k-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout 4f1f391869eecb11d57e9e07ddec143ff3dc08ee
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/r/202302160922.nitD5BDe-lkp@intel.com/
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/hid/hid-sony.c:1726:41: warning: Uninitialized variables: entry.lock, entry.list_node, entry.hdev, entry.touchpad, entry.sensor_dev, entry.quirks, entry.state_worker, entry.send_output_report, entry.battery, entry.battery_desc, entry.device_id, entry.output_report_dmabuf, entry.state_worker_initialized, entry.defer_initialization, entry.battery_capacity, entry.battery_status, entry.led_count, entry.ghl_urb, entry.ghl_poke_timer [uninitvar]
if (sony_compare_connection_type(sc, entry)) {
^
drivers/hid/hid-sony.c:1726:41: warning: Uninitialized variables: entry.lock, entry.list_node, entry.hdev, entry.touchpad, entry.sensor_dev, entry.quirks, entry.state_worker, entry.send_output_report, entry.battery, entry.battery_desc, entry.device_id, entry.output_report_dmabuf, entry.left, entry.right, entry.state_worker_initialized, entry.defer_initialization, entry.battery_capacity, entry.battery_status, entry.led_count, entry.ghl_urb, entry.ghl_poke_timer [uninitvar]
if (sony_compare_connection_type(sc, entry)) {
^
vim +1726 drivers/hid/hid-sony.c
0f3982308b5fc7 Frank Praznik 2016-09-22 1713
d2d782fccee4f6 Frank Praznik 2014-02-20 1714 static int sony_check_add_dev_list(struct sony_sc *sc)
d2d782fccee4f6 Frank Praznik 2014-02-20 1715 {
d2d782fccee4f6 Frank Praznik 2014-02-20 1716 struct sony_sc *entry;
d2d782fccee4f6 Frank Praznik 2014-02-20 1717 unsigned long flags;
d2d782fccee4f6 Frank Praznik 2014-02-20 1718 int ret;
d2d782fccee4f6 Frank Praznik 2014-02-20 1719
d2d782fccee4f6 Frank Praznik 2014-02-20 1720 spin_lock_irqsave(&sony_dev_list_lock, flags);
c4e1ddf2680b35 Frank Praznik 2014-01-17 1721
d2d782fccee4f6 Frank Praznik 2014-02-20 1722 list_for_each_entry(entry, &sony_device_list, list_node) {
d2d782fccee4f6 Frank Praznik 2014-02-20 1723 ret = memcmp(sc->mac_address, entry->mac_address,
d2d782fccee4f6 Frank Praznik 2014-02-20 1724 sizeof(sc->mac_address));
d2d782fccee4f6 Frank Praznik 2014-02-20 1725 if (!ret) {
0f3982308b5fc7 Frank Praznik 2016-09-22 @1726 if (sony_compare_connection_type(sc, entry)) {
0f3982308b5fc7 Frank Praznik 2016-09-22 1727 ret = 1;
0f3982308b5fc7 Frank Praznik 2016-09-22 1728 } else {
d2d782fccee4f6 Frank Praznik 2014-02-20 1729 ret = -EEXIST;
0f3982308b5fc7 Frank Praznik 2016-09-22 1730 hid_info(sc->hdev,
0f3982308b5fc7 Frank Praznik 2016-09-22 1731 "controller with MAC address %pMR already connected\n",
d2d782fccee4f6 Frank Praznik 2014-02-20 1732 sc->mac_address);
0f3982308b5fc7 Frank Praznik 2016-09-22 1733 }
d2d782fccee4f6 Frank Praznik 2014-02-20 1734 goto unlock;
d2d782fccee4f6 Frank Praznik 2014-02-20 1735 }
d2d782fccee4f6 Frank Praznik 2014-02-20 1736 }
d2d782fccee4f6 Frank Praznik 2014-02-20 1737
d2d782fccee4f6 Frank Praznik 2014-02-20 1738 ret = 0;
d2d782fccee4f6 Frank Praznik 2014-02-20 1739 list_add(&(sc->list_node), &sony_device_list);
d2d782fccee4f6 Frank Praznik 2014-02-20 1740
d2d782fccee4f6 Frank Praznik 2014-02-20 1741 unlock:
d2d782fccee4f6 Frank Praznik 2014-02-20 1742 spin_unlock_irqrestore(&sony_dev_list_lock, flags);
d2d782fccee4f6 Frank Praznik 2014-02-20 1743 return ret;
c4e1ddf2680b35 Frank Praznik 2014-01-17 1744 }
c4e1ddf2680b35 Frank Praznik 2014-01-17 1745
:::::: The code at line 1726 was first introduced by commit
:::::: 0f3982308b5fc7373c8d4e6dcfc8a02ee5a3408d HID: sony: Relax duplicate checking for USB-only devices
:::::: TO: Frank Praznik <frank.praznik@gmail.com>
:::::: CC: Jiri Kosina <jkosina@suse.cz>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-16 1:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-16 1:12 [linux-next:master 4344/13038] drivers/hid/hid-sony.c:1726:41: warning: Uninitialized variables: entry.lock, entry.list_node, entry.hdev, entry.touchpad, entry.sensor_dev, entry.quirks, entry.state_worker, entry.send_output_report, entry.battery, entry.battery_desc, entry.device_id, en 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.