* [PATCH] staging: hikey9xx: Fix incorrect assignement
@ 2020-09-21 17:41 Alex Dewar
2020-09-21 21:21 ` [PATCH v2] staging: hikey9xx: Fix incorrect assignment Alex Dewar
0 siblings, 1 reply; 3+ messages in thread
From: Alex Dewar @ 2020-09-21 17:41 UTC (permalink / raw)
Cc: Alex Dewar, Mauro Carvalho Chehab, Greg Kroah-Hartman, Yu Chen,
devel, linux-kernel
In hi3670_phy_probe(), when reading property tx-vboost-lvl fails, its
default value is assigned to priv->eye_diagram_param, rather than
priv->tx_vboost_lvl. Fix this.
Fixes: 8971a3b880b2 ("staging: hikey9xx: add USB physical layer for Kirin 3670")
Addresses-Coverity: CID 1497107: Incorrect expression (COPY_PASTE_ERROR)
Signed-off-by: Alex Dewar <a.dewar@sussex.ac.uk>
---
drivers/staging/hikey9xx/phy-hi3670-usb3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/hikey9xx/phy-hi3670-usb3.c b/drivers/staging/hikey9xx/phy-hi3670-usb3.c
index 42dbc20a0b9a..4fc013911a78 100644
--- a/drivers/staging/hikey9xx/phy-hi3670-usb3.c
+++ b/drivers/staging/hikey9xx/phy-hi3670-usb3.c
@@ -640,7 +640,7 @@ static int hi3670_phy_probe(struct platform_device *pdev)
if (of_property_read_u32(dev->of_node, "hisilicon,tx-vboost-lvl",
&priv->tx_vboost_lvl))
- priv->eye_diagram_param = KIRIN970_USB_DEFAULT_PHY_VBOOST;
+ priv->tx_vboost_lvl = KIRIN970_USB_DEFAULT_PHY_VBOOST;
phy = devm_phy_create(dev, NULL, &hi3670_phy_ops);
if (IS_ERR(phy))
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] staging: hikey9xx: Fix incorrect assignment
2020-09-21 17:41 [PATCH] staging: hikey9xx: Fix incorrect assignement Alex Dewar
@ 2020-09-21 21:21 ` Alex Dewar
2020-09-22 7:49 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 3+ messages in thread
From: Alex Dewar @ 2020-09-21 21:21 UTC (permalink / raw)
Cc: Alex Dewar, Mauro Carvalho Chehab, Greg Kroah-Hartman, Yu Chen,
devel, linux-kernel
In hi3670_phy_probe(), when reading property tx-vboost-lvl fails, its
default value is assigned to priv->eye_diagram_param, rather than to
priv->tx_vboost_lvl. Fix this.
Fixes: 8971a3b880b2 ("staging: hikey9xx: add USB physical layer for Kirin 3670")
Addresses-Coverity: CID 1497107: Incorrect expression (COPY_PASTE_ERROR)
Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
---
v2: Fix my email address and a typo in title
drivers/staging/hikey9xx/phy-hi3670-usb3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/hikey9xx/phy-hi3670-usb3.c b/drivers/staging/hikey9xx/phy-hi3670-usb3.c
index 42dbc20a0b9a..4fc013911a78 100644
--- a/drivers/staging/hikey9xx/phy-hi3670-usb3.c
+++ b/drivers/staging/hikey9xx/phy-hi3670-usb3.c
@@ -640,7 +640,7 @@ static int hi3670_phy_probe(struct platform_device *pdev)
if (of_property_read_u32(dev->of_node, "hisilicon,tx-vboost-lvl",
&priv->tx_vboost_lvl))
- priv->eye_diagram_param = KIRIN970_USB_DEFAULT_PHY_VBOOST;
+ priv->tx_vboost_lvl = KIRIN970_USB_DEFAULT_PHY_VBOOST;
phy = devm_phy_create(dev, NULL, &hi3670_phy_ops);
if (IS_ERR(phy))
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] staging: hikey9xx: Fix incorrect assignment
2020-09-21 21:21 ` [PATCH v2] staging: hikey9xx: Fix incorrect assignment Alex Dewar
@ 2020-09-22 7:49 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2020-09-22 7:49 UTC (permalink / raw)
To: Alex Dewar; +Cc: Greg Kroah-Hartman, Yu Chen, devel, linux-kernel
Em Mon, 21 Sep 2020 22:21:47 +0100
Alex Dewar <alex.dewar90@gmail.com> escreveu:
> In hi3670_phy_probe(), when reading property tx-vboost-lvl fails, its
> default value is assigned to priv->eye_diagram_param, rather than to
> priv->tx_vboost_lvl. Fix this.
>
> Fixes: 8971a3b880b2 ("staging: hikey9xx: add USB physical layer for Kirin 3670")
> Addresses-Coverity: CID 1497107: Incorrect expression (COPY_PASTE_ERROR)
> Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
Patch looks good to me. I also double-checked if everything
works ok after this fix - although it should, as the DT I'm using
has "hisilicon,tx-vboost-lvl" property defined. So:
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
> v2: Fix my email address and a typo in title
>
> drivers/staging/hikey9xx/phy-hi3670-usb3.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/hikey9xx/phy-hi3670-usb3.c b/drivers/staging/hikey9xx/phy-hi3670-usb3.c
> index 42dbc20a0b9a..4fc013911a78 100644
> --- a/drivers/staging/hikey9xx/phy-hi3670-usb3.c
> +++ b/drivers/staging/hikey9xx/phy-hi3670-usb3.c
> @@ -640,7 +640,7 @@ static int hi3670_phy_probe(struct platform_device *pdev)
>
> if (of_property_read_u32(dev->of_node, "hisilicon,tx-vboost-lvl",
> &priv->tx_vboost_lvl))
> - priv->eye_diagram_param = KIRIN970_USB_DEFAULT_PHY_VBOOST;
> + priv->tx_vboost_lvl = KIRIN970_USB_DEFAULT_PHY_VBOOST;
>
> phy = devm_phy_create(dev, NULL, &hi3670_phy_ops);
> if (IS_ERR(phy))
Thanks,
Mauro
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-22 7:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 17:41 [PATCH] staging: hikey9xx: Fix incorrect assignement Alex Dewar
2020-09-21 21:21 ` [PATCH v2] staging: hikey9xx: Fix incorrect assignment Alex Dewar
2020-09-22 7:49 ` Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).