Re: [PATCH v4 11/27] power: supply: max77705: Add charger driver for Maxim 77705

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

 



Hi Dzmitry,

kernel test robot noticed the following build errors:

[auto build test ERROR on 5acd9952f95fb4b7da6d09a3be39195a80845eb6]

url:    https://github.com/intel-lab-lkp/linux/commits/Dzmitry-Sankouski/power-supply-add-undervoltage-health-status-property/20240913-231027
base:   5acd9952f95fb4b7da6d09a3be39195a80845eb6
patch link:    https://lore.kernel.org/r/20240913-starqltechn_integration_upstream-v4-11-2d2efd5c5877%40gmail.com
patch subject: [PATCH v4 11/27] power: supply: max77705: Add charger driver for Maxim 77705
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240914/202409141322.ptabmnJ9-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240914/202409141322.ptabmnJ9-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/202409141322.ptabmnJ9-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/power/supply/max77705_charger.c: In function 'max77705_charger_probe':
>> drivers/power/supply/max77705_charger.c:523:48: error: assignment of member 'irq_drv_data' in read-only object
     523 |         max77705_charger_irq_chip.irq_drv_data = chg;
         |                                                ^


vim +/irq_drv_data +523 drivers/power/supply/max77705_charger.c

   497	
   498	static int max77705_charger_probe(struct platform_device *pdev)
   499	{
   500		struct power_supply_config pscfg = {};
   501		struct max77693_dev *max77705;
   502		struct max77705_charger_data *chg;
   503		struct device *dev, *parent;
   504		struct regmap_irq_chip_data *irq_data;
   505		int ret;
   506	
   507		dev = &pdev->dev;
   508		parent = dev->parent;
   509		max77705 = dev_get_drvdata(parent);
   510	
   511		chg = devm_kzalloc(dev, sizeof(*chg), GFP_KERNEL);
   512		if (!chg)
   513			return -ENOMEM;
   514	
   515		platform_set_drvdata(pdev, chg);
   516	
   517		chg->regmap = max77705->regmap_chg;
   518		if (!chg->regmap)
   519			return -ENODEV;
   520	
   521		chg->dev = dev;
   522	
 > 523		max77705_charger_irq_chip.irq_drv_data = chg;
   524		ret = devm_regmap_add_irq_chip(chg->dev, chg->regmap, max77705->irq,
   525						IRQF_ONESHOT | IRQF_SHARED, 0,
   526						&max77705_charger_irq_chip,
   527						&irq_data);
   528		if (ret) {
   529			dev_err(dev, "failed to add irq chip: %d\n", ret);
   530			return ret;
   531		}
   532	
   533		ret = regmap_update_bits(chg->regmap,
   534					MAX77705_CHG_REG_INT_MASK,
   535					MAX77705_CHGIN_IM, 0);
   536	
   537		if (ret)
   538			return ret;
   539	
   540		chg->wqueue = create_singlethread_workqueue(dev_name(dev));
   541		if (IS_ERR(chg->wqueue)) {
   542			dev_err(dev, "failed to create workqueue\n");
   543			return PTR_ERR(chg->wqueue);
   544		}
   545		INIT_WORK(&chg->chgin_work, max77705_chgin_isr_work);
   546	
   547		pscfg.of_node = dev->of_node;
   548		pscfg.drv_data = chg;
   549	
   550		chg->psy_chg = devm_power_supply_register(dev, &max77705_charger_psy_desc,
   551							  &pscfg);
   552		if (IS_ERR(chg->psy_chg))
   553			return PTR_ERR(chg->psy_chg);
   554	
   555		max77705_charger_initialize(chg);
   556	
   557		return max77705_charger_enable(chg);
   558	}
   559	

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