diff mbox

net: eth: 8390: remove section warning in etherh.c

Message ID 1386837577-15130-1-git-send-email-olof@lixom.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Olof Johansson Dec. 12, 2013, 8:39 a.m. UTC
Commit c45f812f0280 ('8390 : Replace ei_debug with msg_enable/NETIF_MSG_*
feature') ended up moving the printout of version[] from something that
will be compiled out due to defines, to something that is now evaluated
at runtime.

That means that what always used to be an access to an __initdata string
from non-__init code started showing up as a section mismatch when it
didn't before.

All other 8390 versions skip __initdata on the version string, and
starting to annotate the whole chain of callers with __init seems like
more churn than it's worth on this driver, so remove it from etherh.c as well.

Fixes: c45f812f0280 ('8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature')
Signed-off-by: Olof Johansson <olof@lixom.net>
---
 drivers/net/ethernet/8390/etherh.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Olof Johansson Dec. 12, 2013, 8:53 a.m. UTC | #1
On Thu, Dec 12, 2013 at 12:46 AM, tedheadster <tedheadster@gmail.com> wrote:
> On Thu, Dec 12, 2013 at 3:39 AM, Olof Johansson <olof@lixom.net> wrote:
>>
>> Commit c45f812f0280 ('8390 : Replace ei_debug with msg_enable/NETIF_MSG_*
>> feature') ended up moving the printout of version[] from something that
>> will be compiled out due to defines, to something that is now evaluated
>> at runtime.
>>
>> That means that what always used to be an access to an __initdata string
>> from non-__init code started showing up as a section mismatch when it
>> didn't before.
>>
>> All other 8390 versions skip __initdata on the version string, and
>> starting to annotate the whole chain of callers with __init seems like
>> more churn than it's worth on this driver, so remove it from etherh.c as
>> well.
>>
>
> Olof,
>   should you also remove the __init tag from etherh_banner() since it is
> called from etherh_probe(), which does not have an __init tag?

Hmm.

The section warning functionality is clever enough to not trigger when
a function is named _probe() and references __initdata, and discarding
etherh_banner() should be just fine so I don't see a need to remove
it.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Dec. 12, 2013, 7:02 p.m. UTC | #2
From: Olof Johansson <olof@lixom.net>
Date: Thu, 12 Dec 2013 00:53:00 -0800

> On Thu, Dec 12, 2013 at 12:46 AM, tedheadster <tedheadster@gmail.com> wrote:
>> On Thu, Dec 12, 2013 at 3:39 AM, Olof Johansson <olof@lixom.net> wrote:
>>>
>>> Commit c45f812f0280 ('8390 : Replace ei_debug with msg_enable/NETIF_MSG_*
>>> feature') ended up moving the printout of version[] from something that
>>> will be compiled out due to defines, to something that is now evaluated
>>> at runtime.
>>>
>>> That means that what always used to be an access to an __initdata string
>>> from non-__init code started showing up as a section mismatch when it
>>> didn't before.
>>>
>>> All other 8390 versions skip __initdata on the version string, and
>>> starting to annotate the whole chain of callers with __init seems like
>>> more churn than it's worth on this driver, so remove it from etherh.c as
>>> well.
>>>
>>
>> Olof,
>>   should you also remove the __init tag from etherh_banner() since it is
>> called from etherh_probe(), which does not have an __init tag?
> 
> Hmm.
> 
> The section warning functionality is clever enough to not trigger when
> a function is named _probe() and references __initdata, and discarding
> etherh_banner() should be just fine so I don't see a need to remove
> it.

Right, applied, thanks Olof.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/8390/etherh.c b/drivers/net/ethernet/8390/etherh.c
index b15e482a..b36ee9e 100644
--- a/drivers/net/ethernet/8390/etherh.c
+++ b/drivers/net/ethernet/8390/etherh.c
@@ -59,7 +59,7 @@ 
 #define DRV_NAME	"etherh"
 #define DRV_VERSION	"1.11"
 
-static char version[] __initdata =
+static char version[] =
 	"EtherH/EtherM Driver (c) 2002-2004 Russell King " DRV_VERSION "\n";
 
 #include "lib8390.c"