Re: [PATCH] zsmalloc: avoid unused-function warning

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

 



On (23/01/17 18:04), Arnd Bergmann wrote:
> obj_allocated() can be called from two places that are each
> inside of an #ifdef. When both are disabled, the compiler warns:
> 
> mm/zsmalloc.c:900:13: error: 'obj_allocated' defined but not used [-Werror=unused-function]
> 
> Rather than trying to figure out the correct #ifdef, mark the
> trivial function as 'inline', which implies __maybe_unused and
> shuts up the warning.
> 
> Fixes: 796c71ac728e ("zsmalloc: fix a race with deferred_handles storing")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Reviewed-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>




[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