From: Shuah Khan <skhan@linuxfoundation.org>
To: liuye <liuye@kylinos.cn>, shuah@kernel.org
Cc: zhujun2@cmss.chinamobile.com, iommu@lists.linux.dev,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests/dma: Fix bad array reference.
Date: Wed, 26 Feb 2025 14:41:26 -0700 [thread overview]
Message-ID: <0758d73d-98b7-4f9b-a3b2-001d69eb949d@linuxfoundation.org> (raw)
In-Reply-To: <3b51ae45-4dd4-4238-bf3f-3cb4d263eda4@kylinos.cn>
On 2/25/25 18:31, liuye wrote:
> Friendly ping.
>
> 在 2025/2/6 10:12, Liu Ye 写道:
>> dir[directions] should be directions[dir] to correctly index the
>> directions array.
>>
>> Signed-off-by: Liu Ye <liuye@kylinos.cn>
>> ---
>> tools/testing/selftests/dma/dma_map_benchmark.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/dma/dma_map_benchmark.c b/tools/testing/selftests/dma/dma_map_benchmark.c
>> index b12f1f9babf8..b925756373ce 100644
>> --- a/tools/testing/selftests/dma/dma_map_benchmark.c
>> +++ b/tools/testing/selftests/dma/dma_map_benchmark.c
>> @@ -118,7 +118,7 @@ int main(int argc, char **argv)
>> }
>>
>> printf("dma mapping benchmark: threads:%d seconds:%d node:%d dir:%s granule: %d\n",
>> - threads, seconds, node, dir[directions], granule);
>> + threads, seconds, node, directions[dir], granule);
>> printf("average map latency(us):%.1f standard deviation:%.1f\n",
>> map.avg_map_100ns/10.0, map.map_stddev/10.0);
>> printf("average unmap latency(us):%.1f standard deviation:%.1f\n",
How did you find this problem?
thanks,
-- Shuah
next prev parent reply other threads:[~2025-02-26 21:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 2:12 Liu Ye
2025-02-26 1:31 ` liuye
2025-02-26 21:41 ` Shuah Khan [this message]
2025-03-03 3:23 ` liuye
-- strict thread matches above, loose matches on Subject: below --
2025-02-06 2:08 Liu Ye
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=0758d73d-98b7-4f9b-a3b2-001d69eb949d@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=iommu@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuye@kylinos.cn \
--cc=shuah@kernel.org \
--cc=zhujun2@cmss.chinamobile.com \
/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
all inboxes | Powered by JetHome®