Commit 83fb097b authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Greg Kroah-Hartman

staging: phy-hi3670-usb3: do a some minor cleanups

Before moving this driver out of staging:

1. group some integers altogether;

2. Use:

	return some_function()

instead of:

	ret = some_function();
	return ret;

This is just a cleanup. No functional changes.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/55db419e42fd3af72494acbe0ea0f0d1de8906ac.1624542940.git.mchehab+huawei@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0c5a11c0
...@@ -148,10 +148,8 @@ static int hi3670_phy_cr_clk(struct regmap *usb31misc) ...@@ -148,10 +148,8 @@ static int hi3670_phy_cr_clk(struct regmap *usb31misc)
return ret; return ret;
/* Clock down */ /* Clock down */
ret = regmap_update_bits(usb31misc, USB_MISC_CFG54, return regmap_update_bits(usb31misc, USB_MISC_CFG54,
CFG54_USB31PHY_CR_CLK, 0); CFG54_USB31PHY_CR_CLK, 0);
return ret;
} }
static int hi3670_phy_cr_set_sel(struct regmap *usb31misc) static int hi3670_phy_cr_set_sel(struct regmap *usb31misc)
...@@ -215,17 +213,14 @@ static int hi3670_phy_cr_set_addr(struct regmap *usb31misc, u32 addr) ...@@ -215,17 +213,14 @@ static int hi3670_phy_cr_set_addr(struct regmap *usb31misc, u32 addr)
return ret; return ret;
reg = FIELD_PREP(CFG54_USB31PHY_CR_ADDR_MASK, addr); reg = FIELD_PREP(CFG54_USB31PHY_CR_ADDR_MASK, addr);
ret = regmap_update_bits(usb31misc, USB_MISC_CFG54,
CFG54_USB31PHY_CR_ADDR_MASK, reg);
return ret; return regmap_update_bits(usb31misc, USB_MISC_CFG54,
CFG54_USB31PHY_CR_ADDR_MASK, reg);
} }
static int hi3670_phy_cr_read(struct regmap *usb31misc, u32 addr, u32 *val) static int hi3670_phy_cr_read(struct regmap *usb31misc, u32 addr, u32 *val)
{ {
int reg; int reg, i, ret;
int i;
int ret;
for (i = 0; i < 100; i++) { for (i = 0; i < 100; i++) {
ret = hi3670_phy_cr_clk(usb31misc); ret = hi3670_phy_cr_clk(usb31misc);
...@@ -286,9 +281,7 @@ static int hi3670_phy_cr_write(struct regmap *usb31misc, u32 addr, u32 val) ...@@ -286,9 +281,7 @@ static int hi3670_phy_cr_write(struct regmap *usb31misc, u32 addr, u32 val)
if (ret) if (ret)
return ret; return ret;
ret = hi3670_phy_cr_wait_ack(usb31misc); return hi3670_phy_cr_wait_ack(usb31misc);
return ret;
} }
static int hi3670_phy_set_params(struct hi3670_priv *priv) static int hi3670_phy_set_params(struct hi3670_priv *priv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment