[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9efa0a3c-ffef-488a-97f3-45b9649d35fd@kernel.org>
Date: Sat, 29 Nov 2025 15:31:03 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: manivannan.sadhasivam@....qualcomm.com, Rob Herring <robh@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>, Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas.schier@...ux.dev>, Hans de Goede <hansg@...nel.org>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Mark Pearson <mpearson-lenovo@...ebb.ca>,
"Derek J. Clark" <derekjohn.clark@...il.com>,
Manivannan Sadhasivam <mani@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Marcel Holtmann <marcel@...tmann.org>,
Luiz Augusto von Dentz <luiz.dentz@...il.com>,
Bartosz Golaszewski <brgl@...ev.pl>
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kbuild@...r.kernel.org, platform-driver-x86@...r.kernel.org,
linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-bluetooth@...r.kernel.org,
linux-pm@...r.kernel.org, Stephan Gerhold <stephan.gerhold@...aro.org>,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
Subject: Re: [PATCH v2 10/10] power: sequencing: pcie-m2: Add support for PCIe
M.2 Key E connectors
On 25/11/2025 15:45, Manivannan Sadhasivam via B4 Relay wrote:
> static const struct pwrseq_pcie_m2_pdata pwrseq_pcie_m2_m_of_data = {
> .targets = pwrseq_pcie_m2_m_targets,
> };
> @@ -92,6 +174,96 @@ static int pwrseq_pcie_m2_match(struct pwrseq_device *pwrseq,
> return PWRSEQ_NO_MATCH;
> }
>
> +static int pwrseq_m2_pcie_notify(struct notifier_block *nb, unsigned long action,
> + void *data)
> +{
> + struct pwrseq_pcie_m2_ctx *ctx = container_of(nb, struct pwrseq_pcie_m2_ctx, nb);
> + struct pci_dev *pdev = to_pci_dev(data);
> + struct device_node *pci_remote __free(device_node) = NULL;
This is an undesired syntax explicitly documented as one to avoid. You
need here proper assignment, not NULL. Please don't use cleanup.h if you
do not intend to follow it because it does not make the code simpler.
> + struct device_node *serdev_remote __free(device_node) = NULL;
This is even worse. Instead of making it local scope, you have automatic
cleanup for entire function with completely redundant constructor.
Please, use cleanup.h only if you really want to follow its spirit.
Otherwise it does not make the code easier.
Best regards,
Krzysztof
Powered by blists - more mailing lists