public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
@ 2025-03-28 21:43 kernel test robot
  2025-03-29  6:41 ` Biju Das
  0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2025-03-28 21:43 UTC (permalink / raw)
  To: Biju Das; +Cc: oe-kbuild-all, linux-kernel, Ulf Hansson, Wolfram Sang

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   acb4f33713b9f6cadb6143f211714c343465411c
commit: fae80a99dc0320be854aa789cbe7ed0e1e574c61 mmc: renesas_sdhi: Add support for RZ/G3E SoC
date:   2 weeks ago
config: arm-randconfig-r111-20250328 (https://download.01.org/0day-ci/archive/20250329/202503290554.zASQT70Q-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20250329/202503290554.zASQT70Q-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/202503290554.zASQT70Q-lkp@intel.com/

All errors (new ones prefixed by >>):

   arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function `renesas_sdhi_regulator_is_enabled':
>> drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
   arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function `renesas_sdhi_regulator_get_voltage':
   drivers/mmc/host/renesas_sdhi_core.c:961: undefined reference to `rdev_get_drvdata'
   arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function `renesas_sdhi_regulator_disable':
   drivers/mmc/host/renesas_sdhi_core.c:927: undefined reference to `rdev_get_drvdata'
   arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function `renesas_sdhi_regulator_enable':
   drivers/mmc/host/renesas_sdhi_core.c:939: undefined reference to `rdev_get_drvdata'
   arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function `renesas_sdhi_regulator_set_voltage':
   drivers/mmc/host/renesas_sdhi_core.c:973: undefined reference to `rdev_get_drvdata'
   arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function `renesas_sdhi_probe':
>> drivers/mmc/host/renesas_sdhi_core.c:1177: undefined reference to `devm_regulator_register'


vim +951 drivers/mmc/host/renesas_sdhi_core.c

   948	
   949	static int renesas_sdhi_regulator_is_enabled(struct regulator_dev *rdev)
   950	{
 > 951		struct tmio_mmc_host *host = rdev_get_drvdata(rdev);
   952		u32 sd_status;
   953	
   954		sd_status = sd_ctrl_read32(host, CTL_SD_STATUS);
   955	
   956		return (sd_status & SD_STATUS_PWEN) ? 1 : 0;
   957	}
   958	
   959	static int renesas_sdhi_regulator_get_voltage(struct regulator_dev *rdev)
   960	{
 > 961		struct tmio_mmc_host *host = rdev_get_drvdata(rdev);
   962		u32 sd_status;
   963	
   964		sd_status = sd_ctrl_read32(host, CTL_SD_STATUS);
   965	
   966		return (sd_status & SD_STATUS_IOVS) ? 1800000 : 3300000;
   967	}
   968	

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
  2025-03-28 21:43 drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata' kernel test robot
@ 2025-03-29  6:41 ` Biju Das
  2025-03-29  7:17   ` Wolfram Sang
  0 siblings, 1 reply; 7+ messages in thread
From: Biju Das @ 2025-03-29  6:41 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Ulf Hansson, Wolfram Sang

Hi all,


> -----Original Message-----
> From: kernel test robot <lkp@intel.com>
> Sent: 28 March 2025 21:44
> Subject: drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   acb4f33713b9f6cadb6143f211714c343465411c
> commit: fae80a99dc0320be854aa789cbe7ed0e1e574c61 mmc: renesas_sdhi: Add support for RZ/G3E SoC
> date:   2 weeks ago
> config: arm-randconfig-r111-20250328 (https://download.01.org/0day-
> ci/archive/20250329/202503290554.zASQT70Q-lkp@intel.com/config)
> compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
> reproduce: (https://download.01.org/0day-ci/archive/20250329/202503290554.zASQT70Q-
> 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/202503290554.zASQT70Q-lkp@intel.
> | com/
> 
> All errors (new ones prefixed by >>):
> 
>    arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function
> `renesas_sdhi_regulator_is_enabled':
> >> drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
>    arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function
> `renesas_sdhi_regulator_get_voltage':
>    drivers/mmc/host/renesas_sdhi_core.c:961: undefined reference to `rdev_get_drvdata'
>    arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function
> `renesas_sdhi_regulator_disable':
>    drivers/mmc/host/renesas_sdhi_core.c:927: undefined reference to `rdev_get_drvdata'
>    arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function
> `renesas_sdhi_regulator_enable':
>    drivers/mmc/host/renesas_sdhi_core.c:939: undefined reference to `rdev_get_drvdata'
>    arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function
> `renesas_sdhi_regulator_set_voltage':
>    drivers/mmc/host/renesas_sdhi_core.c:973: undefined reference to `rdev_get_drvdata'
>    arm-linux-gnueabi-ld: drivers/mmc/host/renesas_sdhi_core.o: in function `renesas_sdhi_probe':
> >> drivers/mmc/host/renesas_sdhi_core.c:1177: undefined reference to `devm_regulator_register'

CONFIG_REGULATOR is not enabled in arm-randconfig-r111-20250328 that is leading
to this build issue.

I will send a fix by "select REGULATOR" in config MMC_SDHI

Cheers,
Biju

> 
> 
> vim +951 drivers/mmc/host/renesas_sdhi_core.c
> 
>    948
>    949	static int renesas_sdhi_regulator_is_enabled(struct regulator_dev *rdev)
>    950	{
>  > 951		struct tmio_mmc_host *host = rdev_get_drvdata(rdev);
>    952		u32 sd_status;
>    953
>    954		sd_status = sd_ctrl_read32(host, CTL_SD_STATUS);
>    955
>    956		return (sd_status & SD_STATUS_PWEN) ? 1 : 0;
>    957	}
>    958
>    959	static int renesas_sdhi_regulator_get_voltage(struct regulator_dev *rdev)
>    960	{
>  > 961		struct tmio_mmc_host *host = rdev_get_drvdata(rdev);
>    962		u32 sd_status;
>    963
>    964		sd_status = sd_ctrl_read32(host, CTL_SD_STATUS);
>    965
>    966		return (sd_status & SD_STATUS_IOVS) ? 1800000 : 3300000;
>    967	}
>    968
> 
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
  2025-03-29  6:41 ` Biju Das
@ 2025-03-29  7:17   ` Wolfram Sang
  2025-03-29  7:24     ` Biju Das
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2025-03-29  7:17 UTC (permalink / raw)
  To: Biju Das
  Cc: kernel test robot, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, Ulf Hansson

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]


> CONFIG_REGULATOR is not enabled in arm-randconfig-r111-20250328 that is leading
> to this build issue.
> 
> I will send a fix by "select REGULATOR" in config MMC_SDHI

What about using MMC_SDHI_INTERNAL_DMAC? So we leave out at least older
SDHI instances. Ideally, we would say "select ... if <family>" but this
will easily be missed in updates. Maybe the above is a fair compromise.
Those systems will likely have regulators enabled anyhow.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
  2025-03-29  7:17   ` Wolfram Sang
@ 2025-03-29  7:24     ` Biju Das
  2025-03-29  7:28       ` Wolfram Sang
  0 siblings, 1 reply; 7+ messages in thread
From: Biju Das @ 2025-03-29  7:24 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: kernel test robot, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, Ulf Hansson

Hi Wolfram,

Thanks for the feedback.

> -----Original Message-----
> From: Wolfram Sang <wsa-dev@sang-engineering.com>
> Sent: 29 March 2025 07:17
> Subject: Re: drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
> 
> 
> > CONFIG_REGULATOR is not enabled in arm-randconfig-r111-20250328 that
> > is leading to this build issue.
> >
> > I will send a fix by "select REGULATOR" in config MMC_SDHI
> 
> What about using MMC_SDHI_INTERNAL_DMAC? So we leave out at least older SDHI instances. Ideally, we
> would say "select ... if <family>" but this will easily be missed in updates. Maybe the above is a
> fair compromise.
> Those systems will likely have regulators enabled anyhow.

The changes were done in SDHI core (renesas_sdhi_core.c).

Like this, if a random config in that architecture has CONFIG_REGULATOR undefined
will lead to the same error.

Cheers,
Biju

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
  2025-03-29  7:24     ` Biju Das
@ 2025-03-29  7:28       ` Wolfram Sang
  2025-03-29  7:37         ` Biju Das
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2025-03-29  7:28 UTC (permalink / raw)
  To: Biju Das
  Cc: kernel test robot, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, Ulf Hansson

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]


> The changes were done in SDHI core (renesas_sdhi_core.c).
> 
> Like this, if a random config in that architecture has CONFIG_REGULATOR undefined
> will lead to the same error.

True :( Not happy, but I don't want to over-complicate things. Most
systems will have regulators enabled anyhow...


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
  2025-03-29  7:28       ` Wolfram Sang
@ 2025-03-29  7:37         ` Biju Das
  2025-03-29  7:47           ` Wolfram Sang
  0 siblings, 1 reply; 7+ messages in thread
From: Biju Das @ 2025-03-29  7:37 UTC (permalink / raw)
  To: Wolfram Sang, Mark Brown
  Cc: kernel test robot, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, Ulf Hansson

Wolfram,

> -----Original Message-----
> From: Wolfram Sang <wsa-dev@sang-engineering.com>
> Sent: 29 March 2025 07:28
> To: Biju Das <biju.das.jz@bp.renesas.com>
> Cc: kernel test robot <lkp@intel.com>; oe-kbuild-all@lists.linux.dev; linux-kernel@vger.kernel.org;
> Ulf Hansson <ulf.hansson@linaro.org>
> Subject: Re: drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
> 
> 
> > The changes were done in SDHI core (renesas_sdhi_core.c).
> >
> > Like this, if a random config in that architecture has
> > CONFIG_REGULATOR undefined will lead to the same error.
> 
> True :( Not happy, but I don't want to over-complicate things. Most systems will have regulators
> enabled anyhow...

CLK address this issue by adding inline function for such systems where COMMON_CLK is undefined
Not sure about Regulator should do same for sytems that have Regulator undefined?

Cheers,
Biju


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata'
  2025-03-29  7:37         ` Biju Das
@ 2025-03-29  7:47           ` Wolfram Sang
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2025-03-29  7:47 UTC (permalink / raw)
  To: Biju Das
  Cc: Mark Brown, kernel test robot, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, Ulf Hansson

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]


> Not sure about Regulator should do same for sytems that have Regulator undefined?

I am aware that regulators could do this, dunno why they don't. Maybe
noone did it so far, or they have other reasons. Beyond my bandwidth,
though, so I am okay with your approach + "if ARCH_RENESAS".


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-03-29  7:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-28 21:43 drivers/mmc/host/renesas_sdhi_core.c:951: undefined reference to `rdev_get_drvdata' kernel test robot
2025-03-29  6:41 ` Biju Das
2025-03-29  7:17   ` Wolfram Sang
2025-03-29  7:24     ` Biju Das
2025-03-29  7:28       ` Wolfram Sang
2025-03-29  7:37         ` Biju Das
2025-03-29  7:47           ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox