All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "André Draszik" <andre.draszik@linaro.org>
Cc: oe-kbuild-all@lists.linux.dev, Lee Jones <lee@kernel.org>
Subject: [lee-mfd:for-mfd-next 18/50] drivers/mfd/sec-acpm.c:346:14: warning: assignment to 'const struct acpm_handle *' from 'int' makes pointer from integer without a cast
Date: Thu, 1 May 2025 02:47:23 +0800	[thread overview]
Message-ID: <202505010259.mRRsi5Fc-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
head:   566b001ca4f65878d5e9b0e9d23ba2d55bf4c630
commit: 690f145503fe1e4d31a1f0250122b3e04876ee90 [18/50] mfd: sec: Add support for S2MPG10 PMIC
config: um-allyesconfig (https://download.01.org/0day-ci/archive/20250501/202505010259.mRRsi5Fc-lkp@intel.com/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/20250501/202505010259.mRRsi5Fc-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/202505010259.mRRsi5Fc-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/mfd/sec-acpm.c: In function 'sec_pmic_acpm_probe':
   drivers/mfd/sec-acpm.c:346:16: error: implicit declaration of function 'devm_acpm_get_by_node'; did you mean 'devm_acpm_get_by_phandle'? [-Werror=implicit-function-declaration]
     346 |         acpm = devm_acpm_get_by_node(dev, dev->parent->of_node);
         |                ^~~~~~~~~~~~~~~~~~~~~
         |                devm_acpm_get_by_phandle
>> drivers/mfd/sec-acpm.c:346:14: warning: assignment to 'const struct acpm_handle *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     346 |         acpm = devm_acpm_get_by_node(dev, dev->parent->of_node);
         |              ^
   cc1: some warnings being treated as errors


vim +346 drivers/mfd/sec-acpm.c

   332	
   333	static int sec_pmic_acpm_probe(struct platform_device *pdev)
   334	{
   335		struct regmap *regmap_common, *regmap_pmic, *regmap;
   336		const struct sec_pmic_acpm_platform_data *pdata;
   337		struct sec_pmic_acpm_shared_bus_context *shared_ctx;
   338		const struct acpm_handle *acpm;
   339		struct device *dev = &pdev->dev;
   340		int ret, irq;
   341	
   342		pdata = device_get_match_data(dev);
   343		if (!pdata)
   344			return dev_err_probe(dev, -ENODEV, "unsupported device type\n");
   345	
 > 346		acpm = devm_acpm_get_by_node(dev, dev->parent->of_node);
   347		if (IS_ERR(acpm))
   348			return dev_err_probe(dev, PTR_ERR(acpm), "failed to get acpm\n");
   349	
   350		irq = platform_get_irq(pdev, 0);
   351		if (irq < 0)
   352			return irq;
   353	
   354		shared_ctx = devm_kzalloc(dev, sizeof(*shared_ctx), GFP_KERNEL);
   355		if (!shared_ctx)
   356			return -ENOMEM;
   357	
   358		shared_ctx->acpm = acpm;
   359		shared_ctx->acpm_chan_id = pdata->acpm_chan_id;
   360		shared_ctx->speedy_channel = pdata->speedy_channel;
   361	
   362		regmap_common = sec_pmic_acpm_regmap_init(dev, shared_ctx, SEC_PMIC_ACPM_ACCESSTYPE_COMMON,
   363							  pdata->regmap_cfg_common, false);
   364		if (IS_ERR(regmap_common))
   365			return PTR_ERR(regmap_common);
   366	
   367		/* Mask all interrupts from 'common' block, until successful init */
   368		ret = regmap_write(regmap_common, S2MPG10_COMMON_INT_MASK, S2MPG10_COMMON_INT_SRC);
   369		if (ret)
   370			return dev_err_probe(dev, ret, "failed to mask common block interrupts\n");
   371	
   372		regmap_pmic = sec_pmic_acpm_regmap_init(dev, shared_ctx, SEC_PMIC_ACPM_ACCESSTYPE_PMIC,
   373							pdata->regmap_cfg_pmic, false);
   374		if (IS_ERR(regmap_pmic))
   375			return PTR_ERR(regmap_pmic);
   376	
   377		regmap = sec_pmic_acpm_regmap_init(dev, shared_ctx, SEC_PMIC_ACPM_ACCESSTYPE_RTC,
   378						   pdata->regmap_cfg_rtc, true);
   379		if (IS_ERR(regmap))
   380			return PTR_ERR(regmap);
   381	
   382		regmap = sec_pmic_acpm_regmap_init(dev, shared_ctx, SEC_PMIC_ACPM_ACCESSTYPE_METER,
   383						   pdata->regmap_cfg_meter, true);
   384		if (IS_ERR(regmap))
   385			return PTR_ERR(regmap);
   386	
   387		ret = sec_pmic_probe(dev, pdata->device_type, irq, regmap_pmic, NULL);
   388		if (ret)
   389			return ret;
   390	
   391		if (device_property_read_bool(dev, "wakeup-source"))
   392			devm_device_init_wakeup(dev);
   393	
   394		/* Unmask PMIC interrupt from 'common' block, now that everything is in place. */
   395		ret = regmap_clear_bits(regmap_common, S2MPG10_COMMON_INT_MASK,
   396					S2MPG10_COMMON_INT_SRC_PMIC);
   397		if (ret)
   398			return dev_err_probe(dev, ret, "failed to unmask PMIC interrupt\n");
   399	
   400		/* Mask all interrupts from 'common' block on shutdown */
   401		ret = devm_add_action_or_reset(dev, sec_pmic_acpm_mask_common_irqs, regmap_common);
   402		if (ret)
   403			return ret;
   404	
   405		return 0;
   406	}
   407	

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

                 reply	other threads:[~2025-04-30 18:48 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=202505010259.mRRsi5Fc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andre.draszik@linaro.org \
    --cc=lee@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.