Skip to contentSkip to conversation

ata: pata_arasan_cf: fix missing newline in dev_err messages

PATCH Superseded Haoyu Lu 4 participants 7 messages Apr 2

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Haoyu Lu

author
#0 lore raw

PATCH 1/1 ata: pata_arasan_cf: fix missing newline in dev_err messages

Add missing trailing newlines to dev_err() messages in pata_arasan_cf.c.

This keeps the error output as properly terminated log lines.

---
 drivers/ata/pata_arasan_cf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ata/pata_arasan_cf.c +2 -2
index 514d549286b5..abcdef123456 100644
@@ -380,7 +380,7 @@ static int arasan_cf_xfer(struct arasan_cf_dev *acdev, struct ata_queued_cmd *qc
 	if (!wait_for_completion_timeout(&acdev->cf_completion, TIMEOUT)) {
 		u32 rw = acdev->qc->tf.flags & ATA_TFLAG_WRITE;
 
-		dev_err(acdev->host->dev, "%s TimeOut", rw ? "write" : "read");
+		dev_err(acdev->host->dev, "%s TimeOut\n", rw ? "write" : "read");
 		return -ETIMEDOUT;
 	}
 
@@ -474,7 +474,7 @@ static int arasan_cf_xfer(struct arasan_cf_dev *acdev, struct ata_queued_cmd *qc
 			dma_len = min(xfer_cnt, FIFO_SIZE);
 			ret = dma_xfer(acdev, src, dest, dma_len);
 			if (ret) {
-				dev_err(acdev->host->dev, "dma failed");
+				dev_err(acdev->host->dev, "dma failed\n");
 				goto fail;
 			}
 

--
2.17.1

Acked-by on v1 1/1
#1 lore raw
Quoted 23 lines · Haoyu Lu

Add missing trailing newlines to dev_err() messages in pata_arasan_cf.c.

This keeps the error output as properly terminated log lines.

---
 drivers/ata/pata_arasan_cf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ata/pata_arasan_cf.c +1 -1
index 514d549286b5..abcdef123456 100644
@@ -380,7 +380,7 @@ static int arasan_cf_xfer(struct arasan_cf_dev *acdev, struct ata_queued_cmd *qc
 	if (!wait_for_completion_timeout(&acdev->cf_completion, TIMEOUT)) {
 		u32 rw = acdev->qc->tf.flags & ATA_TFLAG_WRITE;
 
-		dev_err(acdev->host->dev, "%s TimeOut", rw ? "write" : "read");
+		dev_err(acdev->host->dev, "%s TimeOut\n", rw ? "write" : "read");
 		return -ETIMEDOUT;
 	}
 

drivers/ata/pata_arasan_cf.c static int arasan_cf_xfer(struct arasan_cf_dev *acdev, struct ata_queued_cmd *qc · line 480

Quoted 8 lines
drivers/ata/pata_arasan_cf.c +1 -1
@@ -474,7 +474,7 @@ static int arasan_cf_xfer(struct arasan_cf_dev *acdev, struct ata_queued_cmd *qc
 			dma_len = min(xfer_cnt, FIFO_SIZE);
 			ret = dma_xfer(acdev, src, dest, dma_len);
 			if (ret) {
-				dev_err(acdev->host->dev, "dma failed");
+				dev_err(acdev->host->dev, "dma failed\n");
 				goto fail;
 			}
 
Signature · 1 line
viresh
maintainer
#2 lore raw
In reply to Haoyu Lu

drivers/ata/pata_arasan_cf.c static int arasan_cf_xfer(struct arasan_cf_dev *acdev, struct ata_queued_cmd *qc

Quoted 14 lines · Haoyu Lu

Add missing trailing newlines to dev_err() messages in pata_arasan_cf.c.

This keeps the error output as properly terminated log lines.

---
 drivers/ata/pata_arasan_cf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ata/pata_arasan_cf.c +0 -0
index 514d549286b5..abcdef123456 100644
@@ -380,7 +380,7 @@ static int arasan_cf_xfer(struct arasan_cf_dev *acdev, struct ata_queued_cmd *qc

There is no such function, and yet your patch applies. I am confused... Which tree is this patch against ?

Quoted 19 lines
drivers/ata/pata_arasan_cf.c +2 -3
 	if (!wait_for_completion_timeout(&acdev->cf_completion, TIMEOUT)) {
 		u32 rw = acdev->qc->tf.flags & ATA_TFLAG_WRITE;
 
-		dev_err(acdev->host->dev, "%s TimeOut", rw ? "write" : "read");
+		dev_err(acdev->host->dev, "%s TimeOut\n", rw ? "write" : "read");
 		return -ETIMEDOUT;
 	}
 
@@ -474,7 +474,7 @@ static int arasan_cf_xfer(struct arasan_cf_dev *acdev, struct ata_queued_cmd *qc
 			dma_len = min(xfer_cnt, FIFO_SIZE);
 			ret = dma_xfer(acdev, src, dest, dma_len);
 			if (ret) {
-				dev_err(acdev->host->dev, "dma failed");
+				dev_err(acdev->host->dev, "dma failed\n");
 				goto fail;
 			}
 
--

2.17.1

Signature · 2 lines
Damien Le Moal
Western Digital Research
#3 lore raw

Hi Damien,

Thank you for checking!
The function arasan_cf_xfer() does exist in the mainline kernel at drivers/ata/pata_arasan_cf.c around line 380.
This patch is based on the latest upstream mainline branch. Please let me know if you need anything else.

Best regards, Haoyu Lu

Quoted 44 lines · Damien Le Moal <[email protected]> 于2026年4月2日周四 13:35写道:

drivers/ata/pata_arasan_cf.c static int arasan_cf_xfer(struct arasan_cf_dev *acdev, struct ata_queued_cmd *qc

Quoted 14 lines · Haoyu Lu

Add missing trailing newlines to dev_err() messages in pata_arasan_cf.c.

This keeps the error output as properly terminated log lines.

---
 drivers/ata/pata_arasan_cf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ata/pata_arasan_cf.c +0 -0
index 514d549286b5..abcdef123456 100644
@@ -380,7 +380,7 @@ static int arasan_cf_xfer(struct arasan_cf_dev *acdev, struct ata_queued_cmd *qc

There is no such function, and yet your patch applies. I am confused... Which tree is this patch against ?

Quoted 18 lines
drivers/ata/pata_arasan_cf.c +2 -3
      if (!wait_for_completion_timeout(&acdev->cf_completion, TIMEOUT)) {
              u32 rw = acdev->qc->tf.flags & ATA_TFLAG_WRITE;
 
-             dev_err(acdev->host->dev, "%s TimeOut", rw ? "write" : "read");
+             dev_err(acdev->host->dev, "%s TimeOut\n", rw ? "write" : "read");
              return -ETIMEDOUT;
      }
 
@@ -474,7 +474,7 @@ static int arasan_cf_xfer(struct arasan_cf_dev *acdev, struct ata_queued_cmd *qc
                      dma_len = min(xfer_cnt, FIFO_SIZE);
                      ret = dma_xfer(acdev, src, dest, dma_len);
                      if (ret) {
-                             dev_err(acdev->host->dev, "dma failed");
+                             dev_err(acdev->host->dev, "dma failed\n");
                              goto fail;
                      }
 
--
Quoted 1 line

2.17.1

--
Damien Le Moal
Western Digital Research

maintainer
#4 lore raw
Quoted 5 lines · Owens James

Hi Damien,

Thank you for checking!
The function arasan_cf_xfer() does exist in the mainline kernel at drivers/ata/pata_arasan_cf.c around line 380.

Nope...

378 static inline int wait4buf(struct arasan_cf_dev *acdev) 379 {
380 if (!wait_for_completion_timeout(&acdev->cf_completion, TIMEOUT)) {
381 u32 rw = acdev->qc->tf.flags & ATA_TFLAG_WRITE;
382
383 dev_err(acdev->host->dev, "%s TimeOut\n", rw ? "write" :
"read");
384 return -ETIMEDOUT;
385 }
386
387 /* Check if PIO Error interrupt has occurred */
388 if (acdev->dma_status & ATA_DMA_ERR)
389 return -EAGAIN;
390
391 return 0;
392 }

And "git grep arasan_cf_xfer" gives nothing.

So still not sure which kernel you are looking at.

Quoted 2 lines

This patch is based on the latest upstream mainline branch. Please let me know if you need anything else.

Patches for libata should be based off libata/for-next or libata/for-7.1.

Signature · 2 lines
Damien Le Moal
Western Digital Research
author
#5 lore raw

Hi Damien,

Sorry for the mistake!
I didn't realize libata patches need to be based on libata/for-next, not mainline.
I see the driver has been refactored and the newlines are already fixed. I'll drop this patch and follow the correct branch for future changes. Thanks for the clarification!

Best regards, Haoyu Lu

Quoted 40 lines · Damien Le Moal
Quoted 5 lines · Owens James

Hi Damien,

Thank you for checking!
The function arasan_cf_xfer() does exist in the mainline kernel at drivers/ata/pata_arasan_cf.c around line 380.

Nope...

378 static inline int wait4buf(struct arasan_cf_dev *acdev) 379 {
380 if (!wait_for_completion_timeout(&acdev->cf_completion, TIMEOUT)) {
381 u32 rw = acdev->qc->tf.flags & ATA_TFLAG_WRITE;
382
383 dev_err(acdev->host->dev, "%s TimeOut\n", rw ? "write" :
"read");
384 return -ETIMEDOUT;
385 }
386
387 /* Check if PIO Error interrupt has occurred */
388 if (acdev->dma_status & ATA_DMA_ERR)
389 return -EAGAIN;
390
391 return 0;
392 }

And "git grep arasan_cf_xfer" gives nothing.

So still not sure which kernel you are looking at.

Quoted 2 lines

This patch is based on the latest upstream mainline branch. Please let me know if you need anything else.

Patches for libata should be based off libata/for-next or libata/for-7.1.

--
Damien Le Moal
Western Digital Research

maintainer
#6 lore raw

Hello Haoyu,

Quoted 5 lines · Haoyu Lu

Hi Damien,

Sorry for the mistake!
I didn't realize libata patches need to be based on libata/for-next, not mainline.

This patch was not based on either libata/for-next or Linus's tree.

Quoted 3 lines

I see the driver has been refactored and the newlines are already fixed. I'll drop this patch and follow the correct branch for future changes. Thanks for the clarification!

There has not been any newlines added upstream, your fix is still valid.

However, the function has not been refactored, you must have based your patch on some downstream kernel.

While the patch does apply, and I could theoretically apply it, please:

-Send a V2 based on libata/for-next or Linus's tree -Pick up the tag from Viresh
-Change the subject from
ata: pata_arasan_cf: fix missing newline in dev_err messages to
ata: pata_arasan_cf: fix missing newline in dev_err() messages

If only to give you experience working with upstream kernels.

Kind regards,
Niklas