Re: [PATCH 2/2] USB: PHY: JZ4770: Add support for Ingenic X1000 and X1830.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi "周琰杰,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on balbi-usb/testing/next]
[also build test WARNING on v5.7]
[cannot apply to usb/usb-testing next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Zhou-Yanjie/Add-USB-PHY-support-for-Ingenic-X1000-and-X1830/20200601-030314
base:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2388a096e7865c043e83ece4e26654bd3d1a20d5)
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
        # 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: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/usb/phy/phy-jz4770.c:267:19: warning: cast to smaller integer type 'enum ingenic_usb_phy_version' from 'const void *' [-Wvoid-pointer-to-enum-cast]
priv->version = (enum ingenic_usb_phy_version)match->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

vim +267 drivers/usb/phy/phy-jz4770.c

   253	
   254	static int jz4770_phy_probe(struct platform_device *pdev)
   255	{
   256		struct device *dev = &pdev->dev;
   257		struct jz4770_phy *priv;
   258		const struct of_device_id *match;
   259		int err;
   260	
   261		priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
   262		if (!priv)
   263			return -ENOMEM;
   264	
   265		match = of_match_device(ingenic_usb_phy_of_matches, dev);
   266		if (match)
 > 267			priv->version = (enum ingenic_usb_phy_version)match->data;
   268		else
   269			return -ENODEV;
   270	
   271		platform_set_drvdata(pdev, priv);
   272		priv->dev = dev;
   273		priv->phy.dev = dev;
   274		priv->phy.otg = &priv->otg;
   275		priv->phy.label = "ingenic-usb-phy";
   276		priv->phy.init = jz4770_phy_init;
   277		priv->phy.shutdown = jz4770_phy_shutdown;
   278	
   279		priv->otg.state = OTG_STATE_UNDEFINED;
   280		priv->otg.usb_phy = &priv->phy;
   281		priv->otg.set_host = jz4770_phy_set_host;
   282		priv->otg.set_peripheral = jz4770_phy_set_peripheral;
   283	
   284		priv->base = devm_platform_ioremap_resource(pdev, 0);
   285		if (IS_ERR(priv->base)) {
   286			dev_err(dev, "Failed to map registers");
   287			return PTR_ERR(priv->base);
   288		}
   289	
   290		priv->clk = devm_clk_get(dev, NULL);
   291		if (IS_ERR(priv->clk)) {
   292			err = PTR_ERR(priv->clk);
   293			if (err != -EPROBE_DEFER)
   294				dev_err(dev, "Failed to get clock");
   295			return err;
   296		}
   297	
   298		priv->vcc_supply = devm_regulator_get(dev, "vcc");
   299		if (IS_ERR(priv->vcc_supply)) {
   300			err = PTR_ERR(priv->vcc_supply);
   301			if (err != -EPROBE_DEFER)
   302				dev_err(dev, "Failed to get regulator");
   303			return err;
   304		}
   305	
   306		err = usb_add_phy(&priv->phy, USB_PHY_TYPE_USB2);
   307		if (err) {
   308			if (err != -EPROBE_DEFER)
   309				dev_err(dev, "Unable to register PHY");
   310			return err;
   311		}
   312	
   313		return devm_add_action_or_reset(dev, jz4770_phy_remove, &priv->phy);
   314	}
   315	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux