netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: "YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [FIX][PATCH] ipv6 addrconf.c : wrong handling of non-ipv6 hardware since 2.6.21
Date: Thu, 17 May 2007 22:41:42 +0200	[thread overview]
Message-ID: <464CBE06.30204@hartkopp.net> (raw)
In-Reply-To: <20070518.024940.120305926.yoshfuji@linux-ipv6.org>

YOSHIFUJI Hideaki / 吉藤英明 schrieb:
> In article <464C886F.50703@hartkopp.net> (at Thu, 17 May 2007 18:53:03 +0200), Oliver Hartkopp <socketcan@hartkopp.net> says:
>
>   
>> +static int ipv6_hwtype(struct net_device *dev)
>> +{
>> +    if ((dev->type == ARPHRD_ETHER) ||
>> +        (dev->type == ARPHRD_LOOPBACK) ||
>> +#if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE)
>> +        (dev->type == ARPHRD_SIT) ||
>> +#endif
>> +        (dev->type == ARPHRD_TUNNEL6) ||
>> +        (dev->type == ARPHRD_FDDI) ||
>> +        (dev->type == ARPHRD_IEEE802_TR) ||
>> +        (dev->type == ARPHRD_ARCNET) ||
>> +        (dev->type == ARPHRD_INFINIBAND))
>> +        return 1;
>> +
>> +    return 0;
>> +}
>> +
>>     
>
> Please remove #if, or please provide for other
> dependencies as well (e.g., CONFIG_IPV6_TUNNEL etc.)
>
> Otherwise, I would agree.
>
>   
Hello Hideaki,

thanks for your (positive) feedback.
Indeed ARPHRD_SIT is the only hardware type that's explicitely #if 'ed 
in the addrconf.c code. Any other ARPHRD_* is not conditional to any 
CONFIGs. E.g. there is no #ifdef CONFIG_IPV6_TUNNEL arround the other 
ARPHRD_TUNNEL6 stuff in addrconf.c.

So the current patch meets the exact functional extension to the other 
code, where only ARPHRD_SIT is in #if 's.
Of course it is no problem to remove the #if defined(CONFIG_IPV6_SIT)  
... but this would be the only place in the code then.

Are you sure, that you really want have a divergent codestyle only here 
in ipv6_hwtype()?

If so i can post it of course.

Best Regards,
Oliver


  reply	other threads:[~2007-05-17 20:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-17 16:53 [FIX][PATCH] ipv6 addrconf.c : wrong handling of non-ipv6 hardware since 2.6.21 Oliver Hartkopp
2007-05-17 17:09 ` Resend: " Oliver Hartkopp
2007-05-17 17:49 ` YOSHIFUJI Hideaki / 吉藤英明
2007-05-17 20:41   ` Oliver Hartkopp [this message]
2007-05-17 21:10   ` [FIX][PATCH] ipv6 addrconf.c REMOVED #if patch Oliver Hartkopp
2007-05-21 18:20     ` Urs Thuermann
2007-05-23 21:35       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=464CBE06.30204@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).