drivers/usb/core/port.c:870:28: warning: unused variable 'hdev'

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://github.com/intel-lab-lkp/linux/commits/Chen-Yu-Tsai/device-property-Add-fwnode_graph_get_port_by_id/20260810-180652
head:   20b35e3024ac4ade79a06edafe28ac1c11fbfa39
commit: 056bd785ec4c37b778ebd000fc1ead535aa7ed99 usb: hub: Associate port@ fwnode with USB port device
date:   4 days ago
config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20260814/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260814/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

   drivers/usb/core/port.c: In function 'usb_hub_remove_port_device':
>> drivers/usb/core/port.c:870:28: warning: unused variable 'hdev' [-Wunused-variable]
     870 |         struct usb_device *hdev = hub->hdev;
         |                            ^~~~


vim +/hdev +870 drivers/usb/core/port.c

   867	
   868	void usb_hub_remove_port_device(struct usb_hub *hub, int port1)
   869	{
 > 870		struct usb_device *hdev = hub->hdev;

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.