diff mbox series

drivers/net/phy/dp83640: remove unneeded val variable

Message ID 20220118075438.925768-1-chi.minghao@zte.com.cn (mailing list archive)
State Rejected
Delegated to: Netdev Maintainers
Headers show
Series drivers/net/phy/dp83640: remove unneeded val variable | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

CGEL Jan. 18, 2022, 7:54 a.m. UTC
From: Minghao Chi <chi.minghao@zte.com.cn>

Return value from phy_read() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
 drivers/net/phy/dp83640.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Richard Cochran Jan. 18, 2022, 3:19 p.m. UTC | #1
On Tue, Jan 18, 2022 at 07:54:38AM +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Return value from phy_read() directly instead
> of taking this in another redundant variable.

NAK this is purely cosmetic and not clearly better WRT CodingStyle.
 
> Reported-by: Zeal Robot <zealci@zte.com.cn>

Please make your robot less zealous or filter its results before
posting.

This is the second time I told you.  It isn't wise to ignore feedback,
and it is also rude.

Thanks,
Richard
Jakub Kicinski Jan. 18, 2022, 5:15 p.m. UTC | #2
On Tue, 18 Jan 2022 07:19:04 -0800 Richard Cochran wrote:
> On Tue, Jan 18, 2022 at 07:54:38AM +0000, cgel.zte@gmail.com wrote:
> > From: Minghao Chi <chi.minghao@zte.com.cn>
> > 
> > Return value from phy_read() directly instead
> > of taking this in another redundant variable.  
> 
> NAK this is purely cosmetic and not clearly better WRT CodingStyle.
>  
> > Reported-by: Zeal Robot <zealci@zte.com.cn>  
> 
> Please make your robot less zealous or filter its results before
> posting.

Plus what does it mean that the bot has signed this off?

> > Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>

> This is the second time I told you.  It isn't wise to ignore feedback,
> and it is also rude.

Same, you don't reply to emails and keep making the same mistakes.

I asked you to realign the continuation lines in:
https://lore.kernel.org/all/20220112083942.391fd0d7@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net/
And without replying you just posted:
https://lore.kernel.org/all/20220118075159.925542-1-chi.minghao@zte.com.cn/
diff mbox series

Patch

diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index c2d1a85ec559..4159e7cdc92c 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -226,15 +226,13 @@  static inline int broadcast_write(struct phy_device *phydev, u32 regnum,
 static int ext_read(struct phy_device *phydev, int page, u32 regnum)
 {
 	struct dp83640_private *dp83640 = phydev->priv;
-	int val;
 
 	if (dp83640->clock->page != page) {
 		broadcast_write(phydev, PAGESEL, page);
 		dp83640->clock->page = page;
 	}
-	val = phy_read(phydev, regnum);
 
-	return val;
+	return phy_read(phydev, regnum);
 }
 
 /* Caller must hold extreg_lock. */