linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments
@ 2020-07-08 13:28 Vinod Koul
  2020-07-08 13:28 ` [PATCH 2/6] phy: mapphone-mdm6600: Add missing description for some structure fields Vinod Koul
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Vinod Koul @ 2020-07-08 13:28 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: linux-kernel, Vinod Koul, Miquel Raynal, Igal Liberman

We get warning with W=1 build:
drivers/phy/marvell/phy-mvebu-a3700-utmi.c:84: warning: Function
parameter or member 'usb_misc' not described in 'mvebu_a3700_utmi'

Fix that by correcting the typo usb_mis

Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Igal Liberman <igall@marvell.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 drivers/phy/marvell/phy-mvebu-a3700-utmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/marvell/phy-mvebu-a3700-utmi.c b/drivers/phy/marvell/phy-mvebu-a3700-utmi.c
index 23bc3bf5c4c0..8834436bc9db 100644
--- a/drivers/phy/marvell/phy-mvebu-a3700-utmi.c
+++ b/drivers/phy/marvell/phy-mvebu-a3700-utmi.c
@@ -72,7 +72,7 @@ struct mvebu_a3700_utmi_caps {
  * struct mvebu_a3700_utmi - PHY driver data
  *
  * @regs: PHY registers
- * @usb_mis: Regmap with USB miscellaneous registers including PHY ones
+ * @usb_misc: Regmap with USB miscellaneous registers including PHY ones
  * @caps: PHY capabilities
  * @phy: PHY handle
  */
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/6] phy: mapphone-mdm6600: Add missing description for some structure fields
  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 ` Vinod Koul
  2020-07-08 13:28 ` [PATCH 3/6] phy: xgene: remove unsigned integer comparison with less than zero Vinod Koul
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Vinod Koul @ 2020-07-08 13:28 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: linux-kernel, Vinod Koul, Tony Lindgren

We get warning with W=1 build:
drivers/phy/motorola/phy-mapphone-mdm6600.c:185: warning: Function
parameter or member 'val' not described in 'phy_mdm6600_cmd'
drivers/phy/motorola/phy-mapphone-mdm6600.c:200: warning: Function
parameter or member 'work' not described in 'phy_mdm6600_status'

Fix that by adding description for 'val' and 'work'

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 drivers/phy/motorola/phy-mapphone-mdm6600.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
index 94a34cf75eb3..5172971f4c36 100644
--- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
+++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
@@ -178,6 +178,7 @@ static const struct phy_ops gpio_usb_ops = {
 /**
  * phy_mdm6600_cmd() - send a command request to mdm6600
  * @ddata: device driver data
+ * @val: value of cmd to be set
  *
  * Configures the three command request GPIOs to the specified value.
  */
@@ -194,7 +195,7 @@ static void phy_mdm6600_cmd(struct phy_mdm6600 *ddata, int val)
 
 /**
  * phy_mdm6600_status() - read mdm6600 status lines
- * @ddata: device driver data
+ * @work: work structure
  */
 static void phy_mdm6600_status(struct work_struct *work)
 {
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/6] phy: xgene: remove unsigned integer comparison with less than zero
  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 ` Vinod Koul
  2020-07-08 13:28 ` [PATCH 4/6] phy: rockchip-typec: use correct format for structure description Vinod Koul
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Vinod Koul @ 2020-07-08 13:28 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: linux-kernel, Vinod Koul, Loc Ho

We get warning with W=1 build:
drivers/phy/phy-xgene.c: In function ‘xgene_phy_xlate’:
drivers/phy/phy-xgene.c:1618:20: warning: comparison of unsigned
expression in ‘< 0’ is always false [-Wtype-limits]
 1618 |  if (args->args[0] < MODE_SATA || args->args[0] >= MODE_MAX) |

args is uint32_t so can never be less than zero, so remove this check

Cc: Loc Ho <lho@apm.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 drivers/phy/phy-xgene.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/phy-xgene.c b/drivers/phy/phy-xgene.c
index 7a33ec12f71b..b88922e7de1d 100644
--- a/drivers/phy/phy-xgene.c
+++ b/drivers/phy/phy-xgene.c
@@ -1615,7 +1615,7 @@ static struct phy *xgene_phy_xlate(struct device *dev,
 
 	if (args->args_count <= 0)
 		return ERR_PTR(-EINVAL);
-	if (args->args[0] < MODE_SATA || args->args[0] >= MODE_MAX)
+	if (args->args[0] >= MODE_MAX)
 		return ERR_PTR(-EINVAL);
 
 	ctx->mode = args->args[0];
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/6] phy: rockchip-typec: use correct format for structure description
  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 ` Vinod Koul
  2020-07-08 13:28 ` [PATCH 5/6] phy: exynos5-usbdrd: " Vinod Koul
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Vinod Koul @ 2020-07-08 13:28 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: linux-kernel, Vinod Koul, Chris Zhong

We get warning with W=1 build:
drivers/phy/rockchip/phy-rockchip-typec.c:360: warning: cannot
understand function prototype: 'struct rockchip_usb3phy_port_cfg '

The 'struct rockchip_usb3phy_port_cfg ' is commented properly but uses
wrong format, so fix that up

Cc: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 drivers/phy/rockchip/phy-rockchip-typec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index 24563160197f..70a31251b202 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -347,7 +347,7 @@ struct usb3phy_reg {
 };
 
 /**
- * struct rockchip_usb3phy_port_cfg: usb3-phy port configuration.
+ * struct rockchip_usb3phy_port_cfg - usb3-phy port configuration.
  * @reg: the base address for usb3-phy config.
  * @typec_conn_dir: the register of type-c connector direction.
  * @usb3tousb2_en: the register of type-c force usb2 to usb2 enable.
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/6] phy: exynos5-usbdrd: use correct format for structure description
  2020-07-08 13:28 [PATCH 1/6] phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments Vinod Koul
                   ` (2 preceding siblings ...)
  2020-07-08 13:28 ` [PATCH 4/6] phy: rockchip-typec: use correct format for structure description Vinod Koul
@ 2020-07-08 13:28 ` Vinod Koul
  2020-07-09  7:13   ` Marek Szyprowski
  2020-07-08 13:28 ` [PATCH 6/6] phy: stm32: use NULL instead of zero Vinod Koul
  2020-07-13  6:46 ` [PATCH 1/6] phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments Vinod Koul
  5 siblings, 1 reply; 9+ messages in thread
From: Vinod Koul @ 2020-07-08 13:28 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: linux-kernel, Vinod Koul, Marek Szyprowski

We get warning with W=1 build:
drivers/phy/samsung/phy-exynos5-usbdrd.c:211: warning: Function
parameter or member 'phys' not described in 'exynos5_usbdrd_phy'
drivers/phy/samsung/phy-exynos5-usbdrd.c:211: warning: Function
parameter or member 'vbus' not described in 'exynos5_usbdrd_phy'
drivers/phy/samsung/phy-exynos5-usbdrd.c:211: warning: Function
parameter or member 'vbus_boost' not described in 'exynos5_usbdrd_phy'

These members are provided with description but format is not quite
right resulting in above warnings

Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 drivers/phy/samsung/phy-exynos5-usbdrd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
index eb06ce9f748f..bfb0e8914103 100644
--- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
+++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
@@ -180,14 +180,14 @@ struct exynos5_usbdrd_phy_drvdata {
  * @utmiclk: clock for utmi+ phy
  * @itpclk: clock for ITP generation
  * @drv_data: pointer to SoC level driver data structure
- * @phys[]: array for 'EXYNOS5_DRDPHYS_NUM' number of PHY
+ * @phys: array for 'EXYNOS5_DRDPHYS_NUM' number of PHY
  *	    instances each with its 'phy' and 'phy_cfg'.
  * @extrefclk: frequency select settings when using 'separate
  *	       reference clocks' for SS and HS operations
  * @ref_clk: reference clock to PHY block from which PHY's
  *	     operational clocks are derived
- * vbus: VBUS regulator for phy
- * vbus_boost: Boost regulator for VBUS present on few Exynos boards
+ * @vbus: VBUS regulator for phy
+ * @vbus_boost: Boost regulator for VBUS present on few Exynos boards
  */
 struct exynos5_usbdrd_phy {
 	struct device *dev;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/6] phy: stm32: use NULL instead of zero
  2020-07-08 13:28 [PATCH 1/6] phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments Vinod Koul
                   ` (3 preceding siblings ...)
  2020-07-08 13:28 ` [PATCH 5/6] phy: exynos5-usbdrd: " Vinod Koul
@ 2020-07-08 13:28 ` Vinod Koul
  2020-07-08 13:35   ` Amelie DELAUNAY
  2020-07-13  6:46 ` [PATCH 1/6] phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments Vinod Koul
  5 siblings, 1 reply; 9+ messages in thread
From: Vinod Koul @ 2020-07-08 13:28 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: linux-kernel, Vinod Koul, Amelie Delaunay

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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 6/6] phy: stm32: use NULL instead of zero
  2020-07-08 13:28 ` [PATCH 6/6] phy: stm32: use NULL instead of zero Vinod Koul
@ 2020-07-08 13:35   ` Amelie DELAUNAY
  0 siblings, 0 replies; 9+ messages in thread
From: Amelie DELAUNAY @ 2020-07-08 13:35 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I; +Cc: linux-kernel

Hi Vinod,

On 7/8/20 3:28 PM, Vinod Koul wrote:
> 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>

Reviewed-by: Amelie Delaunay <amelie.delaunay@st.com>

Thanks!

Regards,
Amelie

> ---
>   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);
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 5/6] phy: exynos5-usbdrd: use correct format for structure description
  2020-07-08 13:28 ` [PATCH 5/6] phy: exynos5-usbdrd: " Vinod Koul
@ 2020-07-09  7:13   ` Marek Szyprowski
  0 siblings, 0 replies; 9+ messages in thread
From: Marek Szyprowski @ 2020-07-09  7:13 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I; +Cc: linux-kernel


On 08.07.2020 15:28, Vinod Koul wrote:
> We get warning with W=1 build:
> drivers/phy/samsung/phy-exynos5-usbdrd.c:211: warning: Function
> parameter or member 'phys' not described in 'exynos5_usbdrd_phy'
> drivers/phy/samsung/phy-exynos5-usbdrd.c:211: warning: Function
> parameter or member 'vbus' not described in 'exynos5_usbdrd_phy'
> drivers/phy/samsung/phy-exynos5-usbdrd.c:211: warning: Function
> parameter or member 'vbus_boost' not described in 'exynos5_usbdrd_phy'
>
> These members are provided with description but format is not quite
> right resulting in above warnings
>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>   drivers/phy/samsung/phy-exynos5-usbdrd.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> index eb06ce9f748f..bfb0e8914103 100644
> --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
> +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> @@ -180,14 +180,14 @@ struct exynos5_usbdrd_phy_drvdata {
>    * @utmiclk: clock for utmi+ phy
>    * @itpclk: clock for ITP generation
>    * @drv_data: pointer to SoC level driver data structure
> - * @phys[]: array for 'EXYNOS5_DRDPHYS_NUM' number of PHY
> + * @phys: array for 'EXYNOS5_DRDPHYS_NUM' number of PHY
>    *	    instances each with its 'phy' and 'phy_cfg'.
>    * @extrefclk: frequency select settings when using 'separate
>    *	       reference clocks' for SS and HS operations
>    * @ref_clk: reference clock to PHY block from which PHY's
>    *	     operational clocks are derived
> - * vbus: VBUS regulator for phy
> - * vbus_boost: Boost regulator for VBUS present on few Exynos boards
> + * @vbus: VBUS regulator for phy
> + * @vbus_boost: Boost regulator for VBUS present on few Exynos boards
>    */
>   struct exynos5_usbdrd_phy {
>   	struct device *dev;

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/6] phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments
  2020-07-08 13:28 [PATCH 1/6] phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments Vinod Koul
                   ` (4 preceding siblings ...)
  2020-07-08 13:28 ` [PATCH 6/6] phy: stm32: use NULL instead of zero Vinod Koul
@ 2020-07-13  6:46 ` Vinod Koul
  5 siblings, 0 replies; 9+ messages in thread
From: Vinod Koul @ 2020-07-13  6:46 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: linux-kernel, Miquel Raynal, Igal Liberman

On 08-07-20, 18:58, Vinod Koul wrote:
> We get warning with W=1 build:
> drivers/phy/marvell/phy-mvebu-a3700-utmi.c:84: warning: Function
> parameter or member 'usb_misc' not described in 'mvebu_a3700_utmi'

Applied all now

-- 
~Vinod

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-07-13  6:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 6/6] phy: stm32: use NULL instead of zero Vinod Koul
2020-07-08 13:35   ` Amelie DELAUNAY
2020-07-13  6:46 ` [PATCH 1/6] phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments Vinod Koul

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).