Skip to content

Commit 8a99f2a

Browse files
Frank Jungclausmarckleinebudde
authored andcommitted
can: esd_usb: Use consistent prefix ESD_USB_ for macros
Rename the following macros: - ESD_RTR to ESD_USB_RTR - ESD_EV_CAN_ERROR_EXT to ESD_USB_EV_CAN_ERROR_EXT Additionally remove the double newline trailing to definition of ESD_USB_RTR. Signed-off-by: Frank Jungclaus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 33665fd commit 8a99f2a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

drivers/net/can/usb/esd_usb.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,15 @@ MODULE_LICENSE("GPL v2");
4343
#define ESD_USB_CMD_IDADD 6 /* also used for IDADD_REPLY */
4444

4545
/* esd CAN message flags - dlc field */
46-
#define ESD_RTR BIT(4)
47-
46+
#define ESD_USB_RTR BIT(4)
4847

4948
/* esd CAN message flags - id field */
5049
#define ESD_USB_EXTID BIT(29)
5150
#define ESD_USB_EVENT BIT(30)
5251
#define ESD_USB_IDMASK GENMASK(28, 0)
5352

5453
/* esd CAN event ids */
55-
#define ESD_EV_CAN_ERROR_EXT 2 /* CAN controller specific diagnostic data */
54+
#define ESD_USB_EV_CAN_ERROR_EXT 2 /* CAN controller specific diagnostic data */
5655

5756
/* baudrate message flags */
5857
#define ESD_USB_LOM BIT(30) /* Listen Only Mode */
@@ -228,7 +227,7 @@ static void esd_usb_rx_event(struct esd_usb_net_priv *priv,
228227
struct sk_buff *skb;
229228
u32 id = le32_to_cpu(msg->rx.id) & ESD_USB_IDMASK;
230229

231-
if (id == ESD_EV_CAN_ERROR_EXT) {
230+
if (id == ESD_USB_EV_CAN_ERROR_EXT) {
232231
u8 state = msg->rx.ev_can_err_ext.status;
233232
u8 ecc = msg->rx.ev_can_err_ext.ecc;
234233

@@ -341,13 +340,13 @@ static void esd_usb_rx_can_msg(struct esd_usb_net_priv *priv,
341340
}
342341

343342
cf->can_id = id & ESD_USB_IDMASK;
344-
can_frame_set_cc_len(cf, msg->rx.dlc & ~ESD_RTR,
343+
can_frame_set_cc_len(cf, msg->rx.dlc & ~ESD_USB_RTR,
345344
priv->can.ctrlmode);
346345

347346
if (id & ESD_USB_EXTID)
348347
cf->can_id |= CAN_EFF_FLAG;
349348

350-
if (msg->rx.dlc & ESD_RTR) {
349+
if (msg->rx.dlc & ESD_USB_RTR) {
351350
cf->can_id |= CAN_RTR_FLAG;
352351
} else {
353352
for (i = 0; i < cf->len; i++)
@@ -767,7 +766,7 @@ static netdev_tx_t esd_usb_start_xmit(struct sk_buff *skb,
767766
msg->tx.id = cpu_to_le32(cf->can_id & CAN_ERR_MASK);
768767

769768
if (cf->can_id & CAN_RTR_FLAG)
770-
msg->tx.dlc |= ESD_RTR;
769+
msg->tx.dlc |= ESD_USB_RTR;
771770

772771
if (cf->can_id & CAN_EFF_FLAG)
773772
msg->tx.id |= cpu_to_le32(ESD_USB_EXTID);

0 commit comments

Comments
 (0)