From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH] locking/lockdep: Remove unnecessary DEBUG_LOCKS_WARN_ON() Date: Wed, 5 Jun 2019 13:46:33 +0100 Message-ID: <20190605124633.GM15030@fuggles.cambridge.arm.com> References: <1559217575-30298-1-git-send-email-kobe-cp.wu@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1559217575-30298-1-git-send-email-kobe-cp.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+glpam-linux-mediatek=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Kobe Wu Cc: Peter Zijlstra , Eason Lin , Ingo Molnar , linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, wsd_upstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org List-Id: linux-mediatek@lists.infradead.org On Thu, May 30, 2019 at 07:59:35PM +0800, Kobe Wu wrote: > DEBUG_LOCKS_WARN_ON() will turn off debug_locks and > makes print_unlock_imbalance_bug() return directly. > > Remove a redundant whitespace. > > Signed-off-by: Kobe Wu > --- > kernel/locking/lockdep.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c > index d06190f..37c0a5e 100644 > --- a/kernel/locking/lockdep.c > +++ b/kernel/locking/lockdep.c > @@ -4049,8 +4049,8 @@ static int __lock_downgrade(struct lockdep_map *lock, unsigned long ip) > * So we're all set to release this lock.. wait what lock? We don't > * own any locks, you've been drinking again? > */ > - if (DEBUG_LOCKS_WARN_ON(depth <= 0)) > - return print_unlock_imbalance_bug(curr, lock, ip); > + if (depth <= 0) > + return print_unlock_imbalance_bug(curr, lock, ip); Hmm, feels more like we should keep the DEBUG_LOCKS_WARN_ON but just return 0 when it fires. Peter? Will