lkml.org 
[lkml]   [2019]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] libertas: remove ifdef OLPC noise
From
Date
On Wed, 2019-01-16 at 18:04 +0200, Kalle Valo wrote:
> Lubomir Rintel <lkundrak@v3.sk> writes:
>
> > <asm/olpc.h> provides machine_is_olpc() stub for CONFIG_OLPC=n,
> > compiler should just optimize the unneeded bits away.
> >
> > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> > ---
> > drivers/net/wireless/marvell/libertas/if_usb.c | 10 ----------
> > 1 file changed, 10 deletions(-)
> >
> > diff --git a/drivers/net/wireless/marvell/libertas/if_usb.c b/drivers/net/wireless/marvell/libertas/if_usb.c
> > index 220dcdee8d2b..7b61c599948e 100644
> > --- a/drivers/net/wireless/marvell/libertas/if_usb.c
> > +++ b/drivers/net/wireless/marvell/libertas/if_usb.c
> > @@ -12,9 +12,7 @@
> > #include <linux/usb.h>
> > #include <linux/olpc-ec.h>
> >
> > -#ifdef CONFIG_OLPC
> > #include <asm/olpc.h>
> > -#endif
>
> Using asm directory looked odd to me so I did some investigation:
>
> $ find -name olpc.h
> ./arch/x86/include/asm/olpc.h
>
> Did you build this on something else than x86? For example, will the
> compiler find olpc.h when building for arm?

Uh, no. You're right, this indeed breaks on non-x86.

Perhaps olpc-ec.h should provide something that could tell whether the
EC is available that could be used instead of machine_is_olpc(), or the
olpc.h moved outside arch/x86.

For now, please just ignore the patch..

Lubo

\
 
 \ /
  Last update: 2019-01-16 17:21    [W:0.044 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site