Skip to content

Commit

Permalink
net: macb: change return type for gem_ptp_set_one_step_sync()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Claudiu Beznea authored and Paolo Abeni committed Jun 9, 2022
1 parent e4c437c commit 263efe8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/net/ethernet/cadence/macb_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit 263efe8

Please sign in to comment.