can: remove obsolete assignment for CAN protocol error type
The assignment 'cf->data[2] |= CAN_ERR_PROT_UNSPEC' used at CAN error message creation time is obsolete as CAN_ERR_PROT_UNSPEC is zero and cf->data[2] is initialized with zero in alloc_can_err_skb() anyway. So we could either assign 'cf->data[2] = CAN_ERR_PROT_UNSPEC' correctly or we can remove the obsolete OR operation entirely. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:

committed by
Marc Kleine-Budde

parent
ffd461f80d
commit
a2ec19f888
@@ -241,10 +241,9 @@ static void rcar_can_error(struct net_device *ndev)
|
||||
u8 ecsr;
|
||||
|
||||
netdev_dbg(priv->ndev, "Bus error interrupt:\n");
|
||||
if (skb) {
|
||||
if (skb)
|
||||
cf->can_id |= CAN_ERR_BUSERROR | CAN_ERR_PROT;
|
||||
cf->data[2] = CAN_ERR_PROT_UNSPEC;
|
||||
}
|
||||
|
||||
ecsr = readb(&priv->regs->ecsr);
|
||||
if (ecsr & RCAR_CAN_ECSR_ADEF) {
|
||||
netdev_dbg(priv->ndev, "ACK Delimiter Error\n");
|
||||
|
Reference in New Issue
Block a user