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: sh-allmodconfig (attached as .config)
compiler: sh4-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=sh 

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

All error/warnings (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'; did you mean 'ioremap_cache'? [-Werror=implicit-function-declaration]
    1755 |   coalesce_res->io = ioremap_nocache(params->start, size);
         |                      ^~~~~~~~~~~~~~~
         |                      ioremap_cache
   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 +1288 drivers/i2c/busses/i2c-mlxbf.c

  1221	
  1222	static int mlxbf_i2c_init_timings(struct platform_device *pdev,
  1223					  struct mlxbf_i2c_priv *priv)
  1224	{
  1225		enum mlxbf_i2c_timings_config config_idx;
  1226		struct device *dev = &pdev->dev;
  1227		u32 config_khz;
  1228	
  1229		int ret;
  1230	
  1231		ret = device_property_read_u32(dev, "clock-frequency", &config_khz);
  1232		if (ret < 0)
  1233			config_khz = MLXBF_I2C_TIMING_100KHZ;
  1234	
  1235		switch (config_khz) {
  1236		default:
  1237			/* Default settings is 100 KHz. */
> 1238			pr_warn("Illegal value %d: defaulting to 100 KHz\n",
  1239				config_khz);
  1240	
  1241		case MLXBF_I2C_TIMING_100KHZ: /* Fall-through. */
  1242			config_idx = MLXBF_I2C_TIMING_CONFIG_100KHZ;
  1243			break;
  1244	
  1245		case MLXBF_I2C_TIMING_400KHZ:
  1246			config_idx = MLXBF_I2C_TIMING_CONFIG_400KHZ;
  1247			break;
  1248	
  1249		case MLXBF_I2C_TIMING_1000KHZ:
  1250			config_idx = MLXBF_I2C_TIMING_CONFIG_1000KHZ;
  1251			break;
  1252		}
  1253	
  1254		mlxbf_i2c_set_timings(priv, &mlxbf_i2c_timings[config_idx]);
  1255	
  1256		return 0;
  1257	}
  1258	
  1259	static int mlxbf_i2c_get_gpio(struct platform_device *pdev,
  1260				      struct mlxbf_i2c_priv *priv)
  1261	{
  1262		struct mlxbf_i2c_resource *gpio_res;
  1263		struct device *dev = &pdev->dev;
  1264		struct resource	*params;
  1265		resource_size_t size;
  1266	
  1267		gpio_res = mlxbf_i2c_get_shared_resource(priv, MLXBF_I2C_GPIO_RES);
  1268		if (!gpio_res)
  1269			return -EPERM;
  1270	
  1271		/*
  1272		 * The GPIO region in TYU space is shared among I2C busses.
  1273		 * This function MUST be serialized to avoid racing when
  1274		 * claiming the memory region and/or setting up the GPIO.
  1275		 */
  1276		lockdep_assert_held(gpio_res->lock);
  1277	
  1278		/* Check whether the memory map exist. */
  1279		if (gpio_res->io)
  1280			return 0;
  1281	
  1282		params = gpio_res->params;
  1283		size = resource_size(params);
  1284	
  1285		if (!devm_request_mem_region(dev, params->start, size, params->name))
  1286			return -EFAULT;
  1287	
> 1288		gpio_res->io = devm_ioremap_nocache(dev, params->start, size);
  1289		if (IS_ERR(gpio_res->io)) {
  1290			devm_release_mem_region(dev, params->start, size);
  1291			return PTR_ERR(gpio_res->io);
  1292		}
  1293	
  1294		return 0;
  1295	}
  1296	

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