mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Thorsten Blum <thorsten.blum@linux.dev>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] scsi: sd: Use str_on_off() helper in sd_read_write_protect_flag()
Date: Thu, 13 Mar 2025 09:25:56 -0700	[thread overview]
Message-ID: <3c32eb12-6879-48cf-9ef6-bd04e759025f@acm.org> (raw)
In-Reply-To: <20250313142557.36936-2-thorsten.blum@linux.dev>

On 3/13/25 7:25 AM, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_on_off() helper function.

Shouldn't a patch description explain two things: what has been changed
and also why a change has been made? I don't see an explanation of why
this change has been made.

> @@ -3004,7 +3005,7 @@ sd_read_write_protect_flag(struct scsi_disk *sdkp, unsigned char *buffer)
>   		set_disk_ro(sdkp->disk, sdkp->write_prot);
>   		if (sdkp->first_scan || old_wp != sdkp->write_prot) {
>   			sd_printk(KERN_NOTICE, sdkp, "Write Protect is %s\n",
> -				  sdkp->write_prot ? "on" : "off");
> +				  str_on_off(sdkp->write_prot));
>   			sd_printk(KERN_DEBUG, sdkp, "Mode Sense: %4ph\n", buffer);
>   		}
>   	}

I prefer the current code (without this patch). Others may have another
opinion.

Thanks,

Bart.

  reply	other threads:[~2025-03-13 16:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13 14:25 Thorsten Blum
2025-03-13 16:25 ` Bart Van Assche [this message]
2025-03-13 17:05   ` Thorsten Blum
2025-03-13 17:51     ` Bart Van Assche

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=3c32eb12-6879-48cf-9ef6-bd04e759025f@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=thorsten.blum@linux.dev \
    /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

all inboxes | Powered by JetHome®