Skip to content

Commit

Permalink
can: peak_usb: fix checkpatch warnings
Browse files Browse the repository at this point in the history
This patch cleans several checkpatch warnings in the peak_usb driver.

Link: https://lore.kernel.org/r/20210406111622.1874957-2-mkl@pengutronix.de
Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Marc Kleine-Budde committed Apr 13, 2021
1 parent c664e21 commit bc256b9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/net/can/usb/peak_usb/pcan_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static int pcan_usb_update_ts(struct pcan_usb_msg_context *mc)
{
__le16 tmp16;

if ((mc->ptr+2) > mc->end)
if ((mc->ptr + 2) > mc->end)
return -EINVAL;

memcpy(&tmp16, mc->ptr, 2);
Expand Down Expand Up @@ -1039,7 +1039,7 @@ const struct peak_usb_adapter pcan_usb = {
CAN_CTRLMODE_BERR_REPORTING |
CAN_CTRLMODE_CC_LEN8_DLC,
.clock = {
.freq = PCAN_USB_CRYSTAL_HZ / 2 ,
.freq = PCAN_USB_CRYSTAL_HZ / 2,
},
.bittiming_const = &pcan_usb_const,

Expand Down
1 change: 1 addition & 0 deletions drivers/net/can/usb/peak_usb/pcan_usb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ static int peak_usb_ndo_stop(struct net_device *netdev)
/* can set bus off now */
if (dev->adapter->dev_set_bus) {
int err = dev->adapter->dev_set_bus(dev, 0);

if (err)
return err;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/usb/peak_usb/pcan_usb_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/* usb adapters maximum channels per usb interface */
#define PCAN_USB_MAX_CHANNEL 2

/* maximum length of the usb commands sent to/received from the devices */
/* maximum length of the usb commands sent to/received from the devices */
#define PCAN_USB_MAX_CMD_LEN 32

struct peak_usb_device;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/usb/peak_usb/pcan_usb_pro.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static int pcan_usb_pro_wait_rsp(struct peak_usb_device *dev,
pr->data_type);

/* check if channel in response corresponds too */
else if ((req_channel != 0xff) && \
else if ((req_channel != 0xff) &&
(pr->bus_act.channel != req_channel))
netdev_err(dev->netdev,
"got rsp %xh but on chan%u: ignored\n",
Expand Down

0 comments on commit bc256b9

Please sign in to comment.