Re: [PATCH v3 5/6] arch: introduce memremap_cache() and memremap_wt()

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

 



On Mon, Jun 8, 2015 at 12:04 PM, Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
> On Mon, Jun 8, 2015 at 9:25 PM, Dan Williams <dan.j.williams@xxxxxxxxx> wrote:
>
>>>> +       if (region_is_ram(offset, size) != 0) {
>>>> +               WARN_ONCE(1, "memremap attempted on ram %pa size: %zd\n",
>>>
>>> %zu
>>
>> Sure, thanks for taking a look Andy!
>
> One more thing, can we do
> WARN_ONCE(region_is_ram(offset, size), …); ?
>

We still want to return false in this case so it would become
"if(WARN_ONCE(...)) return false;".  Neil once made the argument to me
that we should be able to compile all of the asserts out of the
kernel, also "if (WARN_ONCE(...))" is a bit harder to read as you need
to go check the macro to make sure it returns the right status, and
more than once.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href




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