diff options
author | Liu Shixin <liushixin2@huawei.com> | 2020-09-14 06:17:44 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2020-09-21 10:13:18 +0200 |
commit | bd412492465c5d29f3e9de01c7efdcc0b3c7c69d (patch) | |
tree | d9edd5a3b7509682bf68fb76fac69b8d43585dcb /drivers/net/can/usb/peak_usb | |
parent | can: ti_hecc: convert to devm_platform_ioremap_resource_byname() (diff) | |
download | linux-bd412492465c5d29f3e9de01c7efdcc0b3c7c69d.tar.xz linux-bd412492465c5d29f3e9de01c7efdcc0b3c7c69d.zip |
can: peak_usb: convert to use le32_add_cpu()
Convert cpu_to_le32(le32_to_cpu(E1) + E2) to use le32_add_cpu().
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Link: https://lore.kernel.org/r/20200914041744.3701840-1-liushixin2@huawei.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/usb/peak_usb')
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c index f85b560e05db..c7564773fb2b 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c @@ -186,7 +186,7 @@ static int pcan_msg_add_rec(struct pcan_usb_pro_msg *pm, int id, ...) len = pc - pm->rec_ptr; if (len > 0) { - *pm->u.rec_cnt = cpu_to_le32(le32_to_cpu(*pm->u.rec_cnt) + 1); + le32_add_cpu(pm->u.rec_cnt, 1); *pm->rec_ptr = id; pm->rec_ptr = pc; |