All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
To: gregkh@linuxfoundation.org,
	paulo.miguel.almeida.rodenas@gmail.com, realwakka@gmail.com
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: pi433: remove unnecessary new line escape sequence characters
Date: Sun, 30 Jan 2022 19:18:26 +1300	[thread overview]
Message-ID: <YfYtsiKbOXghIN+5@mail.google.com> (raw)

In this driver there were occurences of '\n'-ended strings when using
dev_dbg function which isn't required which most likely were leftovers
from a previous printk/pr_<level> implementation.

This patch removes the extraneous '\n' characters to make it consistent
with the other dev_dbg instances.

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
---
Patch dependencies:

The following patches must be applied first given that changes are made
to the same set of files:

- https://lore.kernel.org/lkml/YfYdVokxsQ+Adl+T@mail.google.com/
- https://lore.kernel.org/lkml/YfX+llwDWZZMz+NY@mail.google.com/
---
 drivers/staging/pi433/pi433_if.c | 14 +++++++-------
 drivers/staging/pi433/rf69.c     | 16 ++++++++--------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 02d4ccebf..db1b092e8 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -124,13 +124,13 @@ static irqreturn_t DIO0_irq_handler(int irq, void *dev_id)
 
 	if (device->irq_state[DIO0] == DIO_PACKET_SENT) {
 		device->free_in_fifo = FIFO_SIZE;
-		dev_dbg(device->dev, "DIO0 irq: Packet sent\n");
+		dev_dbg(device->dev, "DIO0 irq: Packet sent");
 		wake_up_interruptible(&device->fifo_wait_queue);
 	} else if (device->irq_state[DIO0] == DIO_RSSI_DIO0) {
-		dev_dbg(device->dev, "DIO0 irq: RSSI level over threshold\n");
+		dev_dbg(device->dev, "DIO0 irq: RSSI level over threshold");
 		wake_up_interruptible(&device->rx_wait_queue);
 	} else if (device->irq_state[DIO0] == DIO_PAYLOAD_READY) {
-		dev_dbg(device->dev, "DIO0 irq: Payload ready\n");
+		dev_dbg(device->dev, "DIO0 irq: Payload ready");
 		device->free_in_fifo = 0;
 		wake_up_interruptible(&device->fifo_wait_queue);
 	}
@@ -151,7 +151,7 @@ static irqreturn_t DIO1_irq_handler(int irq, void *dev_id)
 			device->free_in_fifo = FIFO_SIZE - FIFO_THRESHOLD - 1;
 	}
 	dev_dbg(device->dev,
-		"DIO1 irq: %d bytes free in fifo\n", device->free_in_fifo);
+		"DIO1 irq: %d bytes free in fifo", device->free_in_fifo);
 	wake_up_interruptible(&device->fifo_wait_queue);
 
 	return IRQ_HANDLED;
@@ -726,7 +726,7 @@ static int pi433_tx_thread(void *data)
 			retval = wait_event_interruptible(device->fifo_wait_queue,
 							  device->free_in_fifo > 0);
 			if (retval) {
-				dev_dbg(device->dev, "ABORT\n");
+				dev_dbg(device->dev, "ABORT");
 				goto abort;
 			}
 		}
@@ -1180,7 +1180,7 @@ static int pi433_probe(struct spi_device *spi)
 
 	retval = spi_setup(spi);
 	if (retval) {
-		dev_dbg(&spi->dev, "configuration of SPI interface failed!\n");
+		dev_dbg(&spi->dev, "configuration of SPI interface failed!");
 		return retval;
 	}
 
@@ -1283,7 +1283,7 @@ static int pi433_probe(struct spi_device *spi)
 		goto device_create_failed;
 	} else {
 		dev_dbg(device->dev,
-			"created device for major %d, minor %d\n",
+			"created device for major %d, minor %d",
 			MAJOR(pi433_dev),
 			device->minor);
 	}
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 2ab3bf46e..9a8f93fd7 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -37,9 +37,9 @@ u8 rf69_read_reg(struct spi_device *spi, u8 addr)
 		 * that module is connected. Therefore no error
 		 * handling, just an optional error message...
 		 */
-		dev_dbg(&spi->dev, "read 0x%x FAILED\n", addr);
+		dev_dbg(&spi->dev, "read 0x%x FAILED", addr);
 	else
-		dev_dbg(&spi->dev, "read 0x%x from reg 0x%x\n", retval, addr);
+		dev_dbg(&spi->dev, "read 0x%x from reg 0x%x", retval, addr);
 #endif
 
 	return retval;
@@ -62,9 +62,9 @@ static int rf69_write_reg(struct spi_device *spi, u8 addr, u8 value)
 		 * that module is connected. Therefore no error
 		 * handling, just an optional error message...
 		 */
-		dev_dbg(&spi->dev, "write 0x%x to 0x%x FAILED\n", value, addr);
+		dev_dbg(&spi->dev, "write 0x%x to 0x%x FAILED", value, addr);
 	else
-		dev_dbg(&spi->dev, "wrote 0x%x to reg 0x%x\n", value, addr);
+		dev_dbg(&spi->dev, "wrote 0x%x to reg 0x%x", value, addr);
 #endif
 
 	return retval;
@@ -870,7 +870,7 @@ int rf69_read_fifo(struct spi_device *spi, u8 *buffer, unsigned int size)
 
 	if (size > FIFO_SIZE) {
 		dev_dbg(&spi->dev,
-			"read fifo: passed in buffer bigger then internal buffer\n");
+			"read fifo: passed in buffer bigger then internal buffer");
 		return -EMSGSIZE;
 	}
 
@@ -885,7 +885,7 @@ int rf69_read_fifo(struct spi_device *spi, u8 *buffer, unsigned int size)
 
 #ifdef DEBUG_FIFO_ACCESS
 	for (i = 0; i < size; i++)
-		dev_dbg(&spi->dev, "%d - 0x%x\n", i, local_buffer[i + 1]);
+		dev_dbg(&spi->dev, "%d - 0x%x", i, local_buffer[i + 1]);
 #endif
 
 	memcpy(buffer, &local_buffer[1], size);
@@ -902,7 +902,7 @@ int rf69_write_fifo(struct spi_device *spi, u8 *buffer, unsigned int size)
 
 	if (size > FIFO_SIZE) {
 		dev_dbg(&spi->dev,
-			"read fifo: passed in buffer bigger then internal buffer\n");
+			"read fifo: passed in buffer bigger then internal buffer");
 		return -EMSGSIZE;
 	}
 
@@ -911,7 +911,7 @@ int rf69_write_fifo(struct spi_device *spi, u8 *buffer, unsigned int size)
 
 #ifdef DEBUG_FIFO_ACCESS
 	for (i = 0; i < size; i++)
-		dev_dbg(&spi->dev, "0x%x\n", buffer[i]);
+		dev_dbg(&spi->dev, "0x%x", buffer[i]);
 #endif
 
 	return spi_write(spi, local_buffer, size + 1);
-- 
2.34.1


             reply	other threads:[~2022-01-30  6:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-30  6:18 Paulo Miguel Almeida [this message]
2022-01-31 10:40 ` [PATCH] staging: pi433: remove unnecessary new line escape sequence characters Dan Carpenter
2022-01-31 19:30   ` Paulo Miguel Almeida

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=YfYtsiKbOXghIN+5@mail.google.com \
    --to=paulo.miguel.almeida.rodenas@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=realwakka@gmail.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.