2020-04-20 15:05:18

by kernel test robot

[permalink] [raw]
Subject: [cryptodev:master 7/26] cctrng.c:undefined reference to `devm_ioremap_resource'

tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
head: 3357b61177a7f34267256098b29a7f4992af40f3
commit: a583ed310bb6b514e717c11a30b5a7bc3a65d1b1 [7/26] hwrng: cctrng - introduce Arm CryptoCell driver
config: um-kunit_defconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout a583ed310bb6b514e717c11a30b5a7bc3a65d1b1
# save the attached .config to linux build tree
make ARCH=um

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <[email protected]>

All errors (new ones prefixed by >>):

/usr/bin/ld: drivers/char/hw_random/cctrng.o: in function `cctrng_probe':
>> cctrng.c:(.text+0x36f): undefined reference to `devm_ioremap_resource'
collect2: error: ld returned 1 exit status

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (971.00 B)
.config.gz (5.03 kB)
Download all attachments

2020-04-21 05:44:33

by Herbert Xu

[permalink] [raw]
Subject: hwrng: cctrng - Add dependency on HAS_IOMEM

On Mon, Apr 20, 2020 at 09:56:47PM +0800, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
> head: 3357b61177a7f34267256098b29a7f4992af40f3
> commit: a583ed310bb6b514e717c11a30b5a7bc3a65d1b1 [7/26] hwrng: cctrng - introduce Arm CryptoCell driver
> config: um-kunit_defconfig (attached as .config)
> compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
> reproduce:
> git checkout a583ed310bb6b514e717c11a30b5a7bc3a65d1b1
> # save the attached .config to linux build tree
> make ARCH=um
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <[email protected]>
>
> All errors (new ones prefixed by >>):
>
> /usr/bin/ld: drivers/char/hw_random/cctrng.o: in function `cctrng_probe':
> >> cctrng.c:(.text+0x36f): undefined reference to `devm_ioremap_resource'
> collect2: error: ld returned 1 exit status

This should fix the problem:

---8<---
The cctrng doesn't compile without HAS_IOMEM so we should depend
on it.

Reported-by: kbuild test robot <[email protected]>
Fixes: a583ed310bb6 ("hwrng: cctrng - introduce Arm CryptoCell driver")
Signed-off-by: Herbert Xu <[email protected]>

diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index 848f26f78dc1..0c99735df694 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -476,6 +476,7 @@ config HW_RANDOM_KEYSTONE

config HW_RANDOM_CCTRNG
tristate "Arm CryptoCell True Random Number Generator support"
+ depends on HAS_IOMEM
default HW_RANDOM
help
This driver provides support for the True Random Number
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2020-04-21 07:58:02

by Hadar Gat

[permalink] [raw]
Subject: RE: hwrng: cctrng - Add dependency on HAS_IOMEM



> -----Original Message-----
> From: Herbert Xu <[email protected]>
> Sent: Tuesday, 21 April 2020 8:42
>
> On Mon, Apr 20, 2020 at 09:56:47PM +0800, kbuild test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-
> 2.6.git master
> > head: 3357b61177a7f34267256098b29a7f4992af40f3
> > commit: a583ed310bb6b514e717c11a30b5a7bc3a65d1b1 [7/26] hwrng:
> cctrng
> > - introduce Arm CryptoCell driver
> > config: um-kunit_defconfig (attached as .config)
> > compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
> > reproduce:
> > git checkout a583ed310bb6b514e717c11a30b5a7bc3a65d1b1
> > # save the attached .config to linux build tree
> > make ARCH=um
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kbuild test robot <[email protected]>
> >
> > All errors (new ones prefixed by >>):
> >
> > /usr/bin/ld: drivers/char/hw_random/cctrng.o: in function `cctrng_probe':
> > >> cctrng.c:(.text+0x36f): undefined reference to
> `devm_ioremap_resource'
> > collect2: error: ld returned 1 exit status
>
> This should fix the problem:
>
> ---8<---
> The cctrng doesn't compile without HAS_IOMEM so we should depend on it.
>
> Reported-by: kbuild test robot <[email protected]>
> Fixes: a583ed310bb6 ("hwrng: cctrng - introduce Arm CryptoCell driver")
> Signed-off-by: Herbert Xu <[email protected]>
>
> diff --git a/drivers/char/hw_random/Kconfig
> b/drivers/char/hw_random/Kconfig index 848f26f78dc1..0c99735df694
> 100644
> --- a/drivers/char/hw_random/Kconfig
> +++ b/drivers/char/hw_random/Kconfig
> @@ -476,6 +476,7 @@ config HW_RANDOM_KEYSTONE
>
> config HW_RANDOM_CCTRNG
> tristate "Arm CryptoCell True Random Number Generator support"
> + depends on HAS_IOMEM
> default HW_RANDOM
> help
> This driver provides support for the True Random Number
> --

Thank you Herbert.

Acked-by: Hadar Gat <[email protected]>