Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: oe-kbuild-all@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, arm@kernel.org
Subject: [soc:board-remove 154/217] drivers/mfd/max8925-i2c.c:146:9: error: 'ret' undeclared; did you mean 'net'?
Date: Mon, 17 Aug 2026 00:36:43 +0800	[thread overview]
Message-ID: <202608170025.qu8rAquT-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git board-remove
head:   057394422bc04420585b2790b230d8a1f350ace8
commit: a4e72f5a88a6efa6a9edbb7e22c08bb45fd91940 [154/217] mfd: max8925: remove platform data probing
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260817/202608170025.qu8rAquT-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260817/202608170025.qu8rAquT-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608170025.qu8rAquT-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/mfd/max8925-i2c.c: In function 'max8925_probe':
>> drivers/mfd/max8925-i2c.c:146:9: error: 'ret' undeclared (first use in this function); did you mean 'net'?
     146 |         ret = of_property_read_u32(np, "maxim,tsc-irq", &chip->tsc_irq);
         |         ^~~
         |         net
   drivers/mfd/max8925-i2c.c:146:9: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/mfd/max8925-i2c.c:146:36: error: 'np' undeclared (first use in this function); did you mean 'up'?
     146 |         ret = of_property_read_u32(np, "maxim,tsc-irq", &chip->tsc_irq);
         |                                    ^~
         |                                    up
   In file included from include/linux/device.h:15,
                    from include/linux/platform_device.h:13,
                    from drivers/mfd/max8925-i2c.c:10:
>> drivers/mfd/max8925-i2c.c:148:25: error: 'dev' undeclared (first use in this function); did you mean 'cdev'?
     148 |                 dev_err(dev, "Not found maxim,tsc-irq property\n");
         |                         ^~~
   include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   drivers/mfd/max8925-i2c.c:148:17: note: in expansion of macro 'dev_err'
     148 |                 dev_err(dev, "Not found maxim,tsc-irq property\n");
         |                 ^~~~~~~
   drivers/mfd/max8925-i2c.c:137:29: warning: unused variable 'node' [-Wunused-variable]
     137 |         struct device_node *node = client->dev.of_node;
         |                             ^~~~


vim +146 drivers/mfd/max8925-i2c.c

   133	
   134	static int max8925_probe(struct i2c_client *client)
   135	{
   136		struct max8925_chip *chip;
   137		struct device_node *node = client->dev.of_node;
   138		int tsc_irq;
   139	
   140		chip = devm_kzalloc(&client->dev,
   141				    sizeof(struct max8925_chip), GFP_KERNEL);
   142		if (chip == NULL)
   143			return -ENOMEM;
   144	
   145		/* parse DT to get platform data */
 > 146		ret = of_property_read_u32(np, "maxim,tsc-irq", &chip->tsc_irq);
   147		if (ret) {
 > 148			dev_err(dev, "Not found maxim,tsc-irq property\n");
   149			return -EINVAL;
   150		}
   151	
   152		chip->i2c = client;
   153		chip->dev = &client->dev;
   154		i2c_set_clientdata(client, chip);
   155		mutex_init(&chip->io_lock);
   156	
   157		chip->rtc = i2c_new_dummy_device(chip->i2c->adapter, RTC_I2C_ADDR);
   158		if (IS_ERR(chip->rtc)) {
   159			dev_err(chip->dev, "Failed to allocate I2C device for RTC\n");
   160			return PTR_ERR(chip->rtc);
   161		}
   162		i2c_set_clientdata(chip->rtc, chip);
   163	
   164		chip->adc = i2c_new_dummy_device(chip->i2c->adapter, ADC_I2C_ADDR);
   165		if (IS_ERR(chip->adc)) {
   166			dev_err(chip->dev, "Failed to allocate I2C device for ADC\n");
   167			i2c_unregister_device(chip->rtc);
   168			return PTR_ERR(chip->adc);
   169		}
   170		i2c_set_clientdata(chip->adc, chip);
   171	
   172		device_init_wakeup(&client->dev, 1);
   173	
   174		max8925_device_init(chip, tsc_irq);
   175	
   176		return 0;
   177	}
   178	

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


                 reply	other threads:[~2026-08-16 16:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202608170025.qu8rAquT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arm@kernel.org \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox