Re: [PATCH] scsi: mpi3mr: clean up mpi3mr_print_ioc_info()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 12, 2021 at 04:35:08PM -0400, Martin K. Petersen wrote:
> On Thu, 16 Sep 2021 16:26:05 +0300, Dan Carpenter wrote:
> 
> > This function is more complicated than necessary.
> > 
> > If we change from scnprintf() to snprintf() that let's us remove the
> > if bytes_wrote < sizeof(protocol) checks.  Also we can use
> > bytes_wrote ? "," : "" to print the comma and remove the separate
> > if statement and the "is_string_nonempty" variable.
> > 
> > [...]
> 
> Applied to 5.16/scsi-queue, thanks!
> 
> [1/1] scsi: mpi3mr: clean up mpi3mr_print_ioc_info()
>       https://git.kernel.org/mkp/scsi/c/76a4f7cc5973

Martin, I'm really sorry.  I'm looking at this now and I'm so confused
what I was thinking.  Why would we change from scnprintf to snprintf?

I clearly intended to do the reverse change and move from snprintf() to
scnprintf().  But then the patch doesn't actually do that.  What the
heck???

This has already been applied.  I've can't believe I've messed up so
badly twice in a week.  :/

The patch doesn't introduce any bugs that weren't there in the original
but it's still horribly wrong.  I will send a fix that actually changes
it to scnprintf().

regards,
dan carpenter




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux