All of lore.kernel.org
 help / color / mirror / Atom feed
From: <cristian.birsan@microchip.com>
To: <nicolas.ferre@atmel.com>, <balbi@kernel.org>,
	<gregkh@linuxfoundation.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <ludovic.desroches@atmel.com>,
	<alexandre.belloni@free-electrons.com>,
	<boris.brezillon@free-electrons.com>,
	Cristian Birsan <cristian.birsan@microchip.com>
Subject: [PATCH 2/4 linux-next] usb: gadget: udc: atmel: Minor code cleanup
Date: Tue, 14 Feb 2017 18:09:04 +0200	[thread overview]
Message-ID: <f27f5aeeabc6eaf02833ee51cd343b564c40fb3e.1487007870.git.cristian.birsan@microchip.com> (raw)
In-Reply-To: <cover.1487007870.git.cristian.birsan@microchip.com>

From: Cristian Birsan <cristian.birsan@microchip.com>

Minor code cleanup based on feedback received on mailinglist.

Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index ce8bf8b..3becb28 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -321,7 +321,6 @@ static inline void usba_cleanup_debugfs(struct usba_udc *udc)
 
 static ushort fifo_mode;
 
-/* "modprobe ... fifo_mode=1" etc */
 module_param(fifo_mode, ushort, 0x0);
 MODULE_PARM_DESC(fifo_mode, "Endpoint configuration mode");
 
@@ -1076,11 +1075,9 @@ static int atmel_usba_start(struct usb_gadget *gadget,
 		struct usb_gadget_driver *driver);
 static int atmel_usba_stop(struct usb_gadget *gadget);
 
-static struct usb_ep *atmel_usba_match_ep(
-		struct usb_gadget		*gadget,
-		struct usb_endpoint_descriptor	*desc,
-		struct usb_ss_ep_comp_descriptor *ep_comp
-)
+static struct usb_ep *atmel_usba_match_ep(struct usb_gadget *gadget,
+				struct usb_endpoint_descriptor	*desc,
+				struct usb_ss_ep_comp_descriptor *ep_comp)
 {
 	struct usb_ep	*_ep;
 	struct usba_ep *ep;
@@ -1100,7 +1097,6 @@ static struct usb_ep *atmel_usba_match_ep(
 		ep = to_usba_ep(_ep);
 
 		switch (usb_endpoint_type(desc)) {
-
 		case USB_ENDPOINT_XFER_CONTROL:
 			break;
 
@@ -1141,7 +1137,7 @@ static struct usb_ep *atmel_usba_match_ep(
 		ep->udc->configured_ep++;
 	}
 
-return _ep;
+	return _ep;
 }
 
 static const struct usb_gadget_ops usba_udc_ops = {
@@ -2089,8 +2085,9 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 		while ((pp = of_get_next_child(np, pp)))
 			udc->num_ep++;
 		udc->configured_ep = 1;
-	} else
+	} else {
 		udc->num_ep = usba_config_fifo_table(udc);
+	}
 
 	eps = devm_kzalloc(&pdev->dev, sizeof(struct usba_ep) * udc->num_ep,
 			   GFP_KERNEL);
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: cristian.birsan@microchip.com (cristian.birsan at microchip.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4 linux-next] usb: gadget: udc: atmel: Minor code cleanup
Date: Tue, 14 Feb 2017 18:09:04 +0200	[thread overview]
Message-ID: <f27f5aeeabc6eaf02833ee51cd343b564c40fb3e.1487007870.git.cristian.birsan@microchip.com> (raw)
In-Reply-To: <cover.1487007870.git.cristian.birsan@microchip.com>

From: Cristian Birsan <cristian.birsan@microchip.com>

Minor code cleanup based on feedback received on mailinglist.

Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index ce8bf8b..3becb28 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -321,7 +321,6 @@ static inline void usba_cleanup_debugfs(struct usba_udc *udc)
 
 static ushort fifo_mode;
 
-/* "modprobe ... fifo_mode=1" etc */
 module_param(fifo_mode, ushort, 0x0);
 MODULE_PARM_DESC(fifo_mode, "Endpoint configuration mode");
 
@@ -1076,11 +1075,9 @@ static int atmel_usba_start(struct usb_gadget *gadget,
 		struct usb_gadget_driver *driver);
 static int atmel_usba_stop(struct usb_gadget *gadget);
 
-static struct usb_ep *atmel_usba_match_ep(
-		struct usb_gadget		*gadget,
-		struct usb_endpoint_descriptor	*desc,
-		struct usb_ss_ep_comp_descriptor *ep_comp
-)
+static struct usb_ep *atmel_usba_match_ep(struct usb_gadget *gadget,
+				struct usb_endpoint_descriptor	*desc,
+				struct usb_ss_ep_comp_descriptor *ep_comp)
 {
 	struct usb_ep	*_ep;
 	struct usba_ep *ep;
@@ -1100,7 +1097,6 @@ static struct usb_ep *atmel_usba_match_ep(
 		ep = to_usba_ep(_ep);
 
 		switch (usb_endpoint_type(desc)) {
-
 		case USB_ENDPOINT_XFER_CONTROL:
 			break;
 
@@ -1141,7 +1137,7 @@ static struct usb_ep *atmel_usba_match_ep(
 		ep->udc->configured_ep++;
 	}
 
-return _ep;
+	return _ep;
 }
 
 static const struct usb_gadget_ops usba_udc_ops = {
@@ -2089,8 +2085,9 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 		while ((pp = of_get_next_child(np, pp)))
 			udc->num_ep++;
 		udc->configured_ep = 1;
-	} else
+	} else {
 		udc->num_ep = usba_config_fifo_table(udc);
+	}
 
 	eps = devm_kzalloc(&pdev->dev, sizeof(struct usba_ep) * udc->num_ep,
 			   GFP_KERNEL);
-- 
2.7.4

  parent reply	other threads:[~2017-02-14 16:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 16:09 [PATCH 0/4 linux-next] usb: gadget: udc: atmel: Endpoint allocation scheme fixes cristian.birsan
2017-02-14 16:09 ` cristian.birsan at microchip.com
2017-02-14 16:09 ` [PATCH 1/4 linux-next] usb: gadget: udc: atmel: Check fifo configuration values against device tree cristian.birsan
2017-02-14 16:09   ` cristian.birsan at microchip.com
2017-03-06 15:06   ` Felipe Balbi
2017-03-06 15:06     ` Felipe Balbi
2017-02-14 16:09 ` cristian.birsan [this message]
2017-02-14 16:09   ` [PATCH 2/4 linux-next] usb: gadget: udc: atmel: Minor code cleanup cristian.birsan at microchip.com
2017-02-14 16:09 ` [PATCH 3/4 linux-next] usb: gadget: udc: atmel: Use dev_warn() to display EP configuration error cristian.birsan
2017-02-14 16:09   ` cristian.birsan at microchip.com
2017-02-14 16:09 ` [PATCH 4/4 linux-next] usb: gadget: udc: atmel: Update Kconfig help for fifo_mode = 0 cristian.birsan
2017-02-14 16:09   ` cristian.birsan at microchip.com
2017-02-15  9:08 ` [PATCH 0/4 linux-next] usb: gadget: udc: atmel: Endpoint allocation scheme fixes Nicolas Ferre
2017-02-15  9:08   ` Nicolas Ferre

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=f27f5aeeabc6eaf02833ee51cd343b564c40fb3e.1487007870.git.cristian.birsan@microchip.com \
    --to=cristian.birsan@microchip.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=balbi@kernel.org \
    --cc=boris.brezillon@free-electrons.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=ludovic.desroches@atmel.com \
    --cc=nicolas.ferre@atmel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.