public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] staging: gdm724x: Clean long function calls
@ 2019-03-18  1:15 Ignacio Losiggio
  2019-03-18  1:15 ` [PATCH v2 2/2] staging: gdm724x: Do not break expressions Ignacio Losiggio
  2019-03-18  5:50 ` [PATCH v2 1/2] staging: gdm724x: Clean long function calls Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Ignacio Losiggio @ 2019-03-18  1:15 UTC (permalink / raw)
  To: gregkh, devel, linux-kernel; +Cc: Ignacio Losiggio, Ignacio Losiggio

Signed-off-by: Ignacio Losiggio <iglosiggio@dc.uba.ar>
---
 drivers/staging/gdm724x/gdm_mux.c | 28 ++++++----------------------
 1 file changed, 6 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/gdm724x/gdm_mux.c b/drivers/staging/gdm724x/gdm_mux.c
index e2a050ba6fbb..fa8585ea1572 100644
--- a/drivers/staging/gdm724x/gdm_mux.c
+++ b/drivers/staging/gdm724x/gdm_mux.c
@@ -177,12 +177,8 @@ static int up_to_host(struct mux_rx *r)
 			break;
 		}
 
-		ret = r->callback(mux_header->data,
-				payload_size,
-				index,
-				mux_dev->tty_dev,
-				RECV_PACKET_PROCESS_CONTINUE
-				);
+		ret = r->callback(mux_header->data, payload_size, index,
+				  mux_dev->tty_dev, RECV_PACKET_PROCESS_CONTINUE);
 		if (ret == TO_HOST_BUFFER_REQUEST_FAIL) {
 			r->offset += packet_size_sum;
 			break;
@@ -190,12 +186,8 @@ static int up_to_host(struct mux_rx *r)
 
 		packet_size_sum += total_len;
 		if (len - packet_size_sum <= MUX_HEADER_SIZE + 2) {
-			ret = r->callback(NULL,
-					0,
-					index,
-					mux_dev->tty_dev,
-					RECV_PACKET_PROCESS_COMPLETE
-					);
+			ret = r->callback(NULL, 0, index, mux_dev->tty_dev,
+					  RECV_PACKET_PROCESS_COMPLETE);
 			break;
 		}
 	}
@@ -410,16 +402,8 @@ static int gdm_mux_send_control(void *priv_dev, int request, int value,
 	struct usb_device *usbdev = mux_dev->usbdev;
 	int ret;
 
-	ret = usb_control_msg(usbdev,
-			      usb_sndctrlpipe(usbdev, 0),
-			      request,
-			      USB_RT_ACM,
-			      value,
-			      2,
-			      buf,
-			      len,
-			      5000
-			     );
+	ret = usb_control_msg(usbdev, usb_sndctrlpipe(usbdev, 0), request,
+			      USB_RT_ACM, value, 2, buf, len, 5000);
 
 	if (ret < 0)
 		pr_err("usb_control_msg error: %d\n", ret);
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 2/2] staging: gdm724x: Do not break expressions
  2019-03-18  1:15 [PATCH v2 1/2] staging: gdm724x: Clean long function calls Ignacio Losiggio
@ 2019-03-18  1:15 ` Ignacio Losiggio
  2019-03-18  5:50 ` [PATCH v2 1/2] staging: gdm724x: Clean long function calls Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Ignacio Losiggio @ 2019-03-18  1:15 UTC (permalink / raw)
  To: gregkh, devel, linux-kernel; +Cc: Ignacio Losiggio, Ignacio Losiggio

When the entire expression can be shown in the same line breaking it
makes it more difficult to read.

Signed-off-by: Ignacio Losiggio <iglosiggio@dc.uba.ar>
---
 drivers/staging/gdm724x/gdm_mux.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gdm724x/gdm_mux.c b/drivers/staging/gdm724x/gdm_mux.c
index fa8585ea1572..ca934dc04d82 100644
--- a/drivers/staging/gdm724x/gdm_mux.c
+++ b/drivers/staging/gdm724x/gdm_mux.c
@@ -164,8 +164,7 @@ static int up_to_host(struct mux_rx *r)
 
 		total_len = ALIGN(MUX_HEADER_SIZE + payload_size, 4);
 
-		if (len - packet_size_sum <
-			total_len) {
+		if (len - packet_size_sum < total_len) {
 			pr_err("invalid payload : %d %d %04x\n",
 			       payload_size, len, packet_type);
 			break;
@@ -368,8 +367,8 @@ static int gdm_mux_send(void *priv_dev, void *data, int len, int tty_index,
 	mux_header->packet_type = __cpu_to_le16(packet_type[tty_index]);
 
 	memcpy(t->buf + MUX_HEADER_SIZE, data, len);
-	memset(t->buf + MUX_HEADER_SIZE + len, 0, total_len - MUX_HEADER_SIZE -
-	       len);
+	memset(t->buf + MUX_HEADER_SIZE + len, 0,
+	       total_len - MUX_HEADER_SIZE - len);
 
 	t->len = total_len;
 	t->callback = cb;
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/2] staging: gdm724x: Clean long function calls
  2019-03-18  1:15 [PATCH v2 1/2] staging: gdm724x: Clean long function calls Ignacio Losiggio
  2019-03-18  1:15 ` [PATCH v2 2/2] staging: gdm724x: Do not break expressions Ignacio Losiggio
@ 2019-03-18  5:50 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2019-03-18  5:50 UTC (permalink / raw)
  To: Ignacio Losiggio; +Cc: devel, linux-kernel, Ignacio Losiggio

On Sun, Mar 17, 2019 at 10:15:34PM -0300, Ignacio Losiggio wrote:
> Signed-off-by: Ignacio Losiggio <iglosiggio@dc.uba.ar>
> ---
>  drivers/staging/gdm724x/gdm_mux.c | 28 ++++++----------------------
>  1 file changed, 6 insertions(+), 22 deletions(-)

I can not take patches without any changelog text, sorry.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-18  5:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-18  1:15 [PATCH v2 1/2] staging: gdm724x: Clean long function calls Ignacio Losiggio
2019-03-18  1:15 ` [PATCH v2 2/2] staging: gdm724x: Do not break expressions Ignacio Losiggio
2019-03-18  5:50 ` [PATCH v2 1/2] staging: gdm724x: Clean long function calls Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox