[gpio:gpio-descriptors-i2c-core 33/33] drivers/i2c/busses/i2c-imx.c:1015:22: warning: format '%d' expects argument of type 'int', but argument 4 has type 'struct gpio_desc *'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-i2c-core
head:   53fd4b008209b17cb9f77a1b206831032f432462
commit: 53fd4b008209b17cb9f77a1b206831032f432462 [33/33] i2c: core: Use GPIO descriptors for recovery
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 53fd4b008209b17cb9f77a1b206831032f432462
        # save the attached .config to linux build tree
        make.cross ARCH=arm64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/dma-mapping.h:7:0,
                    from drivers/i2c/busses/i2c-imx.c:35:
   drivers/i2c/busses/i2c-imx.c: In function 'i2c_imx_init_recovery_info':
>> drivers/i2c/busses/i2c-imx.c:1015:22: warning: format '%d' expects argument of type 'int', but argument 4 has type 'struct gpio_desc *' [-Wformat=]
     dev_dbg(&pdev->dev, "using scl-gpio %d and sda-gpio %d for recovery\n",
                         ^
       rinfo->scl_gpio, rinfo->sda_gpio);
       ~~~~~~~~           
   include/linux/device.h:1369:31: note: in definition of macro 'dev_dbg'
      dev_printk(KERN_DEBUG, dev, format, ##arg); \
                                  ^~~~~~
   drivers/i2c/busses/i2c-imx.c:1015:22: warning: format '%d' expects argument of type 'int', but argument 5 has type 'struct gpio_desc *' [-Wformat=]
     dev_dbg(&pdev->dev, "using scl-gpio %d and sda-gpio %d for recovery\n",
                         ^
       rinfo->scl_gpio, rinfo->sda_gpio);
                        ~~~~~~~~
   include/linux/device.h:1369:31: note: in definition of macro 'dev_dbg'
      dev_printk(KERN_DEBUG, dev, format, ##arg); \
                                  ^~~~~~

vim +1015 drivers/i2c/busses/i2c-imx.c

1c4b6c3b Gao Pan        2015-10-23   985  
fd8961c5 Yang Li        2016-09-12   986  /*
fd8961c5 Yang Li        2016-09-12   987   * We switch SCL and SDA to their GPIO function and do some bitbanging
fd8961c5 Yang Li        2016-09-12   988   * for bus recovery. These alternative pinmux settings can be
fd8961c5 Yang Li        2016-09-12   989   * described in the device tree by a separate pinctrl state "gpio". If
fd8961c5 Yang Li        2016-09-12   990   * this is missing this is not a big problem, the only implication is
fd8961c5 Yang Li        2016-09-12   991   * that we can't do bus recovery.
fd8961c5 Yang Li        2016-09-12   992   */
fd8961c5 Yang Li        2016-09-12   993  static int i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx,
1c4b6c3b Gao Pan        2015-10-23   994  		struct platform_device *pdev)
1c4b6c3b Gao Pan        2015-10-23   995  {
1c4b6c3b Gao Pan        2015-10-23   996  	struct i2c_bus_recovery_info *rinfo = &i2c_imx->rinfo;
1c4b6c3b Gao Pan        2015-10-23   997  
fd8961c5 Yang Li        2016-09-12   998  	i2c_imx->pinctrl = devm_pinctrl_get(&pdev->dev);
fd8961c5 Yang Li        2016-09-12   999  	if (!i2c_imx->pinctrl || IS_ERR(i2c_imx->pinctrl)) {
fd8961c5 Yang Li        2016-09-12  1000  		dev_info(&pdev->dev, "can't get pinctrl, bus recovery not supported\n");
fd8961c5 Yang Li        2016-09-12  1001  		return PTR_ERR(i2c_imx->pinctrl);
fd8961c5 Yang Li        2016-09-12  1002  	}
fd8961c5 Yang Li        2016-09-12  1003  
1c4b6c3b Gao Pan        2015-10-23  1004  	i2c_imx->pinctrl_pins_default = pinctrl_lookup_state(i2c_imx->pinctrl,
1c4b6c3b Gao Pan        2015-10-23  1005  			PINCTRL_STATE_DEFAULT);
1c4b6c3b Gao Pan        2015-10-23  1006  	i2c_imx->pinctrl_pins_gpio = pinctrl_lookup_state(i2c_imx->pinctrl,
1c4b6c3b Gao Pan        2015-10-23  1007  			"gpio");
53fd4b00 Linus Walleij  2017-12-08  1008  
53fd4b00 Linus Walleij  2017-12-08  1009  	if (IS_ERR(i2c_imx->pinctrl_pins_default) ||
1c4b6c3b Gao Pan        2015-10-23  1010  		   IS_ERR(i2c_imx->pinctrl_pins_gpio)) {
1c4b6c3b Gao Pan        2015-10-23  1011  		dev_dbg(&pdev->dev, "recovery information incomplete\n");
fd8961c5 Yang Li        2016-09-12  1012  		return 0;
1c4b6c3b Gao Pan        2015-10-23  1013  	}
1c4b6c3b Gao Pan        2015-10-23  1014  
1c4b6c3b Gao Pan        2015-10-23 @1015  	dev_dbg(&pdev->dev, "using scl-gpio %d and sda-gpio %d for recovery\n",
eba523b4 Clemens Gruber 2017-10-09  1016  			rinfo->scl_gpio, rinfo->sda_gpio);
1c4b6c3b Gao Pan        2015-10-23  1017  
1c4b6c3b Gao Pan        2015-10-23  1018  	rinfo->prepare_recovery = i2c_imx_prepare_recovery;
1c4b6c3b Gao Pan        2015-10-23  1019  	rinfo->unprepare_recovery = i2c_imx_unprepare_recovery;
1c4b6c3b Gao Pan        2015-10-23  1020  	rinfo->recover_bus = i2c_generic_gpio_recovery;
1c4b6c3b Gao Pan        2015-10-23  1021  	i2c_imx->adapter.bus_recovery_info = rinfo;
fd8961c5 Yang Li        2016-09-12  1022  
fd8961c5 Yang Li        2016-09-12  1023  	return 0;
1c4b6c3b Gao Pan        2015-10-23  1024  }
1c4b6c3b Gao Pan        2015-10-23  1025  

:::::: The code at line 1015 was first introduced by commit
:::::: 1c4b6c3bcf30d0804db0d0647d8ebeb862c6f7e5 i2c: imx: implement bus recovery

:::::: TO: Gao Pan <b54642@xxxxxxxxxxxxx>
:::::: CC: Wolfram Sang <wsa@xxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux