* [android-common:android14-kiwi-6.1 336/336] drivers/usb/dwc3/core.c:771:22: warning: variable 'hw_mode' set but not used
@ 2026-10-19 0:40 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-19 0:40 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
tree: https://android.googlesource.com/kernel/common android14-kiwi-6.1
head: 85239205a20932568f405bb06f7dc3187e755674
commit: 9f49b974c86db9070c108e904ead1aadddb7e5a6 [336/336] BACKPORT: usb: dwc3: core: Refactor PHY logic to support Multiport Controller
config: arm64-randconfig-2000-20261018 (https://download.01.org/0day-ci/archive/20261019/202610190223.ldkcTCV3-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261019/202610190223.ldkcTCV3-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610190223.ldkcTCV3-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/usb/dwc3/core.c: In function 'dwc3_hs_phy_setup':
>> drivers/usb/dwc3/core.c:771:22: warning: variable 'hw_mode' set but not used [-Wunused-but-set-variable]
771 | unsigned int hw_mode;
| ^~~~~~~
vim +/hw_mode +771 drivers/usb/dwc3/core.c
768
769 static int dwc3_hs_phy_setup(struct dwc3 *dwc, int index)
770 {
> 771 unsigned int hw_mode;
772 u32 reg;
773
774 hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
775 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(index));
776
777 /* Select the HS PHY interface */
778 switch (DWC3_GHWPARAMS3_HSPHY_IFC(dwc->hwparams.hwparams3)) {
779 case DWC3_GHWPARAMS3_HSPHY_IFC_UTMI_ULPI:
780 if (dwc->hsphy_interface &&
781 !strncmp(dwc->hsphy_interface, "utmi", 4)) {
782 reg &= ~DWC3_GUSB2PHYCFG_ULPI_UTMI;
783 break;
784 } else if (dwc->hsphy_interface &&
785 !strncmp(dwc->hsphy_interface, "ulpi", 4)) {
786 reg |= DWC3_GUSB2PHYCFG_ULPI_UTMI;
787 dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(index), reg);
788 } else {
789 /* Relying on default value. */
790 if (!(reg & DWC3_GUSB2PHYCFG_ULPI_UTMI))
791 break;
792 }
793 fallthrough;
794 case DWC3_GHWPARAMS3_HSPHY_IFC_ULPI:
795 default:
796 break;
797 }
798
799 switch (dwc->hsphy_mode) {
800 case USBPHY_INTERFACE_MODE_UTMI:
801 reg &= ~(DWC3_GUSB2PHYCFG_PHYIF_MASK |
802 DWC3_GUSB2PHYCFG_USBTRDTIM_MASK);
803 reg |= DWC3_GUSB2PHYCFG_PHYIF(UTMI_PHYIF_8_BIT) |
804 DWC3_GUSB2PHYCFG_USBTRDTIM(USBTRDTIM_UTMI_8_BIT);
805 break;
806 case USBPHY_INTERFACE_MODE_UTMIW:
807 reg &= ~(DWC3_GUSB2PHYCFG_PHYIF_MASK |
808 DWC3_GUSB2PHYCFG_USBTRDTIM_MASK);
809 reg |= DWC3_GUSB2PHYCFG_PHYIF(UTMI_PHYIF_16_BIT) |
810 DWC3_GUSB2PHYCFG_USBTRDTIM(USBTRDTIM_UTMI_16_BIT);
811 break;
812 default:
813 break;
814 }
815
816 /*
817 * Above DWC_usb3.0 1.94a, it is recommended to set
818 * DWC3_GUSB2PHYCFG_SUSPHY to '0' during coreConsultant configuration.
819 * So default value will be '0' when the core is reset. Application
820 * needs to set it to '1' after the core initialization is completed.
821 *
822 * Similarly for DRD controllers, GUSB2PHYCFG.SUSPHY must be cleared
823 * after power-on reset, and it can be set after core initialization.
824 */
825 reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
826
827 if (dwc->dis_enblslpm_quirk)
828 reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM;
829 else
830 reg |= DWC3_GUSB2PHYCFG_ENBLSLPM;
831
832 if (dwc->dis_u2_freeclk_exists_quirk || dwc->gfladj_refclk_lpm_sel)
833 reg &= ~DWC3_GUSB2PHYCFG_U2_FREECLK_EXISTS;
834
835 dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(index), reg);
836
837 return 0;
838 }
839
--
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-10-19 0:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 0:40 [android-common:android14-kiwi-6.1 336/336] drivers/usb/dwc3/core.c:771:22: warning: variable 'hw_mode' set but not used 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.