driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, Johan Hovold <johan@kernel.org>
Subject: [PATCH 4/4] staging: gigaset: rename endpoint-descriptor identifier
Date: Fri, 29 Nov 2019 11:17:53 +0100	[thread overview]
Message-ID: <20191129101753.9721-5-johan@kernel.org> (raw)
In-Reply-To: <20191129101753.9721-1-johan@kernel.org>

Rename an endpoint-descriptor pointer to shut up a checkpatch warning
about a line being over 80 columns, which is bound to generate a bunch
of clean up patches otherwise.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/staging/isdn/gigaset/usb-gigaset.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/isdn/gigaset/usb-gigaset.c b/drivers/staging/isdn/gigaset/usb-gigaset.c
index 6c07c8379711..d5fab2ea25b4 100644
--- a/drivers/staging/isdn/gigaset/usb-gigaset.c
+++ b/drivers/staging/isdn/gigaset/usb-gigaset.c
@@ -652,7 +652,7 @@ static int gigaset_probe(struct usb_interface *interface,
 	struct usb_host_interface *hostif = interface->cur_altsetting;
 	struct cardstate *cs = NULL;
 	struct usb_cardstate *ucs = NULL;
-	struct usb_endpoint_descriptor *endpoint;
+	struct usb_endpoint_descriptor *epd;
 	int buffer_size;
 
 	gig_dbg(DEBUG_ANY, "%s: Check if device matches ...", __func__);
@@ -703,17 +703,17 @@ static int gigaset_probe(struct usb_interface *interface,
 	/* save address of controller structure */
 	usb_set_intfdata(interface, cs);
 
-	endpoint = &hostif->endpoint[0].desc;
+	epd = &hostif->endpoint[0].desc;
 
-	if (!usb_endpoint_dir_out(endpoint) || !usb_endpoint_xfer_bulk(endpoint)) {
+	if (!usb_endpoint_dir_out(epd) || !usb_endpoint_xfer_bulk(epd)) {
 		dev_err(&interface->dev, "missing bulk-out endpoint\n");
 		retval = -ENODEV;
 		goto error;
 	}
 
-	buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+	buffer_size = le16_to_cpu(epd->wMaxPacketSize);
 	ucs->bulk_out_size = buffer_size;
-	ucs->bulk_out_epnum = usb_endpoint_num(endpoint);
+	ucs->bulk_out_epnum = usb_endpoint_num(epd);
 	ucs->bulk_out_buffer = kmalloc(buffer_size, GFP_KERNEL);
 	if (!ucs->bulk_out_buffer) {
 		dev_err(cs->dev, "Couldn't allocate bulk_out_buffer\n");
@@ -728,9 +728,9 @@ static int gigaset_probe(struct usb_interface *interface,
 		goto error;
 	}
 
-	endpoint = &hostif->endpoint[1].desc;
+	epd = &hostif->endpoint[1].desc;
 
-	if (!usb_endpoint_dir_in(endpoint) || !usb_endpoint_xfer_int(endpoint)) {
+	if (!usb_endpoint_dir_in(epd) || !usb_endpoint_xfer_int(epd)) {
 		dev_err(&interface->dev, "missing int-in endpoint\n");
 		retval = -ENODEV;
 		goto error;
@@ -744,7 +744,7 @@ static int gigaset_probe(struct usb_interface *interface,
 		retval = -ENOMEM;
 		goto error;
 	}
-	buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+	buffer_size = le16_to_cpu(epd->wMaxPacketSize);
 	ucs->rcvbuf_size = buffer_size;
 	ucs->rcvbuf = kmalloc(buffer_size, GFP_KERNEL);
 	if (!ucs->rcvbuf) {
@@ -754,10 +754,10 @@ static int gigaset_probe(struct usb_interface *interface,
 	}
 	/* Fill the interrupt urb and send it to the core */
 	usb_fill_int_urb(ucs->read_urb, udev,
-			 usb_rcvintpipe(udev, usb_endpoint_num(endpoint)),
+			 usb_rcvintpipe(udev, usb_endpoint_num(epd)),
 			 ucs->rcvbuf, buffer_size,
 			 gigaset_read_int_callback,
-			 cs, endpoint->bInterval);
+			 cs, epd->bInterval);
 
 	retval = usb_submit_urb(ucs->read_urb, GFP_KERNEL);
 	if (retval) {
-- 
2.24.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2019-11-29 10:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 10:17 [PATCH 0/4] staging: gigaset: fix crashes on probe Johan Hovold
2019-11-29 10:17 ` [PATCH 1/4] staging: gigaset: fix general protection fault " Johan Hovold
2019-12-01  0:15   ` Sasha Levin
2019-12-01 12:30     ` Tilman Schmidt
2019-12-01 12:41       ` Greg Kroah-Hartman
2019-12-01 13:04         ` Johan Hovold
2019-11-29 10:17 ` [PATCH 2/4] staging: gigaset: fix illegal free on probe errors Johan Hovold
2019-12-01  0:15   ` Sasha Levin
2019-11-29 10:17 ` [PATCH 3/4] staging: gigaset: add endpoint-type sanity check Johan Hovold
2019-11-29 10:17 ` Johan Hovold [this message]
2019-11-29 13:32 ` [PATCH 0/4] staging: gigaset: fix crashes on probe Greg Kroah-Hartman
2019-11-29 13:51   ` Johan Hovold
2019-11-29 14:23     ` Greg Kroah-Hartman

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=20191129101753.9721-5-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@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;
as well as URLs for NNTP newsgroup(s).