Skip to contentSkip to conversation

ata: add missing newlines to error messages

PATCH Superseded Artem Novak 4 participants 13 messages Nov 27 – Dec 1

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v4 cover ata: add missing newlines to error messages

This series adds missing trailing newlines to error and warning messages in four ATA drivers.

The changes are formatting-only and do not alter driver behaviour.

Changes in v4:
- Rebase on libata for-next (3391ac405dca).
- Resolve the pata_pxa conflict while preserving the updated DMA timeout condition from the new base.

Changes in v3:
- Carry Damien's Reviewed-by tag on all four patches; it was inadvertently included only on the sata_dwc_460ex patch in v2.

Changes in v2:
- Fix an additional missing newline in sata_dwc_error_intr(), as pointed out by Damien Le Moal.
- Add Damien's Reviewed-by tag to the sata_dwc_460ex patch.

Artem Novak (4):
ata: pata_arasan_cf: add missing newline to warning
ata: pata_pxa: add missing newline to DMA warning
ata: sata_dwc_460ex: add missing newlines to error messages
ata: sata_gemini: add missing newlines to error messages

 drivers/ata/pata_arasan_cf.c | 2 +-
 drivers/ata/pata_pxa.c       | 2 +-
 drivers/ata/sata_dwc_460ex.c | 8 ++++----
 drivers/ata/sata_gemini.c    | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
2.56.1
#1 lore raw

PATCH v4 1/4 ata: pata_arasan_cf: add missing newline to warning

Terminate the clock-rate failure warning with a newline so that subsequent kernel messages are properly separated.

---
 drivers/ata/pata_arasan_cf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/pata_arasan_cf.c +1 -1
index 5e02d227ddda..61977f0ed84c 100644
@@ -318,7 +318,7 @@ static int cf_init(struct arasan_cf_dev *acdev)
 
 	ret = clk_set_rate(acdev->clk, 166000000);
 	if (ret) {
-		dev_warn(acdev->host->dev, "clock set rate failed");
+		dev_warn(acdev->host->dev, "clock set rate failed\n");
 		clk_disable_unprepare(acdev->clk);
 		return ret;
 	}
Signature · 1 line
2.56.1
#2 lore raw

PATCH v4 2/4 ata: pata_pxa: add missing newline to DMA warning

In reply to Artem Novak

Terminate the DMA completion timeout warning with a newline to keep kernel log messages properly separated.

---
 drivers/ata/pata_pxa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/pata_pxa.c +1 -1
index 2312c42def22..2e73726410b9 100644
@@ -96,7 +96,7 @@ static void pxa_bmdma_stop(struct ata_queued_cmd *qc)
 	status = dmaengine_tx_status(pd->dma_chan, pd->dma_cookie, NULL);
 	if (status != DMA_ERROR && status != DMA_COMPLETE &&
 	    !wait_for_completion_timeout(&pd->dma_done, HZ))
-		ata_dev_err(qc->dev, "Timeout waiting for DMA completion!");
+		ata_dev_err(qc->dev, "Timeout waiting for DMA completion!\n");
 
 	dmaengine_terminate_all(pd->dma_chan);
 }
Signature · 1 line
2.56.1
#3 lore raw

PATCH v4 3/4 ata: sata_dwc_460ex: add missing newlines to error messages

In reply to Artem Novak

Terminate the error messages with newlines so that subsequent kernel log messages are properly separated.

---
 drivers/ata/sata_dwc_460ex.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/ata/sata_dwc_460ex.c +4 -4
index 4ab378d2c26f..df711a802c53 100644
@@ -497,7 +497,7 @@ static irqreturn_t sata_dwc_isr(int irq, void *dev_instance)
 
 		qc = ata_qc_from_tag(ap, tag);
 		if (unlikely(!qc)) {
-			dev_err(ap->dev, "failed to get qc");
+			dev_err(ap->dev, "failed to get qc\n");
 			handled = 1;
 			goto DONE;
 		}
@@ -611,7 +611,7 @@ static irqreturn_t sata_dwc_isr(int irq, void *dev_instance)
 		tag_mask &= ~(1U << tag);
 		qc = ata_qc_from_tag(ap, tag);
 		if (unlikely(!qc)) {
-			dev_err(ap->dev, "failed to get qc");
+			dev_err(ap->dev, "failed to get qc\n");
 			handled = 1;
 			goto DONE;
 		}
@@ -706,7 +706,7 @@ static void sata_dwc_dma_xfer_complete(struct ata_port *ap)
 	tag = ap->link.active_tag;
 	qc = ata_qc_from_tag(ap, tag);
 	if (!qc) {
-		dev_err(ap->dev, "failed to get qc");
+		dev_err(ap->dev, "failed to get qc\n");
 		return;
 	}
 
@@ -1187,7 +1187,7 @@ static int sata_dwc_probe(struct platform_device *ofdev)
 	 */
 	err = ata_host_activate(host, irq, sata_dwc_isr, 0, &sata_dwc_sht);
 	if (err) {
-		dev_err(dev, "failed to activate host");
+		dev_err(dev, "failed to activate host\n");
 		goto error_out;
 	}
 
Signature · 1 line
2.56.1
#4 lore raw

Re: [PATCH v4 3/4] ata: sata_dwc_460ex: add missing newlines to error messages

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] ata: sata_dwc_460ex: missing newline in sata_dwc_error_intr() dev_err() --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Low] ata: sata_dwc_460ex: missing newline in sata_dwc_error_intr() dev_err()
--

commit ab933557af07fdf91678a715e8ab4e273eba8aa2
Author: Artem Novak <[email protected]>

ata: sata_dwc_460ex: add missing newlines to error messages

This commit adds missing trailing newlines to dev_err() messages in sata_dwc_460ex.c.

drivers/ata/sata_dwc_460ex.c static irqreturn_t sata_dwc_isr(int irq, void *dev_instance) · line 503

Quoted 13 lines
drivers/ata/sata_dwc_460ex.c +1 -1
index 4ab378d2c26f7..df711a802c53e 100644
@@ -497,7 +497,7 @@ static irqreturn_t sata_dwc_isr(int irq, void *dev_instance)
 
 		qc = ata_qc_from_tag(ap, tag);
 		if (unlikely(!qc)) {
-			dev_err(ap->dev, "failed to get qc");
+			dev_err(ap->dev, "failed to get qc\n");
 			handled = 1;
 			goto DONE;
 		}

[Severity: Low]
Should the dev_err() format string in sata_dwc_error_intr() also be terminated with a newline so that subsequent kernel log messages are not concatenated onto the same line?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
#5 lore raw

PATCH v4 4/4 ata: sata_gemini: add missing newlines to error messages

In reply to Artem Novak

Terminate the SATA clock lookup error messages with newlines to keep kernel log messages properly separated.

---
 drivers/ata/sata_gemini.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ata/sata_gemini.c +2 -2
index 9d87603ef531..b69db749b49d 100644
@@ -227,12 +227,12 @@ static int gemini_sata_bridge_init(struct sata_gemini *sg)
 
 	sg->sata0_pclk = devm_clk_get(dev, "SATA0_PCLK");
 	if (IS_ERR(sg->sata0_pclk)) {
-		dev_err(dev, "no SATA0 PCLK");
+		dev_err(dev, "no SATA0 PCLK\n");
 		return -ENODEV;
 	}
 	sg->sata1_pclk = devm_clk_get(dev, "SATA1_PCLK");
 	if (IS_ERR(sg->sata1_pclk)) {
-		dev_err(dev, "no SATA1 PCLK");
+		dev_err(dev, "no SATA1 PCLK\n");
 		return -ENODEV;
 	}
 
Signature · 1 line
2.56.1
#7 lore raw

v5 cover ata: add missing newlines to error and warning messages

In reply to Artem Novak

This series adds missing trailing newlines to error and warning messages in four ATA drivers.

The changes are formatting-only and do not alter driver behaviour.

Changes in v5:
- Restore the sata_dwc_error_intr() newline that was accidentally dropped in v4. This change was already included in v2 and reviewed by Damien Le Moal.

Changes in v4:
- Rebase on libata for-next (3391ac405dca).
- Resolve the pata_pxa conflict while preserving the updated DMA timeout condition from the new base.

Changes in v3:
- Carry Damien's Reviewed-by tag on all four patches.

Changes in v2:
- Fix an additional missing newline in sata_dwc_error_intr(), as pointed out by Damien Le Moal.
- Add Damien's Reviewed-by tag to the sata_dwc_460ex patch.

Artem Novak (4):
ata: pata_arasan_cf: add missing newline to warning
ata: pata_pxa: add missing newline to DMA warning
ata: sata_dwc_460ex: add missing newlines to error messages
ata: sata_gemini: add missing newlines to error messages

 drivers/ata/pata_arasan_cf.c |  2 +-
 drivers/ata/pata_pxa.c       |  2 +-
 drivers/ata/sata_dwc_460ex.c | 10 +++++-----
 drivers/ata/sata_gemini.c    |  4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.56.1
#8 lore raw

PATCH v5 1/4 ata: pata_arasan_cf: add missing newline to warning

Terminate the clock-rate failure warning with a newline so that subsequent kernel messages are properly separated.

---
 drivers/ata/pata_arasan_cf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/pata_arasan_cf.c +1 -1
index 5e02d227ddda..61977f0ed84c 100644
@@ -318,7 +318,7 @@ static int cf_init(struct arasan_cf_dev *acdev)
 
 	ret = clk_set_rate(acdev->clk, 166000000);
 	if (ret) {
-		dev_warn(acdev->host->dev, "clock set rate failed");
+		dev_warn(acdev->host->dev, "clock set rate failed\n");
 		clk_disable_unprepare(acdev->clk);
 		return ret;
 	}
Signature · 1 line
2.56.1
#9 lore raw

PATCH v5 2/4 ata: pata_pxa: add missing newline to DMA warning

In reply to Artem Novak

Terminate the DMA completion timeout warning with a newline to keep kernel log messages properly separated.

---
 drivers/ata/pata_pxa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/pata_pxa.c +1 -1
index 2312c42def22..2e73726410b9 100644
@@ -96,7 +96,7 @@ static void pxa_bmdma_stop(struct ata_queued_cmd *qc)
 	status = dmaengine_tx_status(pd->dma_chan, pd->dma_cookie, NULL);
 	if (status != DMA_ERROR && status != DMA_COMPLETE &&
 	    !wait_for_completion_timeout(&pd->dma_done, HZ))
-		ata_dev_err(qc->dev, "Timeout waiting for DMA completion!");
+		ata_dev_err(qc->dev, "Timeout waiting for DMA completion!\n");
 
 	dmaengine_terminate_all(pd->dma_chan);
 }
Signature · 1 line
2.56.1
#10 lore raw

PATCH v5 3/4 ata: sata_dwc_460ex: add missing newlines to error messages

In reply to Artem Novak

Terminate the error messages with newlines so that subsequent kernel log messages are properly separated.

---
 drivers/ata/sata_dwc_460ex.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/ata/sata_dwc_460ex.c +5 -5
index 4ab378d2c26f..c05dd172f75d 100644
@@ -420,7 +420,7 @@ static void sata_dwc_error_intr(struct ata_port *ap,
 	tag = ap->link.active_tag;
 
 	dev_err(ap->dev,
-		"%s SCR_ERROR=0x%08x intpr=0x%08x status=0x%08x dma_intp=%d pending=%d issued=%d",
+		"%s SCR_ERROR=0x%08x intpr=0x%08x status=0x%08x dma_intp=%d pending=%d issued=%d\n",
 		__func__, serror, intpr, status, hsdevp->dma_interrupt_count,
 		hsdevp->dma_pending[tag], hsdevp->cmd_issued[tag]);
 
@@ -497,7 +497,7 @@ static irqreturn_t sata_dwc_isr(int irq, void *dev_instance)
 
 		qc = ata_qc_from_tag(ap, tag);
 		if (unlikely(!qc)) {
-			dev_err(ap->dev, "failed to get qc");
+			dev_err(ap->dev, "failed to get qc\n");
 			handled = 1;
 			goto DONE;
 		}
@@ -611,7 +611,7 @@ static irqreturn_t sata_dwc_isr(int irq, void *dev_instance)
 		tag_mask &= ~(1U << tag);
 		qc = ata_qc_from_tag(ap, tag);
 		if (unlikely(!qc)) {
-			dev_err(ap->dev, "failed to get qc");
+			dev_err(ap->dev, "failed to get qc\n");
 			handled = 1;
 			goto DONE;
 		}
@@ -706,7 +706,7 @@ static void sata_dwc_dma_xfer_complete(struct ata_port *ap)
 	tag = ap->link.active_tag;
 	qc = ata_qc_from_tag(ap, tag);
 	if (!qc) {
-		dev_err(ap->dev, "failed to get qc");
+		dev_err(ap->dev, "failed to get qc\n");
 		return;
 	}
 
@@ -1187,7 +1187,7 @@ static int sata_dwc_probe(struct platform_device *ofdev)
 	 */
 	err = ata_host_activate(host, irq, sata_dwc_isr, 0, &sata_dwc_sht);
 	if (err) {
-		dev_err(dev, "failed to activate host");
+		dev_err(dev, "failed to activate host\n");
 		goto error_out;
 	}
 
Signature · 1 line
2.56.1
#11 lore raw

PATCH v5 4/4 ata: sata_gemini: add missing newlines to error messages

In reply to Artem Novak

Terminate the SATA clock lookup error messages with newlines to keep kernel log messages properly separated.

---
 drivers/ata/sata_gemini.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ata/sata_gemini.c +2 -2
index 9d87603ef531..b69db749b49d 100644
@@ -227,12 +227,12 @@ static int gemini_sata_bridge_init(struct sata_gemini *sg)
 
 	sg->sata0_pclk = devm_clk_get(dev, "SATA0_PCLK");
 	if (IS_ERR(sg->sata0_pclk)) {
-		dev_err(dev, "no SATA0 PCLK");
+		dev_err(dev, "no SATA0 PCLK\n");
 		return -ENODEV;
 	}
 	sg->sata1_pclk = devm_clk_get(dev, "SATA1_PCLK");
 	if (IS_ERR(sg->sata1_pclk)) {
-		dev_err(dev, "no SATA1 PCLK");
+		dev_err(dev, "no SATA1 PCLK\n");
 		return -ENODEV;
 	}
 
Signature · 1 line
2.56.1
maintainer Applied
#12 lore raw

Re: [PATCH v5 0/4] ata: add missing newlines to error and warning messages

In reply to Artem Novak
Quoted 11 lines · Artem Novak

This series adds missing trailing newlines to error and warning messages in four ATA drivers.

The changes are formatting-only and do not alter driver behaviour.

Changes in v5:
- Restore the sata_dwc_error_intr() newline that was accidentally dropped in v4. This change was already included in v2 and reviewed by Damien Le Moal.

[...]

Applied to libata/linux.git (for-7.5), thanks!

[1/4] ata: pata_arasan_cf: add missing newline to warning

      https://git.kernel.org/libata/linux/c/05b02318
[2/4] ata: pata_pxa: add missing newline to DMA warning
      https://git.kernel.org/libata/linux/c/83b0d498
[3/4] ata: sata_dwc_460ex: add missing newlines to error messages
      https://git.kernel.org/libata/linux/c/1d28e4f9
[4/4] ata: sata_gemini: add missing newlines to error messages
      https://git.kernel.org/libata/linux/c/d8f7cc53

Kind regards,
Niklas