Re: [PATCH v2 2/3] USB: PHY: JZ4770: Add support for new Ingenic SoCs.

[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 usb/usb-testing robh/for-next v5.8-rc5 next-20200713]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Zhou-Yanjie/Add-USB-PHY-support-for-new-Ingenic-SoCs/20200713-223543
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 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
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: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/usb/phy/phy-jz4770.c:275: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 +275 drivers/usb/phy/phy-jz4770.c

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

---
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