From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Sergey Shtylyov <s.shtylyov@omp.ru>, linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/2] ata: libata-eh: fix sloppy result type of ata_eh_nr_in_flight()
Date: Mon, 20 Jun 2022 08:15:32 +0900 [thread overview]
Message-ID: <82798f42-1a11-db2a-c5c6-3fec6c0a627f@opensource.wdc.com> (raw)
In-Reply-To: <2c352e63-e946-a1bc-77c4-4579e6f01854@omp.ru>
On 6/18/22 03:16, Sergey Shtylyov wrote:
> 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?
OK. Note: please stop using markdown stuff like *xxx*. That is not useful
and that will avoid this kind of typos.
>
>> 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@omp.ru>
> [...]
>
> MBR, Sergey
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2022-06-19 23:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 20:51 [PATCH 0/2] Fix sloppy typing in the fast drain logic Sergey Shtylyov
2022-06-16 20:51 ` [PATCH 1/2] ata: libata-eh: fix sloppy result type of ata_eh_nr_in_flight() Sergey Shtylyov
2022-06-17 18:16 ` Sergey Shtylyov
2022-06-19 23:15 ` Damien Le Moal [this message]
2022-06-16 20:51 ` [PATCH 2/2] ata: make ata_port::fastdrain_cnt *unsigned int* Sergey Shtylyov
2022-06-17 7:48 ` [PATCH 0/2] Fix sloppy typing in the fast drain logic Damien Le Moal
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=82798f42-1a11-db2a-c5c6-3fec6c0a627f@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=linux-ide@vger.kernel.org \
--cc=s.shtylyov@omp.ru \
/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