From: kernel test robot <lkp@intel.com>
To: Charles Han <hanchunchao@inspur.com>,
krzk@kernel.org, sre@kernel.org, akpm@linux-foundation.org,
lee@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Charles Han <hanchunchao@inspur.com>
Subject: Re: [PATCH V2] charger: max14577: Handle NULL pdata when CONFIG_OF is not set
Date: Mon, 19 May 2025 13:58:03 +0800 [thread overview]
Message-ID: <202505191305.un0tzZu1-lkp@intel.com> (raw)
In-Reply-To: <20250519014804.2244-1-hanchunchao@inspur.com>
Hi Charles,
kernel test robot noticed the following build errors:
[auto build test ERROR on sre-power-supply/for-next]
[also build test ERROR on linus/master v6.15-rc7 next-20250516]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Charles-Han/charger-max14577-Handle-NULL-pdata-when-CONFIG_OF-is-not-set/20250519-095431
base: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next
patch link: https://lore.kernel.org/r/20250519014804.2244-1-hanchunchao%40inspur.com
patch subject: [PATCH V2] charger: max14577: Handle NULL pdata when CONFIG_OF is not set
config: sh-randconfig-002-20250519 (https://download.01.org/0day-ci/archive/20250519/202505191305.un0tzZu1-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250519/202505191305.un0tzZu1-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/202505191305.un0tzZu1-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/power/supply/max14577_charger.c: In function 'max14577_charger_dt_init':
>> drivers/power/supply/max14577_charger.c:504:16: error: returning 'int' from a function with return type 'struct max14577_charger_platform_data *' makes pointer from integer without a cast [-Wint-conversion]
504 | return -ENODATA;
| ^
vim +504 drivers/power/supply/max14577_charger.c
454
455 #ifdef CONFIG_OF
456 static struct max14577_charger_platform_data *max14577_charger_dt_init(
457 struct platform_device *pdev)
458 {
459 struct max14577_charger_platform_data *pdata;
460 struct device_node *np = pdev->dev.of_node;
461 int ret;
462
463 if (!np) {
464 dev_err(&pdev->dev, "No charger OF node\n");
465 return ERR_PTR(-EINVAL);
466 }
467
468 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
469 if (!pdata)
470 return ERR_PTR(-ENOMEM);
471
472 ret = of_property_read_u32(np, "maxim,constant-uvolt",
473 &pdata->constant_uvolt);
474 if (ret) {
475 dev_err(&pdev->dev, "Cannot parse maxim,constant-uvolt field from DT\n");
476 return ERR_PTR(ret);
477 }
478
479 ret = of_property_read_u32(np, "maxim,fast-charge-uamp",
480 &pdata->fast_charge_uamp);
481 if (ret) {
482 dev_err(&pdev->dev, "Cannot parse maxim,fast-charge-uamp field from DT\n");
483 return ERR_PTR(ret);
484 }
485
486 ret = of_property_read_u32(np, "maxim,eoc-uamp", &pdata->eoc_uamp);
487 if (ret) {
488 dev_err(&pdev->dev, "Cannot parse maxim,eoc-uamp field from DT\n");
489 return ERR_PTR(ret);
490 }
491
492 ret = of_property_read_u32(np, "maxim,ovp-uvolt", &pdata->ovp_uvolt);
493 if (ret) {
494 dev_err(&pdev->dev, "Cannot parse maxim,ovp-uvolt field from DT\n");
495 return ERR_PTR(ret);
496 }
497
498 return pdata;
499 }
500 #else /* CONFIG_OF */
501 static struct max14577_charger_platform_data *max14577_charger_dt_init(
502 struct platform_device *pdev)
503 {
> 504 return -ENODATA;
505 }
506 #endif /* CONFIG_OF */
507
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-05-19 5:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 9:53 [PATCH] charger: max14577: Handle NULL pdata when CONFIG_OF is not set Charles Han
2025-05-16 12:32 ` Krzysztof Kozlowski
2025-05-19 1:48 ` [PATCH V2] " Charles Han
2025-05-19 5:51 ` Krzysztof Kozlowski
2025-05-19 5:58 ` kernel test robot [this message]
2025-05-19 6:16 ` [PATCH V3] " Charles Han
2025-05-19 16:20 ` Krzysztof Kozlowski
2025-06-22 19:13 ` Sebastian Reichel
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=202505191305.un0tzZu1-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=hanchunchao@inspur.com \
--cc=krzk@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sre@kernel.org \
/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.