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: <CAMRc=Mcy8eo-nHFj+s8TO_NekTz6x-y=BYevz5Z2RTwuUpdcbA@mail.gmail.com>
Date: Thu, 7 Nov 2024 10:52:35 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: manivannan.sadhasivam@...aro.org, Bjorn Helgaas <bhelgaas@...gle.com>, 
	Bartosz Golaszewski <bartosz.golaszewski@...aro.org>, linux-pci@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Dmitry Baryshkov <dmitry.baryshkov@...aro.org>, 
	Johan Hovold <johan+linaro@...nel.org>, Abel Vesa <abel.vesa@...aro.org>, 
	Stephan Gerhold <stephan.gerhold@...aro.org>, 
	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>, 
	Bjorn Andersson <bjorn.andersson@....qualcomm.com>, stable+noautosel@...nel.org, 
	Krishna chaitanya chundru <quic_krichai@...cinc.com>
Subject: Re: [PATCH v2 2/5] PCI/pwrctl: Create pwrctl devices only if at least
 one power supply is present

On Wed, Nov 6, 2024 at 10:28 PM Bjorn Helgaas <helgaas@...nel.org> wrote:
>
> On Fri, Oct 25, 2024 at 01:24:52PM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> > From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
> >
> > Currently, pwrctl devices are created if the corresponding PCI nodes are
> > defined in devicetree. But this is not correct, because not all PCI nodes
> > defined in devicetree require pwrctl support. Pwrctl comes into picture
> > only when the device requires kernel to manage its power state. This can
> > be determined using the power supply properties present in the devicetree
> > node of the device.
>
> > +bool of_pci_is_supply_present(struct device_node *np)
> > +{
> > +     struct property *prop;
> > +     char *supply;
> > +
> > +     if (!np)
> > +             return false;
>
> Why do we need to test !np here?  It should always be non-NULL.
>

Right, I think this can be dropped. We check for the OF node in the
function above.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ