Thread (70 messages) 70 messages, 11 authors, 2014-07-31

Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

From: Richard Weinberger <richard@nod.at>
Date: 2014-07-13 14:04:06
Also in: linux-iio, linux-pwm, linux-watchdog, lkml

Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:
On 07/13/2014 03:40 PM, Richard Weinberger wrote:
quoted
Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
quoted
On 07/13/2014 11:45 AM, Richard Weinberger wrote:
quoted
Am 13.07.2014 11:27, schrieb Lennox Wu:
quoted
As I said before, some configurations don't make sense.
If such a configuration can be achieved using allmod/yesconfig it has to be fixed.
Chen's fixes seem reasonable as not all architectures support iomem.
Maybe we should stub out ioremap() and friends when COMPILE_TEST is enabled to avoid these linker errors. That's in my opinion better than turning most of the 'depends on
COMPILE_TEST' into 'depends on COMPILE_TEST && HAS_IOMEM'. The issue comes up quite a lot and it is often overlooked when adding a driver that can be build when COMPILE_TEST is
enabled.
And what should this stub do?
Except calling BUG()...
return NULL;

It's for compile testing, it's not meant to work at runtime.
Hm, I really don't like the idea of having a non-working kernel.
IMHO either it should build _and_ run and nothing else.
Greg, what do you think?

Thanks,
//richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help