From: Michael Chan <mchan@broadcom.com>
To: Anish Bhatt <anish@chelsio.com>
Cc: <netdev@vger.kernel.org>, <davem@davemloft.net>,
<jitendra.kalsaria@qlogic.com>, <eddie.wai@broadcom.com>,
<randy.dunlap@oracle.com>
Subject: Re: [PATCH net] cnic : Cleanup CONFIG_IPV6 & VLAN check
Date: Thu, 4 Sep 2014 18:18:51 -0700 [thread overview]
Message-ID: <1409879931.6832.36.camel@LTIRV-MCHAN1.corp.ad.broadcom.com> (raw)
In-Reply-To: <1409875977-31584-1-git-send-email-anish@chelsio.com>
On Thu, 2014-09-04 at 17:12 -0700, Anish Bhatt wrote:
> The cnic module needs to ensure that if ipv6 support is compiled as a module,
> then the cnic module cannot be compiled as built-in as it depends on ipv6.
> Made this check cleaner via Kconfig
>
> Use simpler IS_ENABLED for CONFIG_VLAN_8021Q check
>
> Signed-off-by: Anish Bhatt <anish@chelsio.com>
Acked-by: Michael Chan <mchan@broadcom.com>
>
> diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig
> index 7dcfb19..d8d07a8 100644
> --- a/drivers/net/ethernet/broadcom/Kconfig
> +++ b/drivers/net/ethernet/broadcom/Kconfig
> @@ -84,7 +84,7 @@ config BNX2
>
> config CNIC
> tristate "QLogic CNIC support"
> - depends on PCI
> + depends on PCI && (IPV6 || IPV6=n)
> select BNX2
> select UIO
> ---help---
> diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
> index 27861a6..a6a9f28 100644
> --- a/drivers/net/ethernet/broadcom/cnic.c
> +++ b/drivers/net/ethernet/broadcom/cnic.c
> @@ -31,7 +31,7 @@
> #include <linux/if_vlan.h>
> #include <linux/prefetch.h>
> #include <linux/random.h>
> -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
> +#if IS_ENABLED(CONFIG_VLAN_8021Q)
> #define BCM_VLAN 1
> #endif
> #include <net/ip.h>
> @@ -3685,7 +3685,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));
next prev parent reply other threads:[~2014-09-05 1:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 0:12 [PATCH net] cnic : Cleanup CONFIG_IPV6 & VLAN check Anish Bhatt
2014-09-05 0:35 ` Anish Bhatt
2014-09-05 1:18 ` Michael Chan [this message]
2014-09-06 3:47 ` 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=1409879931.6832.36.camel@LTIRV-MCHAN1.corp.ad.broadcom.com \
--to=mchan@broadcom.com \
--cc=anish@chelsio.com \
--cc=davem@davemloft.net \
--cc=eddie.wai@broadcom.com \
--cc=jitendra.kalsaria@qlogic.com \
--cc=netdev@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
/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