From: Vinod Koul <vkoul@kernel.org>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: linux-kernel@vger.kernel.org, Vinod Koul <vkoul@kernel.org>,
Amelie Delaunay <amelie.delaunay@st.com>
Subject: [PATCH 6/6] phy: stm32: use NULL instead of zero
Date: Wed, 8 Jul 2020 18:58:09 +0530 [thread overview]
Message-ID: <20200708132809.265967-6-vkoul@kernel.org> (raw)
In-Reply-To: <20200708132809.265967-1-vkoul@kernel.org>
devm_clk_get() and devm_reset_control_get() expect a const char *id for
the last arg, but a value of zero was provided. This results in below
sparse warning:
drivers/phy/st/phy-stm32-usbphyc.c:330:42: warning: Using plain integer as NULL pointer
drivers/phy/st/phy-stm32-usbphyc.c:343:52: warning: Using plain integer as NULL pointer
Instead of zero, use NULL
Cc: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
drivers/phy/st/phy-stm32-usbphyc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-usbphyc.c
index 56bdea4b0bd9..2b3639cba51a 100644
--- a/drivers/phy/st/phy-stm32-usbphyc.c
+++ b/drivers/phy/st/phy-stm32-usbphyc.c
@@ -327,7 +327,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
if (IS_ERR(usbphyc->base))
return PTR_ERR(usbphyc->base);
- usbphyc->clk = devm_clk_get(dev, 0);
+ usbphyc->clk = devm_clk_get(dev, NULL);
if (IS_ERR(usbphyc->clk)) {
ret = PTR_ERR(usbphyc->clk);
dev_err(dev, "clk get failed: %d\n", ret);
@@ -340,7 +340,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
return ret;
}
- usbphyc->rst = devm_reset_control_get(dev, 0);
+ usbphyc->rst = devm_reset_control_get(dev, NULL);
if (!IS_ERR(usbphyc->rst)) {
reset_control_assert(usbphyc->rst);
udelay(2);
--
2.26.2
next prev parent reply other threads:[~2020-07-08 13:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 13:28 [PATCH 1/6] phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments Vinod Koul
2020-07-08 13:28 ` [PATCH 2/6] phy: mapphone-mdm6600: Add missing description for some structure fields Vinod Koul
2020-07-08 13:28 ` [PATCH 3/6] phy: xgene: remove unsigned integer comparison with less than zero Vinod Koul
2020-07-08 13:28 ` [PATCH 4/6] phy: rockchip-typec: use correct format for structure description Vinod Koul
2020-07-08 13:28 ` [PATCH 5/6] phy: exynos5-usbdrd: " Vinod Koul
2020-07-09 7:13 ` Marek Szyprowski
2020-07-08 13:28 ` Vinod Koul [this message]
2020-07-08 13:35 ` [PATCH 6/6] phy: stm32: use NULL instead of zero Amelie DELAUNAY
2020-07-13 6:46 ` [PATCH 1/6] phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200708132809.265967-6-vkoul@kernel.org \
--to=vkoul@kernel.org \
--cc=amelie.delaunay@st.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome