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@wunner.de
Lukas