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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 31 May 2016 14:20:46 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	Yuval.Mintz@...gic.com
Cc:	arnd@...db.de, manish.chopra@...gic.com,
	Sudarsana.Kalluru@...gic.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, Ariel.Elior@...gic.com
Subject: Re: [PATCH] qed: fix qed_fill_link() error handling

From: Yuval Mintz <Yuval.Mintz@...gic.com>
Date: Mon, 30 May 2016 16:24:07 +0000

>> +	if (IS_ENABLED(CONFIG_QED_SRIOV) && !IS_PF(hwfn->cdev)) {
>> +		qed_vf_get_link_params(hwfn, params);
>> +		qed_vf_get_link_state(hwfn, link);
>> +		qed_vf_get_link_caps(hwfn, link_caps);
>> +
>> +		return 0;
>> +	}
> 
> The IS_ENABLED here seems a bit wasteful to me - we have empty implementation
> under qed_vf.h just for this case [I.e., that SRIOV isn't enabled for qed].
> If all we're trying achieve is removing these gcc warnings, I think we can simply
> memset the structs in the currently-empty qed_vf_get_link_* functions.

I think both solutions are equally valid/elegant.

Arnd?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ