lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87shldznme.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>
Date:   Wed, 12 Apr 2017 10:50:17 -0400
From:   Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To:     Andrew Lunn <andrew@...n.ch>
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

Hi Andrew,

Andrew Lunn <andrew@...n.ch> writes:

>> +#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 */
>
> 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.

I'll make the legacy code compile anyway then.

Thanks!

        Vivien

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ