[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3c32eb12-6879-48cf-9ef6-bd04e759025f@acm.org>
Date: Thu, 13 Mar 2025 09:25:56 -0700
From: Bart Van Assche <bvanassche@....org>
To: Thorsten Blum <thorsten.blum@...ux.dev>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH] scsi: sd: Use str_on_off() helper in
sd_read_write_protect_flag()
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.
Powered by blists - more mailing lists