Re: [PATCH v11 2/2] phy: samsung-ufs: add UFS PHY driver for samsung SoC

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

 



Hi Alim,

I love your patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on soc/for-next linus/master v5.8-rc3 next-20200702]
[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/Alim-Akhtar/dt-bindings-phy-Document-Samsung-UFS-PHY-bindings/20200703-104336
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project ca464639a1c9dd3944eb055ffd2796e8c2e7639f)
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/phy/samsung/phy-samsung-ufs.c:150:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (IS_ERR(phy->rx0_symbol_clk)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/phy/samsung/phy-samsung-ufs.c:173:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/phy/samsung/phy-samsung-ufs.c:150:2: note: remove the 'if' if its condition is always false
           if (IS_ERR(phy->rx0_symbol_clk)) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/phy/samsung/phy-samsung-ufs.c:144:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (IS_ERR(phy->rx0_symbol_clk)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/phy/samsung/phy-samsung-ufs.c:173:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/phy/samsung/phy-samsung-ufs.c:144:2: note: remove the 'if' if its condition is always false
           if (IS_ERR(phy->rx0_symbol_clk)) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/phy/samsung/phy-samsung-ufs.c:138:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (IS_ERR(phy->tx0_symbol_clk)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/phy/samsung/phy-samsung-ufs.c:173:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/phy/samsung/phy-samsung-ufs.c:138:2: note: remove the 'if' if its condition is always false
           if (IS_ERR(phy->tx0_symbol_clk)) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/phy/samsung/phy-samsung-ufs.c:135:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   3 warnings generated.

vim +150 drivers/phy/samsung/phy-samsung-ufs.c

   132	
   133	static int samsung_ufs_phy_symbol_clk_init(struct samsung_ufs_phy *phy)
   134	{
   135		int ret;
   136	
   137		phy->tx0_symbol_clk = devm_clk_get(phy->dev, "tx0_symbol_clk");
   138		if (IS_ERR(phy->tx0_symbol_clk)) {
   139			dev_err(phy->dev, "failed to get tx0_symbol_clk clock\n");
   140			goto out;
   141		}
   142	
   143		phy->rx0_symbol_clk = devm_clk_get(phy->dev, "rx0_symbol_clk");
   144		if (IS_ERR(phy->rx0_symbol_clk)) {
   145			dev_err(phy->dev, "failed to get rx0_symbol_clk clock\n");
   146			goto out;
   147		}
   148	
   149		phy->rx1_symbol_clk = devm_clk_get(phy->dev, "rx1_symbol_clk");
 > 150		if (IS_ERR(phy->rx0_symbol_clk)) {
   151			dev_err(phy->dev, "failed to get rx1_symbol_clk clock\n");
   152			goto out;
   153		}
   154	
   155		ret = clk_prepare_enable(phy->tx0_symbol_clk);
   156		if (ret) {
   157			dev_err(phy->dev, "%s: tx0_symbol_clk enable failed %d\n", __func__, ret);
   158			goto out;
   159		}
   160		ret = clk_prepare_enable(phy->rx0_symbol_clk);
   161		if (ret) {
   162			dev_err(phy->dev, "%s: rx0_symbol_clk enable failed %d\n", __func__, ret);
   163			clk_disable_unprepare(phy->tx0_symbol_clk);
   164			goto out;
   165		}
   166		ret = clk_prepare_enable(phy->rx1_symbol_clk);
   167		if (ret) {
   168			dev_err(phy->dev, "%s: rx1_symbol_clk enable failed %d\n", __func__, ret);
   169			clk_disable_unprepare(phy->tx0_symbol_clk);
   170			clk_disable_unprepare(phy->rx0_symbol_clk);
   171		}
   172	out:
   173		return ret;
   174	}
   175	

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