Re: [PATCH v3 17/23] mfd: add s2dos series core driver

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

 



Hi Dzmitry,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 6906a84c482f098d31486df8dc98cead21cce2d0]

url:    https://github.com/intel-lab-lkp/linux/commits/Dzmitry-Sankouski/power-supply-add-undervoltage-health-status-property/20240618-222456
base:   6906a84c482f098d31486df8dc98cead21cce2d0
patch link:    https://lore.kernel.org/r/20240618-starqltechn_integration_upstream-v3-17-e3f6662017ac%40gmail.com
patch subject: [PATCH v3 17/23] mfd: add s2dos series core driver
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20240622/202406220455.UpxNyPhg-lkp@xxxxxxxxx/config)
compiler: mips-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240622/202406220455.UpxNyPhg-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/202406220455.UpxNyPhg-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/mfd/s2dos-core.c: In function 's2dos05_i2c_probe':
>> drivers/mfd/s2dos-core.c:88:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      88 |         int ret = 0;
         |             ^~~


vim +/ret +88 drivers/mfd/s2dos-core.c

    79	
    80	
    81	static int s2dos05_i2c_probe(struct i2c_client *i2c)
    82	{
    83		struct s2dos_core *s2dos05;
    84		struct regmap *regmap;
    85		struct device *dev = &i2c->dev;
    86	
    87		unsigned int reg_data;
  > 88		int ret = 0;
    89	
    90		s2dos05 = kzalloc(sizeof(struct s2dos_core), GFP_KERNEL);
    91		if (!s2dos05)
    92			return -ENOMEM;
    93	
    94		regmap = devm_regmap_init_i2c(i2c, &s2dos05_regmap_config);
    95		if (IS_ERR(regmap)) {
    96			dev_err(dev, "Unable to initialise I2C Regmap\n");
    97			return PTR_ERR(regmap);
    98		}
    99		s2dos05->regmap = regmap;
   100	
   101		if (regmap_read(regmap, S2DOS05_REG_DEV_ID, &reg_data) < 0) {
   102			dev_err(dev,
   103				"device not found on this channel (this is not an error)\n");
   104			ret = -ENODEV;
   105		} else {
   106			dev_info(dev, "%s device found with id: .0x%x\n",
   107					__func__, reg_data);
   108		}
   109	
   110		i2c_set_clientdata(i2c, s2dos05);
   111	
   112		debugfs_file = debugfs_create_file("s2dos05-regs",
   113					0664, NULL, (void *)s2dos05,
   114					  &s2dos05_debugfs_fops);
   115		if (!debugfs_file)
   116			dev_err(dev, "Failed to create debugfs file\n");
   117	
   118		return mfd_add_devices(dev, -1, s2dos05_devs,
   119				ARRAY_SIZE(s2dos05_devs), NULL, 0, NULL);
   120	}
   121	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux