All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: pi433: break long lines in pi433_if.c
@ 2018-04-06 20:48 Simon Sandström
  2018-04-23 13:41 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Sandström @ 2018-04-06 20:48 UTC (permalink / raw)
  To: gregkh; +Cc: devel, Valentin.Vidic, linux-kernel, srishtishar, linux, viro

Breaks long lines in pi433_if.c, fixing checkpatch.pl warnings:
"WARNING: line over 80 characters"

Signed-off-by: Simon Sandström <simon@nikanor.nu>
---
 drivers/staging/pi433/pi433_if.c | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index d1e0ddbc79ce..795cf77e002c 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -593,14 +593,18 @@ pi433_tx_thread(void *data)
 
 		retval = kfifo_out(&device->tx_fifo, &tx_cfg, sizeof(tx_cfg));
 		if (retval != sizeof(tx_cfg)) {
-			dev_dbg(device->dev, "reading tx_cfg from fifo failed: got %d byte(s), expected %d", retval, (unsigned int)sizeof(tx_cfg));
+			dev_dbg(device->dev,
+				"reading tx_cfg from fifo failed: got %d byte(s), expected %d",
+				retval, (unsigned int)sizeof(tx_cfg));
 			mutex_unlock(&device->tx_fifo_lock);
 			continue;
 		}
 
 		retval = kfifo_out(&device->tx_fifo, &size, sizeof(size_t));
 		if (retval != sizeof(size_t)) {
-			dev_dbg(device->dev, "reading msg size from fifo failed: got %d, expected %d", retval, (unsigned int)sizeof(size_t));
+			dev_dbg(device->dev,
+				"reading msg size from fifo failed: got %d, expected %d",
+				retval, (unsigned int)sizeof(size_t));
 			mutex_unlock(&device->tx_fifo_lock);
 			continue;
 		}
@@ -623,7 +627,11 @@ pi433_tx_thread(void *data)
 
 		/* add length byte, if requested */
 		if (tx_cfg.enable_length_byte  == OPTION_ON)
-			device->buffer[position++] = size - 1; /* according to spec length byte itself must be excluded from the length calculation */
+			/*
+			 * according to spec, length byte itself must be
+			 * excluded from the length calculation
+			 */
+			device->buffer[position++] = size - 1;
 
 		/* add adr byte, if requested */
 		if (tx_cfg.enable_address_byte == OPTION_ON)
@@ -856,7 +864,8 @@ pi433_write(struct file *filp, const char __user *buf,
 
 abort:
 	dev_dbg(device->dev, "write to fifo failed: 0x%x", retval);
-	kfifo_reset(&device->tx_fifo); // TODO: maybe find a solution, not to discard already stored, valid entries
+	/* TODO: find a solution to not discard already stored valid entries */
+	kfifo_reset(&device->tx_fifo);
 	mutex_unlock(&device->tx_fifo_lock);
 	return -EAGAIN;
 }
@@ -1042,7 +1051,7 @@ static int setup_gpio(struct pi433_device *device)
 		/* configure irq */
 		device->irq_num[i] = gpiod_to_irq(device->gpiod[i]);
 		if (device->irq_num[i] < 0) {
-			device->gpiod[i] = ERR_PTR(-EINVAL);//(struct gpio_desc *)device->irq_num[i];
+			device->gpiod[i] = ERR_PTR(-EINVAL);
 			return device->irq_num[i];
 		}
 		retval = request_irq(device->irq_num[i],
-- 
2.11.0

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

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

* Re: [PATCH] staging: pi433: break long lines in pi433_if.c
  2018-04-06 20:48 [PATCH] staging: pi433: break long lines in pi433_if.c Simon Sandström
@ 2018-04-23 13:41 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2018-04-23 13:41 UTC (permalink / raw)
  To: Simon Sandström
  Cc: devel, Valentin.Vidic, linux-kernel, srishtishar, linux, viro

On Fri, Apr 06, 2018 at 10:48:17PM +0200, Simon Sandström wrote:
> Breaks long lines in pi433_if.c, fixing checkpatch.pl warnings:
> "WARNING: line over 80 characters"
> 
> Signed-off-by: Simon Sandström <simon@nikanor.nu>
> ---
>  drivers/staging/pi433/pi433_if.c | 19 ++++++++++++++-----
>  1 file changed, 14 insertions(+), 5 deletions(-)

This patch did not apply, please fix up and resend.

thanks,

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

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

end of thread, other threads:[~2018-04-23 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-06 20:48 [PATCH] staging: pi433: break long lines in pi433_if.c Simon Sandström
2018-04-23 13:41 ` Greg KH

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.