]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: macb: change return type for gem_ptp_set_one_step_sync()
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Wed, 8 Jun 2022 08:08:18 +0000 (11:08 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 9 Jun 2022 11:18:17 +0000 (13:18 +0200)
gem_ptp_set_one_step_sync() always returns zero thus change its return
type to void.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220608080818.1495044-1-claudiu.beznea@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/cadence/macb_ptp.c

index 9559c16078f95b974bd8d99b7ece3a82d5379b4b..e6cb20aaa76a82750253dd6d14181fc904f3803c 100644 (file)
@@ -434,7 +434,7 @@ int gem_get_hwtst(struct net_device *dev, struct ifreq *rq)
                return 0;
 }
 
-static int gem_ptp_set_one_step_sync(struct macb *bp, u8 enable)
+static void gem_ptp_set_one_step_sync(struct macb *bp, u8 enable)
 {
        u32 reg_val;
 
@@ -444,8 +444,6 @@ static int gem_ptp_set_one_step_sync(struct macb *bp, u8 enable)
                macb_writel(bp, NCR, reg_val | MACB_BIT(OSSMODE));
        else
                macb_writel(bp, NCR, reg_val & ~MACB_BIT(OSSMODE));
-
-       return 0;
 }
 
 int gem_set_hwtst(struct net_device *dev, struct ifreq *ifr, int cmd)
@@ -468,8 +466,7 @@ int gem_set_hwtst(struct net_device *dev, struct ifreq *ifr, int cmd)
        case HWTSTAMP_TX_OFF:
                break;
        case HWTSTAMP_TX_ONESTEP_SYNC:
-               if (gem_ptp_set_one_step_sync(bp, 1) != 0)
-                       return -ERANGE;
+               gem_ptp_set_one_step_sync(bp, 1);
                tx_bd_control = TSTAMP_ALL_FRAMES;
                break;
        case HWTSTAMP_TX_ON: