Re: [RFC PATCH 2/8] mm/madvise: remove unnecessary check on madvise_dontneed_free()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Sep 27, 2021, at 5:19 AM, Kirill A. Shutemov <kirill@xxxxxxxxxxxxx> wrote:
> 
> On Mon, Sep 27, 2021 at 04:05:47AM -0700, Nadav Amit wrote:
>> Having said that, if you want, I can turn this condition into
>> WARN_ON_ONCE() or VM_BUG_ON(), although I really see no reason to
>> do so.
> 
> BUILD_BUG() should be fine here.

It does not work. At least my gcc is not smart enough to figure it
out in build time.

I can put instead:

	BUILD_BUG_ON(__builtin_constant_p(behavior));

for potentially smarter compilers (clang?), but I doubt it would work.







[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux