Re: Remove warning in compilation of ioremap

Russell King - ARM Linux
2008-09-09T09:58:44Z

On Tue, Sep 09, 2008 at 11:13:12AM +0200, Claudio Scordino wrote:
> When compiling Linux (latest kernel from Linus' git) on ARM, I noticed
> the following warning:
>
> CC arch/arm/mm/ioremap.o
> arch/arm/mm/ioremap.c: In function '__arm_ioremap_pfn':
> arch/arm/mm/ioremap.c:83: warning: control may reach end of non-void
> function 'remap_area_pte' being inlined
>
> If you look at the code, the problem is in a path including a BUG().
>
> AFAIK, on ARM the code following BUG() is never executed: it's a NULL
> pointer dereference, so the handler of pagefault eventually calls
> do_exit(). Therefore, we may want to remove the goto as shown in the
> patch in attachment.
>
> It's obviously a minor issue. But I don't like having meaningless
> warnings during compilation: they just confuse output, and developers
> may miss some important warning message...
>
> The need for the goto exists only if BUG() can return. If it doesn't,
> we can safely remove it as shown in the patch.

NAK. See patch 5211/2 in the patch system.