Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1481332 > unrolled thread

[PATCH 00/15] drivers: net: use IS_ENABLED() instead of checking for built-in or module

Started byJavier Martinez Canillas <javier@osg.samsung.com>
First post2016-09-12 16:10 +0200
Last post2016-09-13 05:30 +0200
Articles 6 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/15] drivers: net: use IS_ENABLED() instead of checking for built-in or module Javier Martinez Canillas <javier@osg.samsung.com> - 2016-09-12 16:10 +0200
    [PATCH 11/15] sfc: use IS_ENABLED() instead of checking for built-in or module Javier Martinez Canillas <javier@osg.samsung.com> - 2016-09-12 16:10 +0200
      Re: [PATCH 11/15] sfc: use IS_ENABLED() instead of checking for  built-in or module Bert Kenward <bkenward@solarflare.com> - 2016-09-12 16:40 +0200
    [PATCH 12/15] sis900: use IS_ENABLED() instead of checking for built-in or module Javier Martinez Canillas <javier@osg.samsung.com> - 2016-09-12 16:10 +0200
      Re: [PATCH 12/15] sis900: use IS_ENABLED() instead of checking for built-in or module Daniele Venzano <venza@brownhat.org> - 2016-09-12 19:20 +0200
    Re: [PATCH 00/15] drivers: net: use IS_ENABLED() instead of  checking for built-in or module David Miller <davem@davemloft.net> - 2016-09-13 05:30 +0200

#1481332 — [PATCH 00/15] drivers: net: use IS_ENABLED() instead of checking for built-in or module

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-09-12 16:10 +0200
Subject[PATCH 00/15] drivers: net: use IS_ENABLED() instead of checking for built-in or module
Message-ID<sgA5P-4ka-3@gated-at.bofh.it>
Hello David,

This trivial series is similar to [0] for net/ that you already merged, but
for drivers/net. The patches replaces the open coding to check for a Kconfig
symbol being built-in or module, with IS_ENABLED() macro that does the same.

Using the macro makes the code more readable by helping abstract away some
of the Kconfig built-in and module enable details.

[0]: https://lkml.org/lkml/2016/9/9/323

Best regards,
Javier


Javier Martinez Canillas (15):
  3c59x: use IS_ENABLED() instead of checking for built-in or module
  starfire: use IS_ENABLED() instead of checking for built-in or module
  ethernet: amd: use IS_ENABLED() instead of checking for built-in or
    module
  bnx2: use IS_ENABLED() instead of checking for built-in or module
  sundance: use IS_ENABLED() instead of checking for built-in or module
  net/fsl_pq_mdio: use IS_ENABLED() instead of checking for built-in or
    module
  i825xx: use IS_ENABLED() instead of checking for built-in or module
  ixgbe: use IS_ENABLED() instead of checking for built-in or module
  net: mvneta: use IS_ENABLED() instead of checking for built-in or
    module
  natsemi: use IS_ENABLED() instead of checking for built-in or module
  sfc: use IS_ENABLED() instead of checking for built-in or module
  sis900: use IS_ENABLED() instead of checking for built-in or module
  stmmac: use IS_ENABLED() instead of checking for built-in or module
  hamradio: use IS_ENABLED() instead of checking for built-in or module
  iwlegacy: use IS_ENABLED() instead of checking for built-in or module

 drivers/net/ethernet/3com/3c59x.c            | 2 +-
 drivers/net/ethernet/adaptec/starfire.c      | 2 +-
 drivers/net/ethernet/amd/7990.c              | 6 +++---
 drivers/net/ethernet/amd/amd8111e.c          | 2 +-
 drivers/net/ethernet/broadcom/bnx2.c         | 2 +-
 drivers/net/ethernet/dlink/sundance.c        | 2 +-
 drivers/net/ethernet/freescale/fsl_pq_mdio.c | 8 ++++----
 drivers/net/ethernet/i825xx/82596.c          | 4 ++--
 drivers/net/ethernet/intel/ixgbe/ixgbe.h     | 4 ++--
 drivers/net/ethernet/marvell/mvneta_bm.h     | 2 +-
 drivers/net/ethernet/natsemi/ns83820.c       | 2 +-
 drivers/net/ethernet/sfc/falcon_boards.c     | 4 ++--
 drivers/net/ethernet/sis/sis900.c            | 4 ++--
 drivers/net/ethernet/sis/sis900.h            | 2 +-
 drivers/net/ethernet/stmicro/stmmac/common.h | 2 +-
 drivers/net/hamradio/bpqether.c              | 2 +-
 drivers/net/wireless/intel/iwlegacy/common.h | 4 ++--
 17 files changed, 27 insertions(+), 27 deletions(-)

-- 
2.7.4

[toc] | [next] | [standalone]


#1481334 — [PATCH 11/15] sfc: use IS_ENABLED() instead of checking for built-in or module

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-09-12 16:10 +0200
Subject[PATCH 11/15] sfc: use IS_ENABLED() instead of checking for built-in or module
Message-ID<sgA5R-4ka-53@gated-at.bofh.it>
In reply to#1481332
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/sfc/falcon_boards.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/sfc/falcon_boards.c b/drivers/net/ethernet/sfc/falcon_boards.c
index 1736f4b806af..f6883b2b5da3 100644
--- a/drivers/net/ethernet/sfc/falcon_boards.c
+++ b/drivers/net/ethernet/sfc/falcon_boards.c
@@ -64,7 +64,7 @@
 #define LM87_ALARM_TEMP_INT		0x10
 #define LM87_ALARM_TEMP_EXT1		0x20
 
-#if defined(CONFIG_SENSORS_LM87) || defined(CONFIG_SENSORS_LM87_MODULE)
+#if IS_ENABLED(CONFIG_SENSORS_LM87)
 
 static int efx_poke_lm87(struct i2c_client *client, const u8 *reg_values)
 {
@@ -455,7 +455,7 @@ static int sfe4001_init(struct efx_nic *efx)
 	struct falcon_board *board = falcon_board(efx);
 	int rc;
 
-#if defined(CONFIG_SENSORS_LM90) || defined(CONFIG_SENSORS_LM90_MODULE)
+#if IS_ENABLED(CONFIG_SENSORS_LM90)
 	board->hwmon_client =
 		i2c_new_device(&board->i2c_adap, &sfe4001_hwmon_info);
 #else
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1481362 — Re: [PATCH 11/15] sfc: use IS_ENABLED() instead of checking for built-in or module

FromBert Kenward <bkenward@solarflare.com>
Date2016-09-12 16:40 +0200
SubjectRe: [PATCH 11/15] sfc: use IS_ENABLED() instead of checking for built-in or module
Message-ID<sgAyS-4vI-45@gated-at.bofh.it>
In reply to#1481334
On 12/09/16 15:03, 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>

Acked-by: Bert Kenward <bkenward@solarflare.com>

Thanks,

Bert.

[toc] | [prev] | [next] | [standalone]


#1481335 — [PATCH 12/15] sis900: use IS_ENABLED() instead of checking for built-in or module

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-09-12 16:10 +0200
Subject[PATCH 12/15] sis900: use IS_ENABLED() instead of checking for built-in or module
Message-ID<sgA5R-4ka-49@gated-at.bofh.it>
In reply to#1481332
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/sis/sis900.c | 4 ++--
 drivers/net/ethernet/sis/sis900.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c
index 95001ee408ab..6f85276376e8 100644
--- a/drivers/net/ethernet/sis/sis900.c
+++ b/drivers/net/ethernet/sis/sis900.c
@@ -1426,7 +1426,7 @@ static void sis900_set_mode(struct sis900_private *sp, int speed, int duplex)
 		rx_flags |= RxATX;
 	}
 
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
+#if IS_ENABLED(CONFIG_VLAN_8021Q)
 	/* Can accept Jumbo packet */
 	rx_flags |= RxAJAB;
 #endif
@@ -1750,7 +1750,7 @@ static int sis900_rx(struct net_device *net_dev)
 		data_size = rx_status & DSIZE;
 		rx_size = data_size - CRC_SIZE;
 
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
+#if IS_ENABLED(CONFIG_VLAN_8021Q)
 		/* ``TOOLONG'' flag means jumbo packet received. */
 		if ((rx_status & TOOLONG) && data_size <= MAX_FRAME_SIZE)
 			rx_status &= (~ ((unsigned int)TOOLONG));
diff --git a/drivers/net/ethernet/sis/sis900.h b/drivers/net/ethernet/sis/sis900.h
index 7d430d322931..f0da3dc52c01 100644
--- a/drivers/net/ethernet/sis/sis900.h
+++ b/drivers/net/ethernet/sis/sis900.h
@@ -310,7 +310,7 @@ enum sis630_revision_id {
 #define CRC_SIZE                4
 #define MAC_HEADER_SIZE         14
 
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
+#if IS_ENABLED(CONFIG_VLAN_8021Q)
 #define MAX_FRAME_SIZE  (1518 + 4)
 #else
 #define MAX_FRAME_SIZE  1518
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1481637 — Re: [PATCH 12/15] sis900: use IS_ENABLED() instead of checking for built-in or module

FromDaniele Venzano <venza@brownhat.org>
Date2016-09-12 19:20 +0200
SubjectRe: [PATCH 12/15] sis900: use IS_ENABLED() instead of checking for built-in or module
Message-ID<sgD3J-6fr-65@gated-at.bofh.it>
In reply to#1481335

On 12 September 2016 16:03:43 CEST, Javier Martinez Canillas <javier@osg.samsung.com> 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>

Acked-by: Daniele Venzano <venza@brownhat.org>

[toc] | [prev] | [next] | [standalone]


#1482125 — Re: [PATCH 00/15] drivers: net: use IS_ENABLED() instead of checking for built-in or module

FromDavid Miller <davem@davemloft.net>
Date2016-09-13 05:30 +0200
SubjectRe: [PATCH 00/15] drivers: net: use IS_ENABLED() instead of checking for built-in or module
Message-ID<sgMA1-4pU-9@gated-at.bofh.it>
In reply to#1481332
From: Javier Martinez Canillas <javier@osg.samsung.com>
Date: Mon, 12 Sep 2016 10:03:31 -0400

> This trivial series is similar to [0] for net/ that you already merged, but
> for drivers/net. The patches replaces the open coding to check for a Kconfig
> symbol being built-in or module, with IS_ENABLED() macro that does the same.

Series applied, thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web