Re: [PATCH v7 3/7] mfd: Add new driver for MAX77705 PMIC

[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 63b3ff03d91ae8f875fe8747c781a521f78cde17]

url:    https://github.com/intel-lab-lkp/linux/commits/Dzmitry-Sankouski/power-supply-add-undervoltage-health-status-property/20241024-034645
base:   63b3ff03d91ae8f875fe8747c781a521f78cde17
patch link:    https://lore.kernel.org/r/20241023-starqltechn_integration_upstream-v7-3-9bfaa3f4a1a0%40gmail.com
patch subject: [PATCH v7 3/7] mfd: Add new driver for MAX77705 PMIC
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20241026/202410262035.of6zMB8v-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241026/202410262035.of6zMB8v-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/202410262035.of6zMB8v-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/mfd/max77705.c: In function 'max77705_i2c_probe':
>> drivers/mfd/max77705.c:107:12: warning: variable 'pmic_ver' set but not used [-Wunused-but-set-variable]
     107 |         u8 pmic_ver, pmic_rev;
         |            ^~~~~~~~


vim +/pmic_ver +107 drivers/mfd/max77705.c

    99	
   100	static int max77705_i2c_probe(struct i2c_client *i2c)
   101	{
   102		struct max77693_dev *max77705;
   103		struct regmap_irq_chip_data *irq_data;
   104		struct irq_domain *domain;
   105		int ret;
   106		unsigned int pmic_rev_value;
 > 107		u8 pmic_ver, pmic_rev;
   108	
   109	
   110		max77705 = devm_kzalloc(&i2c->dev, sizeof(*max77705), GFP_KERNEL);
   111		if (!max77705)
   112			return -ENOMEM;
   113	
   114		max77705->i2c = i2c;
   115		max77705->dev = &i2c->dev;
   116		max77705->irq = i2c->irq;
   117		max77705->type = TYPE_MAX77705;
   118		i2c_set_clientdata(i2c, max77705);
   119	
   120		max77705->regmap = devm_regmap_init_i2c(i2c, &max77705_regmap_config);
   121	
   122		if (IS_ERR(max77705->regmap))
   123			return PTR_ERR(max77705->regmap);
   124	
   125		if (regmap_read(max77705->regmap, MAX77705_PMIC_REG_PMICREV, &pmic_rev_value) < 0)
   126			return -ENODEV;
   127	
   128		pmic_rev = pmic_rev_value & MAX77705_REVISION_MASK;
   129		pmic_ver = (pmic_rev_value & MAX77705_VERSION_MASK) >> MAX77705_VERSION_SHIFT;
   130	
   131		if (pmic_rev != MAX77705_PASS3) {
   132			dev_err(max77705->dev, "rev.0x%x is not tested",
   133				pmic_rev);
   134			return -ENODEV;
   135		}
   136	
   137		max77705->regmap_leds = devm_regmap_init_i2c(i2c, &max77705_leds_regmap_config);
   138	
   139		if (IS_ERR(max77705->regmap_leds))
   140			return PTR_ERR(max77705->regmap_leds);
   141	
   142		ret = devm_regmap_add_irq_chip(max77705->dev, max77705->regmap,
   143						max77705->irq,
   144						IRQF_ONESHOT | IRQF_SHARED, 0,
   145						&max77705_topsys_irq_chip,
   146						&irq_data);
   147	
   148		if (ret)
   149			dev_err(max77705->dev, "failed to add irq chip: %d\n", ret);
   150	
   151		/* Unmask interrupts from all blocks in interrupt source register */
   152		ret = regmap_update_bits(max77705->regmap,
   153					 MAX77705_PMIC_REG_INTSRC_MASK,
   154					 MAX77705_SRC_IRQ_ALL, (unsigned int)~MAX77705_SRC_IRQ_ALL);
   155	
   156		if (ret < 0) {
   157			dev_err(max77705->dev,
   158				"Could not unmask interrupts in INTSRC: %d\n", ret);
   159			return ret;
   160		}
   161	
   162		domain = regmap_irq_get_domain(irq_data);
   163	
   164		ret = devm_mfd_add_devices(max77705->dev, PLATFORM_DEVID_NONE,
   165					   max77705_devs, ARRAY_SIZE(max77705_devs),
   166					   NULL, 0, domain);
   167	
   168		if (ret) {
   169			dev_err(max77705->dev, "Failed to register child devices: %d\n", ret);
   170			return ret;
   171		}
   172	
   173		device_init_wakeup(max77705->dev, true);
   174	
   175		return 0;
   176	}
   177	

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