From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
kernel@pengutronix.de, Marc Kleine-Budde <mkl@pengutronix.de>,
Stephane Grosjean <s.grosjean@peak-system.com>
Subject: [net-next 05/14] can: peak_usb: fix checkpatch warnings
Date: Tue, 13 Apr 2021 11:51:52 +0200 [thread overview]
Message-ID: <20210413095201.2409865-6-mkl@pengutronix.de> (raw)
In-Reply-To: <20210413095201.2409865-1-mkl@pengutronix.de>
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>
---
drivers/net/can/usb/peak_usb/pcan_usb.c | 4 ++--
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 1 +
drivers/net/can/usb/peak_usb/pcan_usb_core.h | 2 +-
drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c
index ba509aed7b4c..e23049c81159 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb.c
@@ -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);
@@ -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,
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
index e69b005be068..7dff77a6ef70 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
@@ -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;
}
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.h b/drivers/net/can/usb/peak_usb/pcan_usb_core.h
index e15b4c78f309..59afe880a481 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.h
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.h
@@ -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;
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 2d1b645af76c..ecb08359f719 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
@@ -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",
--
2.30.2
next prev parent reply other threads:[~2021-04-13 9:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 9:51 pull-request: can-next 2021-04-13 Marc Kleine-Budde
2021-04-13 9:51 ` [net-next 01/14] dt-bindings: net: can: rcar_can: Document r8a77961 support Marc Kleine-Budde
2021-04-13 9:51 ` [net-next 02/14] can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces Marc Kleine-Budde
2021-04-13 9:51 ` [net-next 03/14] can: etas_es58x: add support for ETAS ES581.4 CAN USB interface Marc Kleine-Budde
2021-04-13 9:51 ` [net-next 04/14] can: etas_es58x: add support for the ETAS ES58X_FD CAN USB interfaces Marc Kleine-Budde
2021-04-13 9:51 ` Marc Kleine-Budde [this message]
2021-04-13 9:51 ` [net-next 06/14] can: peak_usb: pcan_usb_pro.h: remove double space in indention Marc Kleine-Budde
2021-04-13 9:51 ` [net-next 07/14] can: peak_usb: remove unused variables from struct peak_usb_device Marc Kleine-Budde
2021-04-13 9:51 ` [net-next 08/14] can: peak_usb: remove write only variable struct peak_usb_adapter::ts_period Marc Kleine-Budde
2021-04-13 9:51 ` [net-next 09/14] can: peak_usb: peak_usb_probe(): make use of driver_info Marc Kleine-Budde
2021-04-13 9:51 ` [net-next 10/14] can: peak_usb: pcan_usb_{,pro}_get_device_id(): remove unneeded check for device_id Marc Kleine-Budde
2021-04-13 9:51 ` [net-next 11/14] can: peak_usb: pcan_usb_get_serial(): remove error message from error path Marc Kleine-Budde
2021-04-13 9:51 ` [net-next 12/14] can: peak_usb: pcan_usb_get_serial(): make use of le32_to_cpup() Marc Kleine-Budde
2021-04-13 9:52 ` [net-next 13/14] can: peak_usb: pcan_usb_get_serial(): unconditionally assign serial_number Marc Kleine-Budde
2021-04-13 9:52 ` [net-next 14/14] can: peak_usb: pcan_usb: replace open coded endianness conversion of unaligned data Marc Kleine-Budde
2021-04-13 22:00 ` pull-request: can-next 2021-04-13 patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210413095201.2409865-6-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=s.grosjean@peak-system.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).