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


Groups > linux.kernel > #1621633

Re: [PATCH net-next] net: dsa: add CONFIG_NET_DSA_LEGACY

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH net-next] net: dsa: add CONFIG_NET_DSA_LEGACY
Date 2017-04-11 23:30 +0200
Message-ID <tvbwl-3ZY-5@gated-at.bofh.it> (permalink)
References <tvb3k-3yo-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> +#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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next] net: dsa: add CONFIG_NET_DSA_LEGACY Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-04-11 23:00 +0200
  Re: [PATCH net-next] net: dsa: add CONFIG_NET_DSA_LEGACY Andrew Lunn <andrew@lunn.ch> - 2017-04-11 23:30 +0200
    Re: [PATCH net-next] net: dsa: add CONFIG_NET_DSA_LEGACY Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-04-12 17:00 +0200

csiph-web