lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209241430.fnAxHuJJ-lkp@intel.com>
Date:   Sat, 24 Sep 2022 14:14:24 +0800
From:   kernel test robot <lkp@...el.com>
To:     Johan Hovold <johan+linaro@...nel.org>
Cc:     kbuild-all@...ts.01.org, Ammar Faizi <ammarfaizi2@...weeb.org>,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org, Sasha Levin <sashal@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [ammarfaizi2-block:stable/linux-stable-rc/queue/5.19 22/55]
 drivers/usb/dwc3/dwc3-qcom.c:313:25: warning: variable 'hcd' set but not
 used

tree:   https://github.com/ammarfaizi2/linux-block stable/linux-stable-rc/queue/5.19
head:   9888f771c3a964ede02767e7e913ede0d1d44f0e
commit: 5ab225779048df7ccd018b7876f403ca32cef423 [22/55] usb: dwc3: qcom: fix peripheral and OTG suspend
config: csky-allmodconfig
compiler: csky-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/ammarfaizi2/linux-block/commit/5ab225779048df7ccd018b7876f403ca32cef423
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block stable/linux-stable-rc/queue/5.19
        git checkout 5ab225779048df7ccd018b7876f403ca32cef423
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=csky SHELL=/bin/bash drivers/usb/dwc3/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/usb/dwc3/dwc3-qcom.c: In function 'dwc3_qcom_read_usb2_speed':
>> drivers/usb/dwc3/dwc3-qcom.c:313:25: warning: variable 'hcd' set but not used [-Wunused-but-set-variable]
     313 |         struct usb_hcd *hcd;
         |                         ^~~


vim +/hcd +313 drivers/usb/dwc3/dwc3-qcom.c

   308	
   309	static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom)
   310	{
   311		struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3);
   312		struct usb_device *udev;
 > 313		struct usb_hcd *hcd;
   314	
   315		/*
   316		 * FIXME: Fix this layering violation.
   317		 */
   318		hcd = platform_get_drvdata(dwc->xhci);
   319	
   320		/*
   321		 * It is possible to query the speed of all children of
   322		 * USB2.0 root hub via usb_hub_for_each_child(). DWC3 code
   323		 * currently supports only 1 port per controller. So
   324		 * this is sufficient.
   325		 */
   326	#ifdef CONFIG_USB
   327		udev = usb_hub_find_child(hcd->self.root_hub, 1);
   328	#else
   329		udev = NULL;
   330	#endif
   331		if (!udev)
   332			return USB_SPEED_UNKNOWN;
   333	
   334		return udev->speed;
   335	}
   336	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (302333 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ