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]
Message-ID: <aGPZZcb9D4qKr2rM@wunner.de>
Date: Tue, 1 Jul 2025 14:49:41 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Manivannan Sadhasivam <mani@...nel.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
	bhelgaas@...gle.com, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Jim Quinlan <james.quinlan@...adcom.com>
Subject: Re: [PATCH v2] PCI/pwrctrl: Skip creating pwrctrl device unless
 CONFIG_PCI_PWRCTRL is enabled

On Tue, Jul 01, 2025 at 05:27:27PM +0530, Manivannan Sadhasivam wrote:
> On Tue, Jul 01, 2025 at 09:00:34AM GMT, Lukas Wunner wrote:
> > Hm, why does pci_pwrctrl_create_device() return a pointer, even though the
> > sole caller doesn't make any use of it?  Why not return a negative errno?
> > 
> > Then you could just do this:
> > 
> > 	if (!IS_ENABLED(CONFIG_PCI_PWRCTRL))
> > 		return 0;
> > 
> > ... at the top of the function and you don't need the extra LoC for the
> > empty inline stub.
> 
> This is what I initially submitted [1] though that returned NULL, but the
> idea was the same. But Bjorn didn't like that.
[...]

Thanks for summarizing the state of the discussion, I apologize for not
having paid sufficient attention to the thread.

Reviewed-by: Lukas Wunner <lukas@...ner.de>

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ