phy: rockchip-inno-usb2: cleanup comments and make ops static
Subsystems (2)
PATCH 1/1 phy: rockchip-inno-usb2: cleanup comments and make ops static
Thanks to Jagan Teki for noting that three functions should be static and comments from uclass_clk are redundant.
--- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-)
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +3 -22
@@ -182,25 +182,12 @@ static struct phy_ops rockchip_usb2phy_ops = { .of_xlate = rockchip_usb2phy_of_xlate, }; -/** -* round_rate() - Adjust a rate to the exact rate a clock can provide. -* @clk: The clock to manipulate. -* @rate: Desidered clock rate in Hz. -* -* Return: rounded rate in Hz, or -ve error code. -*/ -ulong rockchip_usb2phy_clk_round_rate (struct clk *clk,ulong rate) +static ulong rockchip_usb2phy_clk_round_rate (struct clk *clk,ulong rate) {return 480000000 ; } -/** -* enable() - Enable a clock. -* @clk: The clock to manipulate. -* -* Return: zero on success, or -ve error code. -*/ -int rockchip_usb2phy_clk_enable (struct clk *clk) +static int rockchip_usb2phy_clk_enable (struct clk *clk) {struct udevice *parent =dev_get_parent (clk->dev);struct rockchip_usb2phy *priv =dev_get_priv (parent);
@@ -217,13 +204,7 @@ int rockchip_usb2phy_clk_enable(struct clk *clk)return 0 ; } -/** -* disable() - Disable a clock. -* @clk: The clock to manipulate. -* -* Return: zero on success, or -ve error code. -*/ -int rockchip_usb2phy_clk_disable (struct clk *clk) +static int rockchip_usb2phy_clk_disable (struct clk *clk) {struct udevice *parent =dev_get_parent (clk->dev);struct rockchip_usb2phy *priv =dev_get_priv (parent);
Signature · 1 line
2.20.1
Quoted 2 lines · Xavier Drudis Ferran
Thanks to Jagan Teki for noting that three functions should be static and comments from
uclass_clkare redundant.
The change log should be at below --- , the commit message should be above.
Quoted 11 lines
Signed-off-by Xavier Drudis Ferran <[email protected]>--- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-)drivers/phy/rockchip/phy-rockchip-inno-usb2.c +0
-0@@ -182,25 +182,12 @@ static struct phy_ops rockchip_usb2phy_ops = { .of_xlate = rockchip_usb2phy_of_xlate,
drivers/phy/rockchip/phy-rockchip-inno-usb2.c static struct phy_ops rockchip_usb2phy_ops = { · line 192
Quoted 10 lines
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +0
-8}; -/** -* round_rate() - Adjust a rate to the exact rate a clock can provide. -* @clk: The clock to manipulate. -* @rate: Desidered clock rate in Hz. -* -* Return: rounded rate in Hz, or -ve error code. -*/ -ulong rockchip_usb2phy_clk_round_rate (struct clk *clk,ulong rate)
Why is the documentation dropped ?
[...]
Quoted 20 lines · Marek Vasut
Quoted 2 lines · Xavier Drudis Ferran
Thanks to Jagan Teki for noting that three functions should be static and comments from
uclass_clkare redundant.The change log should be at below --- , the commit message should be above.
Quoted 13 lines
Signed-off-by Xavier Drudis Ferran <[email protected]>--- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-)drivers/phy/rockchip/phy-rockchip-inno-usb2.c +0
-0@@ -182,25 +182,12 @@ static struct phy_ops rockchip_usb2phy_ops = { .of_xlate = rockchip_usb2phy_of_xlate, };
Quoted 10 lines
drivers/phy/rockchip/phy-rockchip-inno-usb2.c static struct phy_ops rockchip_usb2phy_ops = { · line 192
Quoted 8 lines
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +0
-8-/** -* round_rate() - Adjust a rate to the exact rate a clock can provide. -* @clk: The clock to manipulate. -* @rate: Desidered clock rate in Hz. -* -* Return: rounded rate in Hz, or -ve error code. -*/ -ulong rockchip_usb2phy_clk_round_rate (struct clk *clk,ulong rate)Why is the documentation dropped ?
As these comments seem redundant as in clk-uclass.h definitions, so I asked to drop the same from the driver.
Xavier, can you add the details in the commit message?
Jagan.
El Mon, Jun 19, 2023 at 02:58:50PM +0530, Jagan Teki deia:
Quoted 5 lines · Marek Vasut
Quoted 4 lines · Xavier Drudis Ferran
Quoted 2 lines
Thanks to Jagan Teki for noting that three functions should be static and comments from
uclass_clkare redundant.
[...]
Quoted 9 lines
Quoted 2 lines
Why is the documentation dropped ?
As these comments seem redundant as in
clk-uclass.hdefinitions, so I asked to drop the same from the driver.Xavier, can you add the details in the commit message?
Jagan.
Which details ? The commit message says "comments from uclass_clk are redundant" . What should it say ? Do you want me to copy the deleted comments to the commit message ??