diff options
author | Oliver Hartkopp <socketcan@hartkopp.net> | 2015-11-21 18:41:21 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-11-23 09:37:38 +0100 |
commit | a2ec19f888f1fb06e2424486423a16f86ad1fcc4 (patch) | |
tree | c1644eda37c31376d5ed54b453d2d605cc357c46 /drivers/net/can/xilinx_can.c | |
parent | ffd461f80d536336811d573f197f3e6d9872d054 (diff) | |
download | talos-obmc-linux-a2ec19f888f1fb06e2424486423a16f86ad1fcc4.tar.gz talos-obmc-linux-a2ec19f888f1fb06e2424486423a16f86ad1fcc4.zip |
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>
Diffstat (limited to 'drivers/net/can/xilinx_can.c')
-rw-r--r-- | drivers/net/can/xilinx_can.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index 4c57ddf12684..51670b322409 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -608,10 +608,8 @@ static void xcan_err_interrupt(struct net_device *ndev, u32 isr) /* Check for error interrupt */ if (isr & XCAN_IXR_ERROR_MASK) { - if (skb) { + if (skb) cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR; - cf->data[2] |= CAN_ERR_PROT_UNSPEC; - } /* Check for Ack error interrupt */ if (err_status & XCAN_ESR_ACKER_MASK) { |