Skip to content

Commit

Permalink
ptp: Remove unneeded conversion to bool
Browse files Browse the repository at this point in the history
The '==' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:

drivers/ptp/ptp_ines.c:403:55-60: WARNING: conversion to bool not
needed here
drivers/ptp/ptp_ines.c:404:55-60: WARNING: conversion to bool not
needed here

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jason Yan authored and David S. Miller committed Apr 21, 2020
1 parent 526f3d9 commit e9a9e51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ptp/ptp_ines.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ static int ines_hwtstamp(struct mii_timestamper *mii_ts, struct ifreq *ifr)
ines_write32(port, ts_stat_rx, ts_stat_rx);
ines_write32(port, ts_stat_tx, ts_stat_tx);

port->rxts_enabled = ts_stat_rx == TS_ENABLE ? true : false;
port->txts_enabled = ts_stat_tx == TS_ENABLE ? true : false;
port->rxts_enabled = ts_stat_rx == TS_ENABLE;
port->txts_enabled = ts_stat_tx == TS_ENABLE;

spin_unlock_irqrestore(&port->lock, flags);

Expand Down

0 comments on commit e9a9e51

Please sign in to comment.