diff mbox series

net: phy: phy_device: Fix PHY LED blinking code comment

Message ID 20240626030638.512069-1-marex@denx.de (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series net: phy: phy_device: Fix PHY LED blinking code comment | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Marek Vasut June 26, 2024, 3:06 a.m. UTC
Fix copy-paste error in the code comment. The code refers to
LED blinking configuration, not brightness configuration. It
was likely copied from comment above this one which does
refer to brightness configuration.

Fixes: 4e901018432e ("net: phy: phy_device: Call into the PHY driver to set LED blinking")
Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: kernel@dh-electronics.com
Cc: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org
---
 include/linux/phy.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Lunn June 26, 2024, 5:32 p.m. UTC | #1
On Wed, Jun 26, 2024 at 05:06:17AM +0200, Marek Vasut wrote:
> Fix copy-paste error in the code comment. The code refers to
> LED blinking configuration, not brightness configuration. It
> was likely copied from comment above this one which does
> refer to brightness configuration.
> 
> Fixes: 4e901018432e ("net: phy: phy_device: Call into the PHY driver to set LED blinking")
> Signed-off-by: Marek Vasut <marex@denx.de>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

There is a lot of context in this patch. Do you have some odd git diff
settings?

    Andrew
Marek Vasut June 26, 2024, 7:47 p.m. UTC | #2
On 6/26/24 7:32 PM, Andrew Lunn wrote:
> On Wed, Jun 26, 2024 at 05:06:17AM +0200, Marek Vasut wrote:
>> Fix copy-paste error in the code comment. The code refers to
>> LED blinking configuration, not brightness configuration. It
>> was likely copied from comment above this one which does
>> refer to brightness configuration.
>>
>> Fixes: 4e901018432e ("net: phy: phy_device: Call into the PHY driver to set LED blinking")
>> Signed-off-by: Marek Vasut <marex@denx.de>
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
> There is a lot of context in this patch. Do you have some odd git diff
> settings?

I did use git format-patch -U10 this time, to make sure that context is 
visible. With regular git format-patch, the diff contained only part of 
the comment and it wasn't clear from the diff that it does modify 
comment above (*led_blink_set)() and not e.g. (*led_brightness_set)() .
diff mbox series

Patch

diff --git a/include/linux/phy.h b/include/linux/phy.h
index 205fccfc0f60a..bd68f9d8e74f1 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1119,21 +1119,21 @@  struct phy_driver {
 	/**
 	 * @led_brightness_set: Set a PHY LED brightness. Index
 	 * indicates which of the PHYs led should be set. Value
 	 * follows the standard LED class meaning, e.g. LED_OFF,
 	 * LED_HALF, LED_FULL.
 	 */
 	int (*led_brightness_set)(struct phy_device *dev,
 				  u8 index, enum led_brightness value);
 
 	/**
-	 * @led_blink_set: Set a PHY LED brightness.  Index indicates
+	 * @led_blink_set: Set a PHY LED blinking.  Index indicates
 	 * which of the PHYs led should be configured to blink. Delays
 	 * are in milliseconds and if both are zero then a sensible
 	 * default should be chosen.  The call should adjust the
 	 * timings in that case and if it can't match the values
 	 * specified exactly.
 	 */
 	int (*led_blink_set)(struct phy_device *dev, u8 index,
 			     unsigned long *delay_on,
 			     unsigned long *delay_off);
 	/**