public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@linux.dev>
To: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Thorsten Blum <thorsten.blum@linux.dev>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RESEND PATCH] scsi: aha1740: Use str_enabled_disabled() helper
Date: Sun,  9 Feb 2025 09:19:28 +0100	[thread overview]
Message-ID: <20250209081928.3096-2-thorsten.blum@linux.dev> (raw)

Remove hard-coded strings by using the str_enabled_disabled() helper
function.

Use pr_info() instead of printk(KERN_INFO) to silence multiple
checkpatch warnings.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 drivers/scsi/aha1740.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c
index be7ebbbb9ba8..c21286eaa8a1 100644
--- a/drivers/scsi/aha1740.c
+++ b/drivers/scsi/aha1740.c
@@ -114,9 +114,9 @@ static int aha1740_show_info(struct seq_file *m, struct Scsi_Host *shpnt)
 {
 	struct aha1740_hostdata *host = HOSTDATA(shpnt);
 	seq_printf(m, "aha174x at IO:%lx, IRQ %d, SLOT %d.\n"
-		      "Extended translation %sabled.\n",
+		      "Extended translation %s.\n",
 		      shpnt->io_port, shpnt->irq, host->edev->slot,
-		      host->translation ? "en" : "dis");
+		      str_enabled_disabled(host->translation));
 	return 0;
 }
 
@@ -578,10 +578,10 @@ static int aha1740_probe (struct device *dev)
 		outb(G2CNTRL_HRST, G2CNTRL(slotbase));
 		outb(0, G2CNTRL(slotbase));
 	}
-	printk(KERN_INFO "Configuring slot %d at IO:%x, IRQ %u (%s)\n",
-	       edev->slot, slotbase, irq_level, irq_type ? "edge" : "level");
-	printk(KERN_INFO "aha174x: Extended translation %sabled.\n",
-	       translation ? "en" : "dis");
+	pr_info("Configuring slot %d at IO:%x, IRQ %u (%s)\n",
+		edev->slot, slotbase, irq_level, irq_type ? "edge" : "level");
+	pr_info("aha174x: Extended translation %s.\n",
+		str_enabled_disabled(translation));
 	shpnt = scsi_host_alloc(&aha1740_template,
 			      sizeof(struct aha1740_hostdata));
 	if(shpnt == NULL)
-- 
2.48.1


             reply	other threads:[~2025-02-09  8:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-09  8:19 Thorsten Blum [this message]
2025-02-13  3:31 ` [RESEND PATCH] scsi: aha1740: Use str_enabled_disabled() helper Martin K. Petersen

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=20250209081928.3096-2-thorsten.blum@linux.dev \
    --to=thorsten.blum@linux.dev \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox