Skip to contentSkip to conversation

phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments

PATCH In review Vinod Koul 3 participants 9 messages Jul 8, 2020 – Jul 13, 2020

Subsystems (5)
lore
Share & tools
lore

Vinod Koul

author maintainer
#0 lore raw

PATCH 1/6 phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments

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 <[email protected]>
Cc Igal Liberman <[email protected]>
---
 drivers/phy/marvell/phy-mvebu-a3700-utmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/marvell/phy-mvebu-a3700-utmi.c +1 -1
index 23bc3bf5c4c0..8834436bc9db 100644
@@ -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
  */
Signature · 1 line
2.26.2
author maintainer
#1 lore raw

PATCH 2/6 phy: mapphone-mdm6600: Add missing description for some structure fields

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 <[email protected]>
---
 drivers/phy/motorola/phy-mapphone-mdm6600.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/phy/motorola/phy-mapphone-mdm6600.c +2 -1
index 94a34cf75eb3..5172971f4c36 100644
@@ -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)
 {
Signature · 1 line
2.26.2
author maintainer
#2 lore raw

PATCH 3/6 phy: xgene: remove unsigned integer comparison with less than zero

In reply to Vinod Koul

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

---
 drivers/phy/phy-xgene.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/phy-xgene.c +1 -1
index 7a33ec12f71b..b88922e7de1d 100644
@@ -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];
Signature · 1 line
2.26.2
author maintainer
#3 lore raw

PATCH 4/6 phy: rockchip-typec: use correct format for structure description

In reply to Vinod Koul

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

---
 drivers/phy/rockchip/phy-rockchip-typec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/rockchip/phy-rockchip-typec.c +1 -1
index 24563160197f..70a31251b202 100644
@@ -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.
Signature · 1 line
2.26.2
author maintainer
#4 lore raw

PATCH 5/6 phy: exynos5-usbdrd: use correct format for structure description

In reply to Vinod Koul

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 <[email protected]>
---
 drivers/phy/samsung/phy-exynos5-usbdrd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/phy/samsung/phy-exynos5-usbdrd.c +3 -3
index eb06ce9f748f..bfb0e8914103 100644
@@ -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;
Signature · 1 line
2.26.2
Acked-by on v1 5/6
#5 lore raw

Re: [PATCH 5/6] phy: exynos5-usbdrd: use correct format for structure description

Quoted 8 lines · Vinod Koul

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'

Quoted 5 lines

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

Cc Marek Szyprowski <[email protected]>
Quoted 16 lines
---
  drivers/phy/samsung/phy-exynos5-usbdrd.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/phy/samsung/phy-exynos5-usbdrd.c +1 -1
index eb06ce9f748f..bfb0e8914103 100644
@@ -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

drivers/phy/samsung/phy-exynos5-usbdrd.c struct exynos5_usbdrd_phy_drvdata { · line 193

Quoted 10 lines
drivers/phy/samsung/phy-exynos5-usbdrd.c +2 -2
   *	       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

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
author maintainer
#6 lore raw

PATCH 6/6 phy: stm32: use NULL instead of zero

In reply to Vinod Koul

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 <[email protected]>
---
 drivers/phy/st/phy-stm32-usbphyc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/st/phy-stm32-usbphyc.c +2 -2
index 56bdea4b0bd9..2b3639cba51a 100644
@@ -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);
Signature · 1 line
2.26.2
Reviewed-by on v1 6/6
#7 lore raw

Re: [PATCH 6/6] phy: stm32: use NULL instead of zero

Hi Vinod,

Quoted 11 lines · Vinod Koul

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 <[email protected]>

Thanks!

Regards,
Amelie

Quoted 27 lines
---
  drivers/phy/st/phy-stm32-usbphyc.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/st/phy-stm32-usbphyc.c +2 -2
index 56bdea4b0bd9..2b3639cba51a 100644
@@ -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);
author maintainer
#8 lore raw
In reply to Vinod Koul
Quoted 3 lines · Vinod Koul

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

Signature · 1 line
~Vinod