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: <20120708.051550.2116528390715127326.davem@davemloft.net>
Date:	Sun, 08 Jul 2012 05:15:50 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	meravs@...adcom.com
Cc:	netdev@...r.kernel.org, eilong@...adcom.com, dmitry@...adcom.com
Subject: Re: [net-next patch] bnx2x: Add run-time CNIC support

From: "Merav Sicron" <meravs@...adcom.com>
Date: Sun, 8 Jul 2012 14:00:39 +0300

> static int set_is_cnic_enabled(bool is_vf)
> {
>         if (is_vf)
>                 return 0;
> #if defined(CONFIG_CNIC) || defined(CONFIG_CNIC_MODULE)
>         return 1;
> #else
>         return 0;
> #endif
> }

I still think this is beyond ugly.

This ifdef just wants to die completely.  It serves no real
purpose as every distribution vendor that turns on your driver
will turn CNIC on as well.

And you have to address the lost of const'ness of the netdevice ops.
If you absolutely must have runtime method choices, you must use
multiple instances of netdevice ops and assign the appropriate one.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ