lkml.org 
[lkml]   [2014]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] zram: include linux/err.h
Hello Arnd,

On (03/15/14 10:40), Arnd Bergmann wrote:
> The zram driver uses the ERR_PTR macro defined in <linux/err.h>
> and relies on this header to be included implicitly through
> other headers, which is not (always) the case on the ARM architecture.
>

returned from zcomp ERR_PTR is checked and used in zram_drv.c, should
in this case there also be inclusion of err.h in zram_drv.h? if so, it
probably makes sense to move inclusion of err.h to zcomp.h, which is
included both in zcomp.c and zram_drv.c

> Adding an explicit #include allows us to build the driver in
> all configurations.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c
> index 92a83df..3507bef 100644
> --- a/drivers/block/zram/zcomp.c
> +++ b/drivers/block/zram/zcomp.c
> @@ -7,6 +7,7 @@
> * 2 of the License, or (at your option) any later version.
> */
>
> +#include <linux/err.h>
> #include <linux/kernel.h>
> #include <linux/string.h>
> #include <linux/slab.h>
>


\
 
 \ /
  Last update: 2014-03-15 15:41    [W:0.147 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site