[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y6Lwgot7idEv5OTx@pc636>
Date: Wed, 21 Dec 2022 12:39:46 +0100
From: Uladzislau Rezki <urezki@...il.com>
To: Lorenzo Stoakes <lstoakes@...il.com>
Cc: "Uladzislau Rezki (Sony)" <urezki@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
LKML <linux-kernel@...r.kernel.org>, Baoquan He <bhe@...hat.com>,
Christoph Hellwig <hch@...radead.org>,
Matthew Wilcox <willy@...radead.org>,
Nicholas Piggin <npiggin@...il.com>,
Oleksiy Avramchenko <oleksiy.avramchenko@...y.com>
Subject: Re: [PATCH 2/2] mm: vmalloc: Replace BUG_ON() by WARN_ON_ONCE()
On Tue, Dec 20, 2022 at 06:56:38PM +0000, Lorenzo Stoakes wrote:
> On Tue, Dec 20, 2022 at 06:53:18PM +0000, Lorenzo Stoakes wrote:
> [snip
> > Absolutely in favour of this in principle (BUG_ON() is something we should
> > resort to in only the direst of circumstances), one small nit - perhaps it'd be
> > neater to simply make this a guard clause? E.g.:-
> >
> > if (!WARN_ON_ONCE(!va))
> > return;
> >
> > ...
>
> Made a mistake here, meant to say
>
> if (WARN_ON_ONCE(!va))
> return;
>
Agree. This looks better. Less confusing :)
I will post a v2.
--
Uladzislau Rezki
Powered by blists - more mailing lists