Re: [GIT PULL] Block driver updates for 5.18-rc1

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

 



On 3/21/22 6:13 PM, Linus Torvalds wrote:
> On Fri, Mar 18, 2022 at 2:59 PM Jens Axboe <axboe@xxxxxxxxx> wrote:
>>
>> This will throw a merge conflict in drivers/nvme/target/configfs.c,
>> resolution is just to delete the two discovery helpers and the configfs
>> attribute, basically everything in the conflict section. This is due to
>> conflicting with a last minute revert in 5.17.
> 
> Only because I looked at this conflict did I notice that some of the
> changes are kind of pointless..
> 
> I mean, this is well-meaning, but I'm really not convinced it's
> actually *useful*:
> 
>   -   return sprintf(page, "\n");
>   +   return snprintf(page, PAGE_SIZE, "\n");
> 
> It's not like a two-byte copy can ever overflow PAGE_SIZE.
> 
> Sometimes 'sprintf() -> snprintf()' conversions don't really buy you
> anything.

Yeah agree, that does seem kind of pointless as an isolated change. At
least maybe it helps cut down on copy/paste related issues, where
someone copies it and changes it to dump more into 'page'.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux