From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796395058; b=wu4zO+MumOwM/gOqpg10g9+uS1xuruA3E4rV35fyuY74Ad3r2yyn4YSRshaMEKtbHv0V Id1w/SEgA/4EwBzSmCLxvtfJfZl1DXth+hc/IrsVsTZ71vYnLpkEzH3BzTYXY2STKp75U y3WGXAJRJnILb8EhpjlUKULUwQDf3bRosnxUdGg9cX66kRL+Y4Gr+9g42Cu+EL6KfyQk4 SOhW2z21IctVgOapUI86qNI2dNcYAisRakzhOMXwR4eKy9EZpdsceLmCaim4/faPDmpn2 ED3oUVKcWwdkWW9Z7OaKgrKLbu7eOZM47IgtvFwaTrb+vcPLuJoJRGxf4Qoyk6UQhoA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796395058; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Tx5oD+v6/t3qFPAL2QyVlbxGpqiQ1riT9x/lzpTAarQ=; b=j8h5KAnliHY1kruneERrN19i3awiZzoBXUv+xR4VuKhJhEmmN/inDBU/EdnaT/eGOBM8 f1iGAtjeTMWUaf7bBoWweGVi6hGnvPyTeRlWle4n/o39i4Dc9wMU/uvmK+gtJZsXtdYzh YR7NO/QbR+5TEl4tv25CZ0o3nDIPi1ZaDY4cH49ygl/ysf+YrBBM1Xa89zr9os52aWc5e 8molb6YtKqNMWrWeU+0vT9GTCL6mz2JzwhJIQwQBkewSwKBb99Ibi2b22vpw1SqgQZrd/ 8DP7ROfIc6XI/rsJeO2+kng9DHjLdKkuIPNZFIV15JHXBk4oaDp7m0ERXYonyQTCzVg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PKEwksyo; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6161E606A322 for ; Fri, 4 Dec 2026 14:37:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PKEwksyo Received: by smtp.kernel.org (Postfix) with ESMTPSA id E53181F000C2; Fri, 4 Dec 2026 14:37:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796395058; bh=Tx5oD+v6/t3qFPAL2QyVlbxGpqiQ1riT9x/lzpTAarQ=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=PKEwksyosQA/Yxeb8b2nJAGktbCI0VyBsx5BKnGsUdi+cRngZUW2CQuvnpEIEWscY unmPkER5TO1n/txaxaiO7Hrps7LvsfS6eLeYhNtSzLbsROnC8wpbWKZgpk5t/b4g/L m+ehq6DJBor6Ogl0s4QXwld80r5EHB9P7a30iAFeRsplHmTVQI17x6QVfb/B4srddJ D14PU8X2QL5qSBvUweue74MCnzK+H0lyEsHdOick1njThc4s/9DDzczgIk5tdEPtvB DCmXpY/x2/ktGGvnrlcgs4BAPqVSBU58/N0tMHNag8VXR9drmb0u1va+i3evWgc0/z lwMk7hgJSS9EA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2] PCI: xilinx-nwl: Use devm_clk_get_enabled() in nwl_pcie_probe() Reply-To: sashiko-reviews@lists.linux.dev To: "Markus Elfring" , linux-pci@vger.kernel.org In-Reply-To: <4d62f3cc-f1da-46ea-aab7-1c69770399b3@web.de> References: <4d62f3cc-f1da-46ea-aab7-1c69770399b3@web.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 14:37:37 +0000 X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [Low] PCI: xilinx-nwl: commit message lacks rationale and prose formatting - [Low] PCI: xilinx-nwl: unused clk field retained in struct nwl_pcie - [Low] PCI: xilinx-nwl: dropped error log on clock failure in nwl_pcie_probe() -- commit ea3dc9c7727e38909d19bde17e7137893bae16bc Author: Markus Elfring > PCI: xilinx-nwl: Use devm_clk_get_enabled() in nwl_pcie_probe() > > Replace the combination of devm_clk_get() and clk_prepare_enable() > by a devm_clk_get_enabled() call. > Delete a clk_disable_unprepare() call on an error handling path > and in the implementation of the function =E2=80=9Cnwl_pcie_remove=E2=80= =9D. > Drop the label =E2=80=9Cerr_clk=E2=80=9D. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring [Severity: Low] As reported by Manivannan Sadhasivam on v1 [1], the commit message should be contiguous prose explaining what the patch does and why it is needed, rather than listing edits line by line and calling this cleanup an issue detected by Coccinelle. It also omits mentioning that the dev_err() message on clock enable failure is removed. > diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/contr= oller/pcie-xilinx-nwl.c > index 0dee19fa24ca3..fd134317e9c48 100644 > --- a/drivers/pci/controller/pcie-xilinx-nwl.c > +++ b/drivers/pci/controller/pcie-xilinx-nwl.c > @@ -844,20 +844,14 @@ static int nwl_pcie_probe(struct platform_device *p= dev) > return err; > } > =20 > - pcie->clk =3D devm_clk_get(dev, NULL); > + pcie->clk =3D devm_clk_get_enabled(dev, NULL); > if (IS_ERR(pcie->clk)) > return PTR_ERR(pcie->clk); [Severity: Low] Is the clk field in struct nwl_pcie still needed? With both clk_disable_unprepare() calls removed from nwl_pcie_probe() and nwl_pcie_remove(), pcie->clk is never read outside this check, so a local struct clk *clk variable can be used instead and the struct member dropped. > - err =3D clk_prepare_enable(pcie->clk); > - if (err) { > - dev_err(dev, "can't enable PCIe ref clock\n"); > - return err; > - } [Severity: Low] Should this preserve an error log when getting or enabling the clock fails? devm_clk_get_enabled() does not print an error on failure, so returning PTR_ERR(pcie->clk) silently drops the diagnostic message. Using dev_err_probe() would keep the failure log while handling -EPROBE_DEFER. [1] https://lore.kernel.org/r/179562889095.5580.5805178037943195830.b4-repl= y@b4 --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/4d62f3cc-f1da-46ea-= aab7-1c69770399b3@web.de?part=3D1