Re: [PATCH 1/2] ata: libata-eh: fix sloppy result type of ata_eh_nr_in_flight()

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

 



On 6/16/22 11:51 PM, Sergey Shtylyov wrote:

> ata_eh_nr_in_flight() counts the # of the active tagged commands and thus
> cannot return a negative value but the result type is nevertheless *int*;
> switching it to *unsigned int* (along with the local variables receiving
> the function's result) helps avoiding the sign extension instructions when
> comparing with or assigning to *unsigned long *ata_port::fastdrain_cnt and

   Grr, a typo! Should have been *unsigned long* ata_port::fastdrain_cnt...
Damien, coyld you please fix it?

> thus results in a more compact 64-bit code...
> 
> Found by Linux Verification Center (linuxtesting.org) with the SVACE static
> analysis tool.
> 
> Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>
[...]

MBR, Sergey



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux