Re: [PATCH v1 1/5] memremap: Check for size parameter

From: Christoph Hellwig
Date: Sat Nov 16 2019 - 11:29:43 EST


On Fri, Nov 15, 2019 at 08:00:40PM +0200, Andy Shevchenko wrote:
> There is no use of memremap() to be called with size = 0.
> Simple return NULL pointer and allow callers to drop this check.

Given that this really is an error condition, maybe a WARN_ON_ONCE
would fit here?