phy: fix semicolon.cocci warnings
Subsystems (5)
PATCH 1/3 phy: fix semicolon.cocci warnings
Remove unneeded semicolon.
Generated by: coccinellery/semicolon/semicolon.cocci
--- drivers/phy/phy-brcm-sata.c | 6 +++--- drivers/phy/phy-exynos4210-usb2.c | 4 ++-- drivers/phy/phy-exynos4x12-usb2.c | 4 ++-- drivers/phy/phy-exynos5250-usb2.c | 2 +- drivers/phy/phy-rockchip-emmc.c | 2 +- drivers/phy/phy-s5pv210-usb2.c | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-)
drivers/phy/phy-brcm-sata.c +3 -3
@@ -140,7 +140,7 @@ static inline void __iomem *brcm_sata_pcb_base(struct brcm_sata_port *port)default :dev_err (priv->dev,"invalid phy version\n" );break ; - }; + }return priv->phy_base + (port->portnum * size); }
@@ -157,7 +157,7 @@ static inline void __iomem *brcm_sata_ctrl_base(struct brcm_sata_port *port)default :dev_err (priv->dev,"invalid phy version\n" );break ; - }; + }return priv->ctrl_base + (port->portnum * size); }
@@ -365,7 +365,7 @@ static int brcm_sata_phy_init(struct phy *phy)break ;default : rc = -ENODEV ; - }; + }return rc; }
drivers/phy/phy-exynos4210-usb2.c +2 -2
@@ -141,7 +141,7 @@ static void exynos4210_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu, offset, mask, on ?0 : mask); }
@@ -179,7 +179,7 @@ static void exynos4210_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on) rstbits =EXYNOS_4210_URSTCON_PHY1_P1P2 |EXYNOS_4210_URSTCON_HOST_LINK_P2 ;break ; - }; + }if (on) { clk =readl (drv->reg_phy +EXYNOS_4210_UPHYCLK );
drivers/phy/phy-exynos4x12-usb2.c +2 -2
@@ -187,7 +187,7 @@ static void exynos4x12_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu, offset, mask, on ?0 : mask); }
@@ -237,7 +237,7 @@ static void exynos4x12_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on) rstbits = EXYNOS_4x12_URSTCON_HSIC1 | EXYNOS_4x12_URSTCON_HOST_LINK_P1;break ; - }; + }if (on) { pwr =readl (drv->reg_phy + EXYNOS_4x12_UPHYPWR);
drivers/phy/phy-exynos5250-usb2.c +1 -1
@@ -192,7 +192,7 @@ static void exynos5250_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu, offset, mask, on ?0 : mask); }
drivers/phy/phy-rockchip-emmc.c +1 -1
@@ -132,7 +132,7 @@ static int rockchip_emmc_phy_power(struct phy *phy, bool on_off)default : ideal_rate =200000000 ;break ; - }; + } diff = (rate > ideal_rate) ? rate - ideal_rate : ideal_rate - rate;
drivers/phy/phy-s5pv210-usb2.c +2 -2
@@ -103,7 +103,7 @@ static void s5pv210_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu,S5PV210_USB_ISOL_OFFSET , mask, on ?0 : mask);
@@ -127,7 +127,7 @@ static void s5pv210_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on) rstbits =S5PV210_URSTCON_PHY1_ALL |S5PV210_URSTCON_HOST_LINK_ALL ;break ; - }; + }if (on) {writel (drv->ref_reg_val, drv->reg_phy +S5PV210_UPHYCLK );
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 2/3 phy: Fix ptr_ret.cocci warnings
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR.
Generated by: scripts/coccinelle/api/ptr_ret.cocci
--- drivers/phy/phy-ti-pipe3.c | 10 ++-------- drivers/phy/tegra/xusb.c | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-)
drivers/phy/phy-ti-pipe3.c +2 -8
@@ -537,10 +537,7 @@ static int ti_pipe3_get_pll_base(struct ti_pipe3 *phy) res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"pll_ctrl" ); phy->pll_ctrl_base =devm_ioremap_resource (dev, res); -if (IS_ERR (phy->pll_ctrl_base)) -return PTR_ERR (phy->pll_ctrl_base); - -return 0 ; +return PTR_ERR_OR_ZERO (phy->pll_ctrl_base); }static int ti_pipe3_probe (struct platform_device *pdev)
@@ -592,10 +589,7 @@ static int ti_pipe3_probe(struct platform_device *pdev)ti_pipe3_power_off (generic_phy); phy_provider =devm_of_phy_provider_register (dev, of_phy_simple_xlate); -if (IS_ERR (phy_provider)) -return PTR_ERR (phy_provider); - -return 0 ; +return PTR_ERR_OR_ZERO (phy_provider); }static int ti_pipe3_remove (struct platform_device *pdev)
drivers/phy/tegra/xusb.c +2 -8
@@ -561,10 +561,7 @@ static int tegra_xusb_usb2_port_parse_dt(struct tegra_xusb_usb2_port *usb2) usb2->internal =of_property_read_bool (np,"nvidia,internal" ); usb2->supply =devm_regulator_get (&port->dev,"vbus" ); -if (IS_ERR (usb2->supply)) -return PTR_ERR (usb2->supply); - -return 0 ; +return PTR_ERR_OR_ZERO (usb2->supply); } static int tegra_xusb_add_usb2_port(struct tegra_xusb_padctl *padctl,
@@ -731,10 +728,7 @@ static int tegra_xusb_usb3_port_parse_dt(struct tegra_xusb_usb3_port *usb3) usb3->internal =of_property_read_bool (np,"nvidia,internal" ); usb3->supply =devm_regulator_get (&port->dev,"vbus" ); -if (IS_ERR (usb3->supply)) -return PTR_ERR (usb3->supply); - -return 0 ; +return PTR_ERR_OR_ZERO (usb3->supply); } static int tegra_xusb_add_usb3_port(struct tegra_xusb_padctl *padctl,
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 3/3 phy: fix returnvar.cocci warnings
In reply to Vivek GautamRemove unneeded variables when "0" can be returned.
Generated by: scripts/coccinelle/misc/returnvar.cocci
--- drivers/phy/phy-berlin-sata.c | 3 +-- drivers/phy/tegra/xusb-tegra124.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/phy/phy-berlin-sata.c +1 -2
@@ -85,7 +85,6 @@ static int phy_berlin_sata_power_on(struct phy *phy)struct phy_berlin_desc *desc =phy_get_drvdata (phy);struct phy_berlin_priv *priv =dev_get_drvdata (phy->dev.parent);void __iomem *ctrl_reg = priv->base +0x60 + (desc->index *0x80 ); -int ret =0 ;u32 regval;clk_prepare_enable (priv->clk);
@@ -130,7 +129,7 @@ static int phy_berlin_sata_power_on(struct phy *phy)clk_disable_unprepare (priv->clk); -return ret; +return 0 ; }static int phy_berlin_sata_power_off (struct phy *phy)
drivers/phy/tegra/xusb-tegra124.c +1 -2
@@ -1483,7 +1483,6 @@ static int tegra124_usb3_port_enable(struct tegra_xusb_port *port)struct tegra_xusb_padctl *padctl = port->padctl;struct tegra_xusb_lane *lane = usb3->base.lane;unsigned int index = port->index, offset; -int ret =0 ;u32 value; value =padctl_readl (padctl,XUSB_PADCTL_SS_PORT_MAP );
@@ -1612,7 +1611,7 @@ static int tegra124_usb3_port_enable(struct tegra_xusb_port *port) value &= ~XUSB_PADCTL_ELPG_PROGRAM_SSPX_ELPG_CLAMP_EN (index);padctl_writel (padctl, value,XUSB_PADCTL_ELPG_PROGRAM ); -return ret; +return 0 ; }static void tegra124_usb3_port_disable (struct tegra_xusb_port *port)
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Hi Kishon,
Quoted 7 lines · Vivek Gautam
Remove unneeded semicolon.
Generated by:
coccinellery/semicolon/semicolon.cocciSigned-off-by Vivek Gautam <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>---
Gentle ping.
Do you plan to pull in 3 patches in this series ?
Quoted 135 lines
drivers/phy/phy-brcm-sata.c | 6 +++--- drivers/phy/phy-exynos4210-usb2.c | 4 ++-- drivers/phy/phy-exynos4x12-usb2.c | 4 ++-- drivers/phy/phy-exynos5250-usb2.c | 2 +- drivers/phy/phy-rockchip-emmc.c | 2 +- drivers/phy/phy-s5pv210-usb2.c | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-)drivers/phy/phy-brcm-sata.c +3
-3@@ -140,7 +140,7 @@ static inline void __iomem *brcm_sata_pcb_base(struct brcm_sata_port *port)default :dev_err (priv->dev,"invalid phy version\n" );break ; - }; + }return priv->phy_base + (port->portnum * size); }@@ -157,7 +157,7 @@ static inline void __iomem *brcm_sata_ctrl_base(struct brcm_sata_port *port)default :dev_err (priv->dev,"invalid phy version\n" );break ; - }; + }return priv->ctrl_base + (port->portnum * size); }@@ -365,7 +365,7 @@ static int brcm_sata_phy_init(struct phy *phy)break ;default : rc = -ENODEV ; - }; + }return rc; }drivers/phy/phy-exynos4210-usb2.c +2
-2@@ -141,7 +141,7 @@ static void exynos4210_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu, offset, mask, on ?0 : mask); }@@ -179,7 +179,7 @@ static void exynos4210_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on) rstbits =EXYNOS_4210_URSTCON_PHY1_P1P2 |EXYNOS_4210_URSTCON_HOST_LINK_P2 ;break ; - }; + }if (on) { clk =readl (drv->reg_phy +EXYNOS_4210_UPHYCLK );drivers/phy/phy-exynos4x12-usb2.c +2
-2@@ -187,7 +187,7 @@ static void exynos4x12_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu, offset, mask, on ?0 : mask); }@@ -237,7 +237,7 @@ static void exynos4x12_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on) rstbits = EXYNOS_4x12_URSTCON_HSIC1 | EXYNOS_4x12_URSTCON_HOST_LINK_P1;break ; - }; + }if (on) { pwr =readl (drv->reg_phy + EXYNOS_4x12_UPHYPWR);drivers/phy/phy-exynos5250-usb2.c +1
-1@@ -192,7 +192,7 @@ static void exynos5250_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu, offset, mask, on ?0 : mask); }drivers/phy/phy-rockchip-emmc.c +1
-1@@ -132,7 +132,7 @@ static int rockchip_emmc_phy_power(struct phy *phy, bool on_off)default : ideal_rate =200000000 ;break ; - }; + } diff = (rate > ideal_rate) ? rate - ideal_rate : ideal_rate - rate;drivers/phy/phy-s5pv210-usb2.c +2
-3@@ -103,7 +103,7 @@ static void s5pv210_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu,S5PV210_USB_ISOL_OFFSET , mask, on ?0 : mask);@@ -127,7 +127,7 @@ static void s5pv210_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on) rstbits =S5PV210_URSTCON_PHY1_ALL |S5PV210_URSTCON_HOST_LINK_ALL ;break ; - }; + }if (on) {writel (drv->ref_reg_val, drv->reg_phy +S5PV210_UPHYCLK ); --The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 6 lines · Vivek Gautam
Hi Kishon,
Quoted 2 lines · Vivek Gautam
Remove unneeded semicolon.
Quoted 8 lines
Quoted 5 lines
Generated by:
coccinellery/semicolon/semicolon.cocciSigned-off-by Vivek Gautam <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>---
Gentle ping.
Do you plan to pull in 3 patches in this series ?
merged now.
Thanks
Kishon
Quoted 139 lines
Quoted 136 lines
drivers/phy/phy-brcm-sata.c | 6 +++--- drivers/phy/phy-exynos4210-usb2.c | 4 ++-- drivers/phy/phy-exynos4x12-usb2.c | 4 ++-- drivers/phy/phy-exynos5250-usb2.c | 2 +- drivers/phy/phy-rockchip-emmc.c | 2 +- drivers/phy/phy-s5pv210-usb2.c | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-)drivers/phy/phy-brcm-sata.c +3
-3@@ -140,7 +140,7 @@ static inline void __iomem *brcm_sata_pcb_base(struct brcm_sata_port *port)default :dev_err (priv->dev,"invalid phy version\n" );break ; - }; + }return priv->phy_base + (port->portnum * size); }@@ -157,7 +157,7 @@ static inline void __iomem *brcm_sata_ctrl_base(struct brcm_sata_port *port)default :dev_err (priv->dev,"invalid phy version\n" );break ; - }; + }return priv->ctrl_base + (port->portnum * size); }@@ -365,7 +365,7 @@ static int brcm_sata_phy_init(struct phy *phy)break ;default : rc = -ENODEV ; - }; + }return rc; }drivers/phy/phy-exynos4210-usb2.c +2
-2@@ -141,7 +141,7 @@ static void exynos4210_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu, offset, mask, on ?0 : mask); }@@ -179,7 +179,7 @@ static void exynos4210_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on) rstbits =EXYNOS_4210_URSTCON_PHY1_P1P2 |EXYNOS_4210_URSTCON_HOST_LINK_P2 ;break ; - }; + }if (on) { clk =readl (drv->reg_phy +EXYNOS_4210_UPHYCLK );drivers/phy/phy-exynos4x12-usb2.c +2
-2@@ -187,7 +187,7 @@ static void exynos4x12_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu, offset, mask, on ?0 : mask); }@@ -237,7 +237,7 @@ static void exynos4x12_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on) rstbits = EXYNOS_4x12_URSTCON_HSIC1 | EXYNOS_4x12_URSTCON_HOST_LINK_P1;break ; - }; + }if (on) { pwr =readl (drv->reg_phy + EXYNOS_4x12_UPHYPWR);drivers/phy/phy-exynos5250-usb2.c +1
-1@@ -192,7 +192,7 @@ static void exynos5250_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu, offset, mask, on ?0 : mask); }drivers/phy/phy-rockchip-emmc.c +1
-1@@ -132,7 +132,7 @@ static int rockchip_emmc_phy_power(struct phy *phy, bool on_off)default : ideal_rate =200000000 ;break ; - }; + } diff = (rate > ideal_rate) ? rate - ideal_rate : ideal_rate - rate;drivers/phy/phy-s5pv210-usb2.c +2
-3@@ -103,7 +103,7 @@ static void s5pv210_isol(struct samsung_usb2_phy_instance *inst, bool on)break ;default :return ; - }; + }regmap_update_bits (drv->reg_pmu,S5PV210_USB_ISOL_OFFSET , mask, on ?0 : mask);@@ -127,7 +127,7 @@ static void s5pv210_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on) rstbits =S5PV210_URSTCON_PHY1_ALL |S5PV210_URSTCON_HOST_LINK_ALL ;break ; - }; + }if (on) {writel (drv->ref_reg_val, drv->reg_phy +S5PV210_UPHYCLK ); --The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 10 lines · Kishon Vijay Abraham I
Quoted 8 lines · Vivek Gautam
Hi Kishon,
Quoted 4 lines · Vivek Gautam
Remove unneeded semicolon.
Generated by:
coccinellery/semicolon/semicolon.cocci
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Signed-off-by Vivek Gautam <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>---
Gentle ping.
Do you plan to pull in 3 patches in this series ?merged now.
Thanks Kishon.
Regards
Vivek
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project