[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+tQmHC73zSUfm1yRypjxXxpbZAoP8Bam0C__hF9Kts1XFh7GA@mail.gmail.com>
Date: Mon, 31 Oct 2022 13:55:20 +0800
From: chi wu <wuchi.zero@...il.com>
To: Waiman Long <longman@...hat.com>
Cc: peterz@...radead.org, mingo@...hat.com, will@...nel.org,
boqun.feng@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] locking/lockdep: Remove unused variable in __lockdep_count*()
Waiman Long <longman@...hat.com> 于2022年10月30日周日 23:21写道:
>
> There is no target_entry NULL check in __bfs(), so target_entry is
> always expected to point to a valid memory location. You will need to
> add the NULL check if you want to remove it from these two functions.
>
Yes, add code in __bfs() as follow?
if (match(lock, data)) {
if (target_entry)
*target_entry = lock;
return BFS_RMATCH;
}
> BTW, have you actually exercised the code to make sure that there was no
> unexpected side effect from this change?
Yes, the code "check_irq_usage -> __bfs_backwards" is an example and the
primary callers lockdep_stats_show and l_show in lockdep_proc.c work well.
But I'm not sure I missed anything.
>
> Cheers,
> Longman
>
Thank you for reply
Powered by blists - more mailing lists