Commit 263efe85 authored by Claudiu Beznea's avatar Claudiu Beznea Committed by Paolo Abeni

net: macb: change return type for gem_ptp_set_one_step_sync()

gem_ptp_set_one_step_sync() always returns zero thus change its return
type to void.
Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220608080818.1495044-1-claudiu.beznea@microchip.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent e4c437cd
...@@ -434,7 +434,7 @@ int gem_get_hwtst(struct net_device *dev, struct ifreq *rq) ...@@ -434,7 +434,7 @@ int gem_get_hwtst(struct net_device *dev, struct ifreq *rq)
return 0; 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; u32 reg_val;
...@@ -444,8 +444,6 @@ static int gem_ptp_set_one_step_sync(struct macb *bp, u8 enable) ...@@ -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)); macb_writel(bp, NCR, reg_val | MACB_BIT(OSSMODE));
else else
macb_writel(bp, NCR, reg_val & ~MACB_BIT(OSSMODE)); macb_writel(bp, NCR, reg_val & ~MACB_BIT(OSSMODE));
return 0;
} }
int gem_set_hwtst(struct net_device *dev, struct ifreq *ifr, int cmd) 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) ...@@ -468,8 +466,7 @@ int gem_set_hwtst(struct net_device *dev, struct ifreq *ifr, int cmd)
case HWTSTAMP_TX_OFF: case HWTSTAMP_TX_OFF:
break; break;
case HWTSTAMP_TX_ONESTEP_SYNC: case HWTSTAMP_TX_ONESTEP_SYNC:
if (gem_ptp_set_one_step_sync(bp, 1) != 0) gem_ptp_set_one_step_sync(bp, 1);
return -ERANGE;
tx_bd_control = TSTAMP_ALL_FRAMES; tx_bd_control = TSTAMP_ALL_FRAMES;
break; break;
case HWTSTAMP_TX_ON: case HWTSTAMP_TX_ON:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment