[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170411212026.GA7023@lunn.ch>
Date: Tue, 11 Apr 2017 23:20:26 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel@...oirfairelinux.com,
"David S. Miller" <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH net-next] net: dsa: add CONFIG_NET_DSA_LEGACY
> +#ifdef CONFIG_NET_DSA_LEGACY
> static const char *mv88e6xxx_drv_probe(struct device *dsa_dev,
> struct device *host_dev, int sw_addr,
> void **priv)
> @@ -4256,6 +4257,7 @@ static const char *mv88e6xxx_drv_probe(struct device *dsa_dev,
>
> return NULL;
> }
> +#endif /* CONFIG_NET_DSA_LEGACY */
Hi Vivien
Rather than scatter #ifdef everywhere, can you use
if (!IS_ENABLED(CONFIG_NET_DSA_LEGACY))
return NULL
The compiler will then throw away the rest of the function, after
checking it does actually compile.
Andrew
Powered by blists - more mailing lists