Message ID | 1323554422.29470.4.camel@joe2Laptop |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Le samedi 10 décembre 2011 à 14:00 -0800, Joe Perches a écrit : > Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) > > Signed-off-by: Joe Perches <joe@perches.com> > --- > > Here's the same for drivers/net/ > > drivers/net/ethernet/broadcom/cnic.c | 2 +- > drivers/net/wireless/ipw2x00/ipw2100.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c > index 4bcb67e..757b981 100644 > --- a/drivers/net/ethernet/broadcom/cnic.c > +++ b/drivers/net/ethernet/broadcom/cnic.c > @@ -3516,7 +3516,7 @@ static int cnic_get_v4_route(struct sockaddr_in *dst_addr, > static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr, > struct dst_entry **dst) > { > -#if defined(CONFIG_IPV6) || (defined(CONFIG_IPV6_MODULE) && defined(MODULE)) > +#if IS_ENABLED(CONFIG_IPV6) Are you sure this is equivalent ? -- 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
On Sat, 2011-12-10 at 23:29 +0100, Eric Dumazet wrote: > Le samedi 10 décembre 2011 à 14:00 -0800, Joe Perches a écrit : > > Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) [] > > diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c [] > > @@ -3516,7 +3516,7 @@ static int cnic_get_v4_route(struct sockaddr_in *dst_addr, > > static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr, > > struct dst_entry **dst) > > { > > -#if defined(CONFIG_IPV6) || (defined(CONFIG_IPV6_MODULE) && defined(MODULE)) > > +#if IS_ENABLED(CONFIG_IPV6) > > Are you sure this is equivalent ? I believe so. KBUILD add -DMODULE to the compile options when building for modules. -- 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
Le samedi 10 décembre 2011 à 16:51 -0800, Joe Perches a écrit : > On Sat, 2011-12-10 at 23:29 +0100, Eric Dumazet wrote: > > Le samedi 10 décembre 2011 à 14:00 -0800, Joe Perches a écrit : > > > Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) > [] > > > diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c > [] > > > @@ -3516,7 +3516,7 @@ static int cnic_get_v4_route(struct sockaddr_in *dst_addr, > > > static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr, > > > struct dst_entry **dst) > > > { > > > -#if defined(CONFIG_IPV6) || (defined(CONFIG_IPV6_MODULE) && defined(MODULE)) > > > +#if IS_ENABLED(CONFIG_IPV6) > > > > Are you sure this is equivalent ? > > I believe so. > > KBUILD add -DMODULE to the compile options when > building for modules. > > You didnt answer my question or you dont understand your change. I wonder why. Point was : IPV6 compiled as a module, and _this_ driver compiled staticaly. Did you tried this combination ? -- 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
On Sun, 2011-12-11 at 09:52 +0100, Eric Dumazet wrote: > Le samedi 10 décembre 2011 à 16:51 -0800, Joe Perches a écrit : > > On Sat, 2011-12-10 at 23:29 +0100, Eric Dumazet wrote: > > > Le samedi 10 décembre 2011 à 14:00 -0800, Joe Perches a écrit : > > > Are you sure this is equivalent ? > > I believe so. > You didnt answer my question or you dont understand your change. > I wonder why. I believe "I believe so" is an answer. Perhaps not a good or in this case perhaps even an answer with an incorrect result, but still an answer... > Point was : IPV6 compiled as a module, and _this_ driver compiled > staticaly. > Did you tried this combination ? No, though I will try it this week. cheers, Joe -- 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 --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index 4bcb67e..757b981 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c @@ -3516,7 +3516,7 @@ static int cnic_get_v4_route(struct sockaddr_in *dst_addr, static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr, struct dst_entry **dst) { -#if defined(CONFIG_IPV6) || (defined(CONFIG_IPV6_MODULE) && defined(MODULE)) +#if IS_ENABLED(CONFIG_IPV6) struct flowi6 fl6; memset(&fl6, 0, sizeof(fl6)); diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index a0e5c21..a469a53 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c @@ -4926,7 +4926,7 @@ static int ipw2100_system_config(struct ipw2100_priv *priv, int batch_mode) /* If IPv6 is configured in the kernel then we don't want to filter out all * of the multicast packets as IPv6 needs some. */ -#if !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE) +#if !IS_ENABLED(CONFIG_IPV6) cmd.host_command = ADD_MULTICAST; cmd.host_command_sequence = 0; cmd.host_command_length = 0;
Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) Signed-off-by: Joe Perches <joe@perches.com> --- Here's the same for drivers/net/ drivers/net/ethernet/broadcom/cnic.c | 2 +- drivers/net/wireless/ipw2x00/ipw2100.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 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