Re: [PATCH 4/6] mfd: bcm590xx: Add compatible for BCM59054

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

 



Hi Artur,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1]

url:    https://github.com/intel-lab-lkp/linux/commits/Artur-Weber/dt-bindings-mfd-brcm-bcm59056-Convert-to-YAML/20231031-040046
base:   05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1
patch link:    https://lore.kernel.org/r/20231030-bcm59054-v1-4-3517f980c1e3%40gmail.com
patch subject: [PATCH 4/6] mfd: bcm590xx: Add compatible for BCM59054
config: loongarch-randconfig-001-20231031 (https://download.01.org/0day-ci/archive/20231031/202310311110.QsKHR6Ap-lkp@xxxxxxxxx/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231031/202310311110.QsKHR6Ap-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310311110.QsKHR6Ap-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/mfd/bcm590xx.c: In function 'bcm590xx_i2c_probe':
>> drivers/mfd/bcm590xx.c:53:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      53 |         bcm590xx->device_type = (unsigned int)of_device_get_match_data(bcm590xx->dev);
         |                                 ^


vim +53 drivers/mfd/bcm590xx.c

    39	
    40	static int bcm590xx_i2c_probe(struct i2c_client *i2c_pri)
    41	{
    42		struct bcm590xx *bcm590xx;
    43		int ret;
    44	
    45		bcm590xx = devm_kzalloc(&i2c_pri->dev, sizeof(*bcm590xx), GFP_KERNEL);
    46		if (!bcm590xx)
    47			return -ENOMEM;
    48	
    49		i2c_set_clientdata(i2c_pri, bcm590xx);
    50		bcm590xx->dev = &i2c_pri->dev;
    51		bcm590xx->i2c_pri = i2c_pri;
    52	
  > 53		bcm590xx->device_type = (unsigned int)of_device_get_match_data(bcm590xx->dev);
    54	
    55		bcm590xx->regmap_pri = devm_regmap_init_i2c(i2c_pri,
    56							 &bcm590xx_regmap_config_pri);
    57		if (IS_ERR(bcm590xx->regmap_pri)) {
    58			ret = PTR_ERR(bcm590xx->regmap_pri);
    59			dev_err(&i2c_pri->dev, "primary regmap init failed: %d\n", ret);
    60			return ret;
    61		}
    62	
    63		/* Secondary I2C slave address is the base address with A(2) asserted */
    64		bcm590xx->i2c_sec = i2c_new_dummy_device(i2c_pri->adapter,
    65						  i2c_pri->addr | BIT(2));
    66		if (IS_ERR(bcm590xx->i2c_sec)) {
    67			dev_err(&i2c_pri->dev, "failed to add secondary I2C device\n");
    68			return PTR_ERR(bcm590xx->i2c_sec);
    69		}
    70		i2c_set_clientdata(bcm590xx->i2c_sec, bcm590xx);
    71	
    72		bcm590xx->regmap_sec = devm_regmap_init_i2c(bcm590xx->i2c_sec,
    73							&bcm590xx_regmap_config_sec);
    74		if (IS_ERR(bcm590xx->regmap_sec)) {
    75			ret = PTR_ERR(bcm590xx->regmap_sec);
    76			dev_err(&bcm590xx->i2c_sec->dev,
    77				"secondary regmap init failed: %d\n", ret);
    78			goto err;
    79		}
    80	
    81		ret = devm_mfd_add_devices(&i2c_pri->dev, -1, bcm590xx_devs,
    82					   ARRAY_SIZE(bcm590xx_devs), NULL, 0, NULL);
    83		if (ret < 0) {
    84			dev_err(&i2c_pri->dev, "failed to add sub-devices: %d\n", ret);
    85			goto err;
    86		}
    87	
    88		return 0;
    89	
    90	err:
    91		i2c_unregister_device(bcm590xx->i2c_sec);
    92		return ret;
    93	}
    94	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[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