Linux CAN drivers development
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: linux-can@vger.kernel.org
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
	Jimmy Assarsson <extja@kvaser.com>
Subject: [PATCH 8/9] can: kvaser_usb: kvaser_usb_send_cmd(): remove redundant variable actual_len
Date: Mon, 24 Jan 2022 22:56:41 +0100	[thread overview]
Message-ID: <20220124215642.3474154-9-mkl@pengutronix.de> (raw)
In-Reply-To: <20220124215642.3474154-1-mkl@pengutronix.de>

The function usb_bulk_msg() can be called with a NULL pointer as the
"actual_length" parameter. This patch removes this variable.

Cc: Jimmy Assarsson <extja@kvaser.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
index c4b4d3d0a387..e67658b53d02 100644
--- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
+++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
@@ -205,12 +205,10 @@ MODULE_DEVICE_TABLE(usb, kvaser_usb_table);
 
 int kvaser_usb_send_cmd(const struct kvaser_usb *dev, void *cmd, int len)
 {
-	int actual_len; /* Not used */
-
 	return usb_bulk_msg(dev->udev,
 			    usb_sndbulkpipe(dev->udev,
 					    dev->bulk_out->bEndpointAddress),
-			    cmd, len, &actual_len, KVASER_USB_TIMEOUT);
+			    cmd, len, NULL, KVASER_USB_TIMEOUT);
 }
 
 int kvaser_usb_recv_cmd(const struct kvaser_usb *dev, void *cmd, int len,
-- 
2.34.1



  parent reply	other threads:[~2022-01-25  2:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24 21:56 [PATCH 0/9] dt-binding, bittiming and other cleanups Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 1/9] dt-binding: can: mcp251xfd: include common CAN controller bindings Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 2/9] dt-binding: can: sun4i_can: " Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 3/9] dt-binding: can: m_can: " Marc Kleine-Budde
2022-02-17 16:05   ` Chandrasekar R
2022-02-17 20:17     ` Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 4/9] dt-binding: can: rcar-can: " Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 5/9] can: bittiming: can_validate_bitrate(): simplify bit rate checking Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 6/9] can: bittiming: mark function arguments and local variables as const Marc Kleine-Budde
2022-01-24 21:56 ` [PATCH 7/9] can: drivers: don't print IO remapped address of base registers Marc Kleine-Budde
2022-01-25  8:48   ` Alexandre Belloni
2022-01-24 21:56 ` Marc Kleine-Budde [this message]
2022-01-24 21:56 ` [PATCH 9/9] can: c_can: ethtool: use default drvinfo Marc Kleine-Budde

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=20220124215642.3474154-9-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=extja@kvaser.com \
    --cc=linux-can@vger.kernel.org \
    /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