* [PATCH] Replace IS_ENABLED(CONFIG_FCOE) in linux/netdevice.h
@ 2012-03-16 0:30 Tony Breeds
2012-03-16 0:51 ` David Miller
2012-03-16 0:55 ` Ben Hutchings
0 siblings, 2 replies; 4+ messages in thread
From: Tony Breeds @ 2012-03-16 0:30 UTC (permalink / raw)
To: Robert Love, James E.J. Bottomley, David S. Miller
Cc: devel, netdev, linux-scsi, linux-kernel
On platforms that (or configs that do not have PCI support building any
code that includes linux/netdevice.h we see the following warnings:
include/linux/netdevice.h:964:1: warning: "__enabled_CONFIG_FCOE" is not defined [-Wundef]
include/linux/netdevice.h:964:1: warning: "__enabled_CONFIG_FCOE_MODULE" is not defined [-Wundef]
In the case of this file we can trivially fallback to the old school
#if defined(...) syntax.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
To: Robert Love <robert.w.love@intel.com>
To: "James E.J. Bottomley" <JBottomley@parallels.com>
To: "David S. Miller" <davem@davemloft.net>
CC: devel@open-fcoe.org
CC: netdev@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
include/linux/netdevice.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 0eac07c..3e4bbbc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -961,7 +961,7 @@ struct net_device_ops {
int (*ndo_get_vf_port)(struct net_device *dev,
int vf, struct sk_buff *skb);
int (*ndo_setup_tc)(struct net_device *dev, u8 tc);
-#if IS_ENABLED(CONFIG_FCOE)
+#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
int (*ndo_fcoe_enable)(struct net_device *dev);
int (*ndo_fcoe_disable)(struct net_device *dev);
int (*ndo_fcoe_ddp_setup)(struct net_device *dev,
@@ -978,7 +978,7 @@ struct net_device_ops {
struct netdev_fcoe_hbainfo *hbainfo);
#endif
-#if IS_ENABLED(CONFIG_LIBFCOE)
+#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
#define NETDEV_FCOE_WWNN 0
#define NETDEV_FCOE_WWPN 1
int (*ndo_fcoe_get_wwn)(struct net_device *dev,
@@ -1286,7 +1286,7 @@ struct net_device {
struct netdev_tc_txq tc_to_txq[TC_MAX_QUEUE];
u8 prio_tc_map[TC_BITMASK + 1];
-#if IS_ENABLED(CONFIG_FCOE)
+#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
/* max exchange id for FCoE LRO by ddp */
unsigned int fcoe_ddp_xid;
#endif
--
1.7.7.6
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Replace IS_ENABLED(CONFIG_FCOE) in linux/netdevice.h
2012-03-16 0:30 [PATCH] Replace IS_ENABLED(CONFIG_FCOE) in linux/netdevice.h Tony Breeds
@ 2012-03-16 0:51 ` David Miller
2012-03-16 0:55 ` Ben Hutchings
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2012-03-16 0:51 UTC (permalink / raw)
To: tony; +Cc: robert.w.love, JBottomley, devel, netdev, linux-scsi, linux-kernel
From: Tony Breeds <tony@bakeyournoodle.com>
Date: Fri, 16 Mar 2012 11:30:15 +1100
> On platforms that (or configs that do not have PCI support building any
> code that includes linux/netdevice.h we see the following warnings:
>
> include/linux/netdevice.h:964:1: warning: "__enabled_CONFIG_FCOE" is not defined [-Wundef]
> include/linux/netdevice.h:964:1: warning: "__enabled_CONFIG_FCOE_MODULE" is not defined [-Wundef]
>
> In the case of this file we can trivially fallback to the old school
> #if defined(...) syntax.
>
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Fix IS_ENABLED to handle cases like this so we don't need special
cases like this scattered around the tree.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Replace IS_ENABLED(CONFIG_FCOE) in linux/netdevice.h
2012-03-16 0:30 [PATCH] Replace IS_ENABLED(CONFIG_FCOE) in linux/netdevice.h Tony Breeds
2012-03-16 0:51 ` David Miller
@ 2012-03-16 0:55 ` Ben Hutchings
2012-03-16 3:22 ` Tony Breeds
1 sibling, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2012-03-16 0:55 UTC (permalink / raw)
To: Tony Breeds
Cc: Robert Love, James E.J. Bottomley, David S. Miller, devel,
netdev, linux-scsi, linux-kernel
On Fri, 2012-03-16 at 11:30 +1100, Tony Breeds wrote:
> On platforms that (or configs that do not have PCI support building any
> code that includes linux/netdevice.h we see the following warnings:
>
> include/linux/netdevice.h:964:1: warning: "__enabled_CONFIG_FCOE" is not defined [-Wundef]
> include/linux/netdevice.h:964:1: warning: "__enabled_CONFIG_FCOE_MODULE" is not defined [-Wundef]
>
> In the case of this file we can trivially fallback to the old school
> #if defined(...) syntax.
[...]
The script that generates those symbols should be fixed instead.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Replace IS_ENABLED(CONFIG_FCOE) in linux/netdevice.h
2012-03-16 0:55 ` Ben Hutchings
@ 2012-03-16 3:22 ` Tony Breeds
0 siblings, 0 replies; 4+ messages in thread
From: Tony Breeds @ 2012-03-16 3:22 UTC (permalink / raw)
To: Ben Hutchings
Cc: Robert Love, James E.J. Bottomley, David S. Miller, devel,
netdev, linux-scsi, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 871 bytes --]
On Fri, Mar 16, 2012 at 12:55:45AM +0000, Ben Hutchings wrote:
> On Fri, 2012-03-16 at 11:30 +1100, Tony Breeds wrote:
> > On platforms that (or configs that do not have PCI support building any
> > code that includes linux/netdevice.h we see the following warnings:
> >
> > include/linux/netdevice.h:964:1: warning: "__enabled_CONFIG_FCOE" is not defined [-Wundef]
> > include/linux/netdevice.h:964:1: warning: "__enabled_CONFIG_FCOE_MODULE" is not defined [-Wundef]
> >
> > In the case of this file we can trivially fallback to the old school
> > #if defined(...) syntax.
> [...]
>
> The script that generates those symbols should be fixed instead.
Sorry all, Yes this patch is bogus.
The platform was seeing this error wasn't sourceing
drivers/scsi/Kconfig, so those symbols will never be defined. I imagine
that's pretty rare.
Yours Tony
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-16 3:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-16 0:30 [PATCH] Replace IS_ENABLED(CONFIG_FCOE) in linux/netdevice.h Tony Breeds
2012-03-16 0:51 ` David Miller
2012-03-16 0:55 ` Ben Hutchings
2012-03-16 3:22 ` Tony Breeds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®