YOSHIFUJI Hideaki / 吉藤英明 schrieb:
In article <[EMAIL PROTECTED]> (at Thu, 17 May 2007 18:53:03 +0200), Oliver Hartkopp 
<[EMAIL PROTECTED]> 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

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to