* [PATCH 1/4] phy: core: fix code style in devm_of_phy_provider_unregister
@ 2020-06-29 14:50 Vinod Koul
2020-06-29 14:50 ` [PATCH 2/4] phy: core: Document function args Vinod Koul
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Vinod Koul @ 2020-06-29 14:50 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: Vinod Koul, linux-kernel
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.
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
drivers/phy/phy-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index a27b8d578d7f..b54522f06245 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -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,
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] phy: core: Document function args
2020-06-29 14:50 [PATCH 1/4] phy: core: fix code style in devm_of_phy_provider_unregister Vinod Koul
@ 2020-06-29 14:50 ` Vinod Koul
2020-06-29 14:50 ` [PATCH 3/4] phy: ti: dm816x: remove set but unused variable Vinod Koul
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2020-06-29 14:50 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: Vinod Koul, linux-kernel
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
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
drivers/phy/phy-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index b54522f06245..71cb10826326 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -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.
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] phy: ti: dm816x: remove set but unused variable
2020-06-29 14:50 [PATCH 1/4] phy: core: fix code style in devm_of_phy_provider_unregister Vinod Koul
2020-06-29 14:50 ` [PATCH 2/4] phy: core: Document function args Vinod Koul
@ 2020-06-29 14:50 ` Vinod Koul
2020-06-29 14:50 ` [PATCH 4/4] phy: ti-pipe3: " Vinod Koul
2020-07-08 11:14 ` [PATCH 1/4] phy: core: fix code style in devm_of_phy_provider_unregister Vinod Koul
3 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2020-06-29 14:50 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: Vinod Koul, linux-kernel, Roger Quadros
dm816x_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]
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
drivers/phy/ti/phy-dm816x-usb.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/phy/ti/phy-dm816x-usb.c b/drivers/phy/ti/phy-dm816x-usb.c
index 26f194779064..57adc08a89b2 100644
--- a/drivers/phy/ti/phy-dm816x-usb.c
+++ b/drivers/phy/ti/phy-dm816x-usb.c
@@ -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,
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] phy: ti-pipe3: remove set but unused variable
2020-06-29 14:50 [PATCH 1/4] phy: core: fix code style in devm_of_phy_provider_unregister Vinod Koul
2020-06-29 14:50 ` [PATCH 2/4] phy: core: Document function args Vinod Koul
2020-06-29 14:50 ` [PATCH 3/4] phy: ti: dm816x: remove set but unused variable Vinod Koul
@ 2020-06-29 14:50 ` Vinod Koul
2020-07-08 11:14 ` [PATCH 1/4] phy: core: fix code style in devm_of_phy_provider_unregister Vinod Koul
3 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2020-06-29 14:50 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: Vinod Koul, linux-kernel, Roger Quadros
ti_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]
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
drivers/phy/ti/phy-ti-pipe3.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
index a87946589eb7..e9332c90f75f 100644
--- a/drivers/phy/ti/phy-ti-pipe3.c
+++ b/drivers/phy/ti/phy-ti-pipe3.c
@@ -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
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] phy: core: fix code style in devm_of_phy_provider_unregister
2020-06-29 14:50 [PATCH 1/4] phy: core: fix code style in devm_of_phy_provider_unregister Vinod Koul
` (2 preceding siblings ...)
2020-06-29 14:50 ` [PATCH 4/4] phy: ti-pipe3: " Vinod Koul
@ 2020-07-08 11:14 ` Vinod Koul
3 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2020-07-08 11:14 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: linux-kernel
On 29-06-20, 20:20, Vinod Koul wrote:
> 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.
Applied all these
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-07-08 11:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 14:50 [PATCH 1/4] phy: core: fix code style in devm_of_phy_provider_unregister Vinod Koul
2020-06-29 14:50 ` [PATCH 2/4] phy: core: Document function args Vinod Koul
2020-06-29 14:50 ` [PATCH 3/4] phy: ti: dm816x: remove set but unused variable Vinod Koul
2020-06-29 14:50 ` [PATCH 4/4] phy: ti-pipe3: " Vinod Koul
2020-07-08 11:14 ` [PATCH 1/4] phy: core: fix code style in devm_of_phy_provider_unregister Vinod Koul
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.