netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg <gvrose8192@gmail.com>
To: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	intel-wired-lan@lists.osuosl.org,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: Re: [PATCH 08/15] ixgbe: use IS_ENABLED() instead of checking for built-in or module
Date: Mon, 12 Sep 2016 08:36:03 -0700	[thread overview]
Message-ID: <1473694563.4320.4.camel@gmail.com> (raw)
In-Reply-To: <1473689026-6983-9-git-send-email-javier@osg.samsung.com>

On Mon, 2016-09-12 at 10:03 -0400, Javier Martinez Canillas wrote:
> The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
> built-in or as a module, use that macro instead of open coding the same.
> 
> Using the macro makes the code more readable by helping abstract away some
> of the Kconfig built-in and module enable details.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> ---
> 
>  drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
> index 33c025055011..b06e32d0d22a 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
> @@ -45,10 +45,10 @@
>  #include "ixgbe_type.h"
>  #include "ixgbe_common.h"
>  #include "ixgbe_dcb.h"
> -#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
> +#if IS_ENABLED(CONFIG_FCOE)

I was wondering what happens if CONFIG_FCOE_MODULE is defined but not
CONFIG_FCOE but then couldn't even find CONFIG_FCOE_MODULE in any
Kconfigs anywhere in the current tree.

Looks good to me.

      * Reviewed-by: Greg Rose <grose@lightfleet.com>

>  #define IXGBE_FCOE
>  #include "ixgbe_fcoe.h"
> -#endif /* CONFIG_FCOE or CONFIG_FCOE_MODULE */
> +#endif /* IS_ENABLED(CONFIG_FCOE) */
>  #ifdef CONFIG_IXGBE_DCA
>  #include <linux/dca.h>
>  #endif

  reply	other threads:[~2016-09-12 15:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 14:03 [PATCH 00/15] drivers: net: use IS_ENABLED() instead of checking for built-in or module Javier Martinez Canillas
2016-09-12 14:03 ` [PATCH 01/15] 3c59x: " Javier Martinez Canillas
2016-09-12 14:03 ` [PATCH 02/15] starfire: " Javier Martinez Canillas
2016-09-12 14:03 ` [PATCH 03/15] ethernet: amd: " Javier Martinez Canillas
2016-09-12 14:11   ` Geert Uytterhoeven
2016-09-12 14:03 ` [PATCH 04/15] bnx2: " Javier Martinez Canillas
2016-09-12 14:03 ` [PATCH 05/15] sundance: " Javier Martinez Canillas
2016-09-12 14:03 ` [PATCH 06/15] net/fsl_pq_mdio: " Javier Martinez Canillas
2016-09-12 14:03 ` [PATCH 07/15] i825xx: " Javier Martinez Canillas
2016-09-12 14:03 ` [PATCH 08/15] ixgbe: " Javier Martinez Canillas
2016-09-12 15:36   ` Greg [this message]
2016-09-12 14:03 ` [PATCH 09/15] net: mvneta: " Javier Martinez Canillas
2016-09-12 14:06   ` Gregory CLEMENT
2016-09-12 14:03 ` [PATCH 10/15] natsemi: " Javier Martinez Canillas
2016-09-12 14:03 ` [PATCH 11/15] sfc: " Javier Martinez Canillas
2016-09-12 14:31   ` Bert Kenward
2016-09-12 14:03 ` [PATCH 12/15] sis900: " Javier Martinez Canillas
2016-09-12 17:10   ` Daniele Venzano
2016-09-12 14:03 ` [PATCH 13/15] stmmac: " Javier Martinez Canillas
2016-09-12 16:47   ` Alexandre Torgue
2016-09-12 14:03 ` [PATCH 14/15] hamradio: " Javier Martinez Canillas
2016-09-12 14:03 ` [PATCH 15/15] iwlegacy: " Javier Martinez Canillas
2016-09-13  3:28 ` [PATCH 00/15] drivers: net: " 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=1473694563.4320.4.camel@gmail.com \
    --to=gvrose8192@gmail.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=javier@osg.samsung.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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).