Re: [PATCH] mm/mmap: replace if (cond) BUG() with BUG_ON()

From: Hugh Dickins
Date: Wed Jan 06 2021 - 15:19:31 EST


On Wed, 6 Jan 2021, Andrea Arcangeli wrote:
>
> I'd be surprised if the kernel can boot with BUG_ON() defined as "do
> {}while(0)" so I guess it doesn't make any difference.

I had been afraid of that too, when CONFIG_BUG is not set:
but I think it's actually "if (cond) do {} while (0)".