Re: [PATCH v4 3/5] phy: realtek: usb: Add driver for the Realtek SoC USB 3.0 PHY

From: kernel test robot
Date: Wed Jun 14 2023 - 12:17:10 EST


Hi Stanley,

kernel test robot noticed the following build warnings:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus robh/for-next linus/master v6.4-rc6 next-20230614]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Stanley-Chang/phy-realtek-usb-Add-driver-for-the-Realtek-SoC-USB-2-0-PHY/20230614-173349
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20230614092850.21460-3-stanley_chang%40realtek.com
patch subject: [PATCH v4 3/5] phy: realtek: usb: Add driver for the Realtek SoC USB 3.0 PHY
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230614/202306142340.nvui81i4-lkp@xxxxxxxxx/config)
compiler: sparc64-linux-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
git fetch usb usb-testing
git checkout usb/usb-testing
b4 shazam https://lore.kernel.org/r/20230614092850.21460-3-stanley_chang@xxxxxxxxxxx
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=sparc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/phy/realtek/

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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306142340.nvui81i4-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/phy/realtek/phy-rtk-usb3.c: In function 'rtk_usb3phy_probe':
>> drivers/phy/realtek/phy-rtk-usb3.c:779:29: warning: variable 'node' set but not used [-Wunused-but-set-variable]
779 | struct device_node *node;
| ^~~~


vim +/node +779 drivers/phy/realtek/phy-rtk-usb3.c

774
775 static int rtk_usb3phy_probe(struct platform_device *pdev)
776 {
777 struct rtk_phy *rtk_phy;
778 struct device *dev = &pdev->dev;
> 779 struct device_node *node;
780 struct phy *generic_phy;
781 struct phy_provider *phy_provider;
782 const struct phy_cfg *phy_cfg;
783 int ret;
784
785 phy_cfg = of_device_get_match_data(dev);
786 if (!phy_cfg) {
787 dev_err(dev, "phy config are not assigned!\n");
788 return -EINVAL;
789 }
790
791 rtk_phy = devm_kzalloc(dev, sizeof(*rtk_phy), GFP_KERNEL);
792 if (!rtk_phy)
793 return -ENOMEM;
794
795 rtk_phy->dev = &pdev->dev;
796 rtk_phy->phy.dev = rtk_phy->dev;
797 rtk_phy->phy.label = "rtk-usb3phy";
798 rtk_phy->phy.notify_port_status = rtk_phy_notify_port_status;
799
800 rtk_phy->phy_cfg = devm_kzalloc(dev, sizeof(*phy_cfg), GFP_KERNEL);
801
802 memcpy(rtk_phy->phy_cfg, phy_cfg, sizeof(*phy_cfg));
803
804 node = dev->of_node;
805
806 rtk_phy->num_phy = 1;
807
808 ret = parse_phy_data(rtk_phy);
809 if (ret)
810 goto err;
811
812 platform_set_drvdata(pdev, rtk_phy);
813
814 generic_phy = devm_phy_create(rtk_phy->dev, NULL, &ops);
815 if (IS_ERR(generic_phy))
816 return PTR_ERR(generic_phy);
817
818 phy_set_drvdata(generic_phy, rtk_phy);
819
820 phy_provider = devm_of_phy_provider_register(rtk_phy->dev, of_phy_simple_xlate);
821 if (IS_ERR(phy_provider))
822 return PTR_ERR(phy_provider);
823
824 ret = usb_add_phy_dev(&rtk_phy->phy);
825 if (ret)
826 goto err;
827
828 create_debug_files(rtk_phy);
829
830 err:
831 return ret;
832 }
833

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki