lkml.org 
[lkml]   [2015]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: smc91x: improve neponset hack
From
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 18 Feb 2015 20:47:30 +0100

> The smc91x driver tries to support multiple platforms at compile
> time, but they are mutually exclusive at runtime, and not clearly
> defined.
>
> Trying to build for CONFIG_SA1100_ASSABET without CONFIG_ASSABET_NEPONSET
> results in this link error:
>
> drivers/built-in.o: In function `smc_drv_probe':
> :(.text+0x33310c): undefined reference to `neponset_ncr_frob'
>
> since the neponset_ncr_set function is not defined otherwise.
>
> Similarly, building for both CONFIG_SA1100_ASSABET and CONFIG_SA1100_PLEB
> results in a different build error:
>
> smsc/smc91x.c: In function 'smc_drv_probe':
> smsc/smc91x.c:2299:2: error: implicit declaration of function 'neponset_ncr_set' [-Werror=implicit-function-declaration]
> neponset_ncr_set(NCR_ENET_OSC_EN);
> ^
> smsc/smc91x.c:2299:19: error: 'NCR_ENET_OSC_EN' undeclared (first use in this function)
> neponset_ncr_set(NCR_ENET_OSC_EN);
> ^
>
> This is an attempt to fix the call site responsible for both
> errors, making sure we call the function exactly when the driver
> is actually trying to run on the assabet/neponset machine. With
> this patch, I no longer see randconfig build errors in this file.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I know this isn't the desired long term solution to this problem, but
it's the most minimal risk-free fix for these build failures.

Thus, I've applied this, thanks.


\
 
 \ /
  Last update: 2015-02-20 22:41    [W:0.077 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site