phy: core: fix code style in devm_of_phy_provider_unregister
Vinod Koul
maintainerPATCH 1/4 phy: core: fix code style in devm_of_phy_provider_unregister
Documentation/process/coding-style.rst says:
"functions: they have the opening brace at the beginning of the next line"
devm_of_phy_provider_unregister() function has opening brace at same line, so fix it up.
--- drivers/phy/phy-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/phy/phy-core.c +2 -1
@@ -1122,7 +1122,8 @@ EXPORT_SYMBOL_GPL(of_phy_provider_unregister);* of_phy_provider_unregister to unregister the phy provider. */ void devm_of_phy_provider_unregister (struct device *dev, -struct phy_provider *phy_provider) { +struct phy_provider *phy_provider) +{int r; r = devres_destroy(dev, devm_phy_provider_release, devm_phy_match,
Signature · 1 line
2.26.2
Vinod Koul
maintainerPATCH 2/4 phy: core: Document function args
Some function arguments are missing from documentation prompting validation kernel doc script to complain:
drivers/phy/phy-core.c:1078: warning: Function parameter or member 'children' not described in '__devm_of_phy_provider_register' drivers/phy/phy-core.c:1125: warning: Function parameter or member 'phy_provider' not described in 'devm_of_phy_provider_unregister'
Add the documentation for these
--- drivers/phy/phy-core.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/phy/phy-core.c +2 -0
@@ -1062,6 +1062,7 @@ EXPORT_SYMBOL_GPL(__of_phy_provider_register);* __devm_of_phy_provider_register() - create/register phy provider with the * framework * @dev: struct device of the phy provider +* @children: device node containing children (if different from dev->of_node) * @owner: the module owner containing of_xlate * @of_xlate: function pointer to obtain phy instance from phy provider *
@@ -1117,6 +1118,7 @@ EXPORT_SYMBOL_GPL(of_phy_provider_unregister);/** * devm_of_phy_provider_unregister() - remove phy provider from the framework * @dev: struct device of the phy provider +* @phy_provider: phy provider returned by of_phy_provider_register() * * destroys the devres associated with this phy provider and invokes * of_phy_provider_unregister to unregister the phy provider.
Signature · 1 line
2.26.2
Vinod Koul
maintainerPATCH 3/4 phy: ti: dm816x: remove set but unused variable
In reply to Vinod Kouldm816x_usb_phy_init() sets variable 'error' but never uses it, so remove it.
drivers/phy/ti/phy-dm816x-usb.c:85:6: warning: variable ‘error’ set but not used [-Wunused-but-set-variable]
--- drivers/phy/ti/phy-dm816x-usb.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/phy/ti/phy-dm816x-usb.c +5 -6
@@ -82,17 +82,16 @@ static int dm816x_usb_phy_init(struct phy *x) {struct dm816x_usb_phy *phy =phy_get_drvdata (x);unsigned int val; -int error;if (clk_get_rate (phy->refclk) !=24000000 )dev_warn (phy->dev,"nonstandard phy refclk\n" );/* Set PLL ref clock and put phys to sleep */ - error =regmap_update_bits (phy->syscon, phy->usb_ctrl, -DM816X_USB_CTRL_PHYCLKSRC | -DM816X_USB_CTRL_PHYSLEEP1 | -DM816X_USB_CTRL_PHYSLEEP0 , -0 ); +regmap_update_bits (phy->syscon, phy->usb_ctrl, +DM816X_USB_CTRL_PHYCLKSRC | +DM816X_USB_CTRL_PHYSLEEP1 | +DM816X_USB_CTRL_PHYSLEEP0 , +0 );regmap_read (phy->syscon, phy->usb_ctrl, &val);if ((val &3 ) !=0 ) dev_info(phy->dev,
Signature · 1 line
2.26.2
Vinod Koul
maintainerPATCH 4/4 phy: ti-pipe3: remove set but unused variable
In reply to Vinod Koulti_pipe3_power_on() sets variable 'ret' but never uses it, so remove it.
drivers/phy/ti/phy-ti-pipe3.c:340:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
--- drivers/phy/ti/phy-ti-pipe3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/phy/ti/phy-ti-pipe3.c +2 -3
@@ -337,7 +337,6 @@ static int ti_pipe3_power_on(struct phy *x) {u32 val;u32 mask; -int ret;unsigned long rate;struct ti_pipe3 *phy =phy_get_drvdata (x);bool rx_pending = false;
@@ -355,8 +354,8 @@ static int ti_pipe3_power_on(struct phy *x) rate = rate /1000000 ; mask =OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_FREQ_MASK ; val = rate <<OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_FREQ_SHIFT ; - ret =regmap_update_bits (phy->phy_power_syscon, phy->power_reg, - mask, val); +regmap_update_bits (phy->phy_power_syscon, phy->power_reg, + mask, val);/* * For PCIe, TX and RX must be powered on simultaneously. * For USB and SATA, TX must be powered on before RX
Signature · 1 line
2.26.2
Vinod Koul
maintainerQuoted 6 lines · Vinod Koul
Documentation/process/coding-style.rstsays:
"functions: they have the opening brace at the beginning of the next line"
devm_of_phy_provider_unregister()function has opening brace at same line, so fix it up.
Applied all these
Signature · 1 line
~Vinod