lkml.org 
[lkml]   [2014]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] zram: include linux/err.h
Date
On Saturday 15 March 2014, Sergey Senozhatsky wrote:
> 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
>

The normal convention is to only include headers from other headers if
that is required by the contents of the header itself.

Following the common conventions, it's better to include linux/err.h
in both zram_drv.c and zcomp.c, but not in zram_drv.h.
I didn't do that in my patch, because I only got a build error in
one of the two files.

Arnd


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