drivers/usb/phy/phy-jz4770.c:278:34: warning: unused variable 'ingenic_usb_phy_of_matches'

From: kernel test robot
Date: Sun Sep 27 2020 - 16:50:10 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 16bc1d5432ebd8e50e480eb300fd2b84afa28286
commit: 2a6c0b82e65128c73b5102e00e031c5e58bb3504 USB: PHY: JZ4770: Add support for new Ingenic SoCs.
date: 9 weeks ago
config: x86_64-randconfig-a011-20200928 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 6d374cf78c8a80a0bbfc7ce9bc80b3f183f44c80)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a6c0b82e65128c73b5102e00e031c5e58bb3504
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2a6c0b82e65128c73b5102e00e031c5e58bb3504
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

drivers/usb/phy/phy-jz4770.c:179:9: warning: variable 'reg' is uninitialized when used here [-Wuninitialized]
writel(reg & ~USBPCR_POR, priv->base + REG_USBPCR_OFFSET);
^~~
drivers/usb/phy/phy-jz4770.c:161:9: note: initialize the variable 'reg' to silence this warning
u32 reg;
^
= 0
>> drivers/usb/phy/phy-jz4770.c:278:34: warning: unused variable 'ingenic_usb_phy_of_matches' [-Wunused-const-variable]
static const struct of_device_id ingenic_usb_phy_of_matches[] = {
^
2 warnings generated.

vim +/ingenic_usb_phy_of_matches +278 drivers/usb/phy/phy-jz4770.c

277
> 278 static const struct of_device_id ingenic_usb_phy_of_matches[] = {
279 { .compatible = "ingenic,jz4770-phy", .data = &jz4770_soc_info },
280 { .compatible = "ingenic,jz4780-phy", .data = &jz4780_soc_info },
281 { .compatible = "ingenic,x1000-phy", .data = &x1000_soc_info },
282 { .compatible = "ingenic,x1830-phy", .data = &x1830_soc_info },
283 { /* sentinel */ }
284 };
285 MODULE_DEVICE_TABLE(of, ingenic_usb_phy_of_matches);
286

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip