Re: ks-sa-rng.c:undefined reference to `devm_platform_ioremap_resource'

From: Alexander Sverdlin
Date: Fri Nov 27 2020 - 02:58:49 EST


Hi!

On 27/11/2020 06:48, Herbert Xu wrote:
> On Fri, Nov 13, 2020 at 11:02:13PM +0800, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: 585e5b17b92dead8a3aca4e3c9876fbca5f7e0ba
>> commit: 90c4b29eb1e555fee66f8329a18cb8a070090ad6 hwrng: ks-sa - Enable COMPILE_TEST
>> date: 12 months ago
>> config: s390-randconfig-r022-20201113 (attached as .config)
>> compiler: s390-linux-gcc (GCC) 9.3.0
>> reproduce (this is a W=1 build):
>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=90c4b29eb1e555fee66f8329a18cb8a070090ad6
>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>> git fetch --no-tags linus master
>> git checkout 90c4b29eb1e555fee66f8329a18cb8a070090ad6
>> # save the attached .config to linux build tree
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>>
>> All errors (new ones prefixed by >>):
>
>> s390-linux-ld: drivers/char/hw_random/ks-sa-rng.o: in function `ks_sa_rng_probe':
>>>> ks-sa-rng.c:(.text+0x2fa): undefined reference to `devm_platform_ioremap_resource'
>
> ---8<---
> This patch adds a dependency for KEYSTONE on HAS_IOMEM and OF to
> prevent COMPILE_TEST build failures.
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxx>

> diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
> index ab33a2e17cdf..9ff4fb3236f7 100644
> --- a/drivers/char/hw_random/Kconfig
> +++ b/drivers/char/hw_random/Kconfig
> @@ -508,6 +508,7 @@ config HW_RANDOM_NPCM
>
> config HW_RANDOM_KEYSTONE
> depends on ARCH_KEYSTONE || COMPILE_TEST
> + depends on HAS_IOMEM && OF
> default HW_RANDOM
> tristate "TI Keystone NETCP SA Hardware random number generator"
> help
>

--
Best regards,
Alexander Sverdlin.