Re: [PATCH v7 1/2] i2c: i2c-mlxbf: I2C SMBus driver for Mellanox BlueField SoC

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

 



Hi Khalil,

I love your patch! Yet something to improve:

[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on robh/for-next linus/master v5.6-rc7 next-20200325]
[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/Khalil-Blaiech/i2c-add-driver-for-Mellanox-BlueField-SoC/20200326-052624
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=9.2.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/i2c/busses/i2c-mlxbf.c: In function 'mlxbf_i2c_get_gpio':
   drivers/i2c/busses/i2c-mlxbf.c:1288:17: error: implicit declaration of function 'devm_ioremap_nocache'; did you mean 'devm_ioremap_release'? [-Werror=implicit-function-declaration]
    1288 |  gpio_res->io = devm_ioremap_nocache(dev, params->start, size);
         |                 ^~~~~~~~~~~~~~~~~~~~
         |                 devm_ioremap_release
   drivers/i2c/busses/i2c-mlxbf.c:1288:15: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1288 |  gpio_res->io = devm_ioremap_nocache(dev, params->start, size);
         |               ^
   drivers/i2c/busses/i2c-mlxbf.c: In function 'mlxbf_i2c_get_corepll':
   drivers/i2c/busses/i2c-mlxbf.c:1353:18: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1353 |  corepll_res->io = devm_ioremap_nocache(dev, params->start, size);
         |                  ^
   drivers/i2c/busses/i2c-mlxbf.c: In function 'mlxbf_i2c_init_coalesce':
>> drivers/i2c/busses/i2c-mlxbf.c:1755:22: error: implicit declaration of function 'ioremap_nocache' [-Werror=implicit-function-declaration]
    1755 |   coalesce_res->io = ioremap_nocache(params->start, size);
         |                      ^~~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-mlxbf.c:1755:20: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1755 |   coalesce_res->io = ioremap_nocache(params->start, size);
         |                    ^
   drivers/i2c/busses/i2c-mlxbf.c: In function 'mlxbf_i2c_acpi_probe':
   drivers/i2c/busses/i2c-mlxbf.c:2296:8: error: implicit declaration of function 'acpi_device_uid'; did you mean 'dmi_device_id'? [-Werror=implicit-function-declaration]
    2296 |  uid = acpi_device_uid(adev);
         |        ^~~~~~~~~~~~~~~
         |        dmi_device_id
   drivers/i2c/busses/i2c-mlxbf.c:2296:6: warning: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    2296 |  uid = acpi_device_uid(adev);
         |      ^
   drivers/i2c/busses/i2c-mlxbf.c: In function 'mlxbf_smbus_irq_send':
   drivers/i2c/busses/i2c-mlxbf.c:1910:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
    1910 |    byte = (data32 >> 8) & GENMASK(7, 0);
   drivers/i2c/busses/i2c-mlxbf.c:1911:3: note: here
    1911 |   case 1: /* Fall-through. */
         |   ^~~~
   In file included from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/kobject.h:19,
                    from include/linux/of.h:17,
                    from include/linux/irqdomain.h:35,
                    from include/linux/acpi.h:13,
                    from drivers/i2c/busses/i2c-mlxbf.c:8:
   drivers/i2c/busses/i2c-mlxbf.c: In function 'mlxbf_i2c_init_timings':
   include/linux/printk.h:306:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
     306 |  printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-mlxbf.c:1238:3: note: in expansion of macro 'pr_warn'
    1238 |   pr_warn("Illegal value %d: defaulting to 100 KHz\n",
         |   ^~~~~~~
   drivers/i2c/busses/i2c-mlxbf.c:1241:2: note: here
    1241 |  case MLXBF_I2C_TIMING_100KHZ: /* Fall-through. */
         |  ^~~~
   cc1: some warnings being treated as errors

vim +/ioremap_nocache +1755 drivers/i2c/busses/i2c-mlxbf.c

  1717	
  1718	static int mlxbf_i2c_init_coalesce(struct platform_device *pdev,
  1719					   struct mlxbf_i2c_priv *priv)
  1720	{
  1721		struct mlxbf_i2c_resource *coalesce_res;
  1722		struct resource *params;
  1723		resource_size_t size;
  1724		int ret = 0;
  1725	
  1726		/*
  1727		 * Unlike BlueField-1 platform, the coalesce registers is a dedicated
  1728		 * resource in the next generations of BlueField.
  1729		 */
  1730		if (mlxbf_i2c_has_chip_type(priv, MLXBF_I2C_CHIP_TYPE_1)) {
  1731			coalesce_res = mlxbf_i2c_get_shared_resource(priv,
  1732							MLXBF_I2C_COALESCE_RES);
  1733			if (!coalesce_res)
  1734				return -EPERM;
  1735	
  1736			/*
  1737			 * The Cause Coalesce group in TYU space is shared among
  1738			 * I2C busses. This function MUST be serialized to avoid
  1739			 * racing when claiming the memory region.
  1740			 */
  1741			lockdep_assert_held(mlxbf_i2c_gpio_res->lock);
  1742	
  1743			/* Check whether the memory map exist. */
  1744			if (coalesce_res->io) {
  1745				priv->coalesce = coalesce_res;
  1746				return 0;
  1747			}
  1748	
  1749			params = coalesce_res->params;
  1750			size = resource_size(params);
  1751	
  1752			if (!request_mem_region(params->start, size, params->name))
  1753				return -EFAULT;
  1754	
> 1755			coalesce_res->io = ioremap_nocache(params->start, size);
  1756			if (IS_ERR(coalesce_res->io)) {
  1757				release_mem_region(params->start, size);
  1758				return PTR_ERR(coalesce_res->io);
  1759			}
  1760	
  1761			priv->coalesce = coalesce_res;
  1762	
  1763		} else {
  1764			ret = mlxbf_i2c_init_resource(pdev, &priv->coalesce,
  1765						      MLXBF_I2C_COALESCE_RES);
  1766		}
  1767	
  1768		return ret;
  1769	}
  1770	

---
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]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux