From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [PATCH 4/5] Squashfs: move squashfs_i() definition from squashfs.h Date: Thu, 6 Jan 2011 23:05:31 +0100 Message-ID: References: <4D26364E.8030909@lougher.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Linux Kernel Development , linux-fsdevel@vger.kernel.org To: Phillip Lougher Return-path: In-Reply-To: <4D26364E.8030909@lougher.demon.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Jan 6, 2011 at 22:38, Phillip Lougher wrote: > > Move squashfs_i() definition out of squashfs.h, this eliminates > the need to #include squashfs_sb_i.h from numerous files. ^^^^^^^^^^^^^^^ squashfs_fs_i.h? > Signed-off-by: Phillip Lougher > --- > =C2=A0fs/squashfs/block.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A0= 1 - > =C2=A0fs/squashfs/cache.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A0= 1 - > =C2=A0fs/squashfs/decompressor.c =C2=A0| =C2=A0 =C2=A01 - > =C2=A0fs/squashfs/fragment.c =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A01 - > =C2=A0fs/squashfs/id.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2= =A0 =C2=A01 - > =C2=A0fs/squashfs/lzo_wrapper.c =C2=A0 | =C2=A0 =C2=A01 - > =C2=A0fs/squashfs/squashfs.h =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A05 ---= -- > =C2=A0fs/squashfs/squashfs_fs_i.h | =C2=A0 =C2=A06 ++++++ > =C2=A0fs/squashfs/xattr_id.c =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A01 - > =C2=A0fs/squashfs/zlib_wrapper.c =C2=A0| =C2=A0 =C2=A01 - > =C2=A010 files changed, 6 insertions(+), 13 deletions(-) > > diff --git a/fs/squashfs/block.c b/fs/squashfs/block.c > index 653c030..2fb2882 100644 > --- a/fs/squashfs/block.c > +++ b/fs/squashfs/block.c > @@ -34,7 +34,6 @@ > > =C2=A0#include "squashfs_fs.h" > =C2=A0#include "squashfs_fs_sb.h" > -#include "squashfs_fs_i.h" > =C2=A0#include "squashfs.h" > =C2=A0#include "decompressor.h" > > diff --git a/fs/squashfs/cache.c b/fs/squashfs/cache.c > index 57314be..26b15ae 100644 > --- a/fs/squashfs/cache.c > +++ b/fs/squashfs/cache.c > @@ -55,7 +55,6 @@ > > =C2=A0#include "squashfs_fs.h" > =C2=A0#include "squashfs_fs_sb.h" > -#include "squashfs_fs_i.h" > =C2=A0#include "squashfs.h" > > =C2=A0/* > diff --git a/fs/squashfs/decompressor.c b/fs/squashfs/decompressor.c > index 24af9ce..d83e184 100644 > --- a/fs/squashfs/decompressor.c > +++ b/fs/squashfs/decompressor.c > @@ -27,7 +27,6 @@ > > =C2=A0#include "squashfs_fs.h" > =C2=A0#include "squashfs_fs_sb.h" > -#include "squashfs_fs_i.h" > =C2=A0#include "decompressor.h" > =C2=A0#include "squashfs.h" > > diff --git a/fs/squashfs/fragment.c b/fs/squashfs/fragment.c > index 7c90bbd..7eef571 100644 > --- a/fs/squashfs/fragment.c > +++ b/fs/squashfs/fragment.c > @@ -39,7 +39,6 @@ > > =C2=A0#include "squashfs_fs.h" > =C2=A0#include "squashfs_fs_sb.h" > -#include "squashfs_fs_i.h" > =C2=A0#include "squashfs.h" > > =C2=A0/* > diff --git a/fs/squashfs/id.c b/fs/squashfs/id.c > index b7f64bc..d8f3245 100644 > --- a/fs/squashfs/id.c > +++ b/fs/squashfs/id.c > @@ -37,7 +37,6 @@ > > =C2=A0#include "squashfs_fs.h" > =C2=A0#include "squashfs_fs_sb.h" > -#include "squashfs_fs_i.h" > =C2=A0#include "squashfs.h" > > =C2=A0/* > diff --git a/fs/squashfs/lzo_wrapper.c b/fs/squashfs/lzo_wrapper.c > index 5d87789..7da759e 100644 > --- a/fs/squashfs/lzo_wrapper.c > +++ b/fs/squashfs/lzo_wrapper.c > @@ -29,7 +29,6 @@ > > =C2=A0#include "squashfs_fs.h" > =C2=A0#include "squashfs_fs_sb.h" > -#include "squashfs_fs_i.h" > =C2=A0#include "squashfs.h" > =C2=A0#include "decompressor.h" > > diff --git a/fs/squashfs/squashfs.h b/fs/squashfs/squashfs.h > index 5d45569..18f187f 100644 > --- a/fs/squashfs/squashfs.h > +++ b/fs/squashfs/squashfs.h > @@ -27,11 +27,6 @@ > > =C2=A0#define WARNING(s, args...) =C2=A0 =C2=A0pr_warning("SQUASHFS: = "s, ## args) > > -static inline struct squashfs_inode_info *squashfs_i(struct inode *i= node) > -{ > - =C2=A0 =C2=A0 =C2=A0 return list_entry(inode, struct squashfs_inode= _info, vfs_inode); > -} > - > =C2=A0/* block.c */ > =C2=A0extern int squashfs_read_data(struct super_block *, void **, u6= 4, int, u64 > *, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0int, int); > diff --git a/fs/squashfs/squashfs_fs_i.h b/fs/squashfs/squashfs_fs_i.= h > index d3e3a37..359baef 100644 > --- a/fs/squashfs/squashfs_fs_i.h > +++ b/fs/squashfs/squashfs_fs_i.h > @@ -45,4 +45,10 @@ struct squashfs_inode_info { > =C2=A0 =C2=A0 =C2=A0 =C2=A0}; > =C2=A0 =C2=A0 =C2=A0 =C2=A0struct inode =C2=A0 =C2=A0vfs_inode; > =C2=A0}; > + > + > +static inline struct squashfs_inode_info *squashfs_i(struct inode *i= node) > +{ > + =C2=A0 =C2=A0 =C2=A0 return list_entry(inode, struct squashfs_inode= _info, vfs_inode); > +} > =C2=A0#endif > diff --git a/fs/squashfs/xattr_id.c b/fs/squashfs/xattr_id.c > index d33be5d..05385db 100644 > --- a/fs/squashfs/xattr_id.c > +++ b/fs/squashfs/xattr_id.c > @@ -32,7 +32,6 @@ > > =C2=A0#include "squashfs_fs.h" > =C2=A0#include "squashfs_fs_sb.h" > -#include "squashfs_fs_i.h" > =C2=A0#include "squashfs.h" > =C2=A0#include "xattr.h" > > diff --git a/fs/squashfs/zlib_wrapper.c b/fs/squashfs/zlib_wrapper.c > index ab5801f..818a5e0 100644 > --- a/fs/squashfs/zlib_wrapper.c > +++ b/fs/squashfs/zlib_wrapper.c > @@ -29,7 +29,6 @@ > > =C2=A0#include "squashfs_fs.h" > =C2=A0#include "squashfs_fs_sb.h" > -#include "squashfs_fs_i.h" > =C2=A0#include "squashfs.h" > =C2=A0#include "decompressor.h" Gr{oetje,eeting}s, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-= m68k.org In personal conversations with technical people, I call myself a hacker= =2E But when I'm talking to journalists I just say "programmer" or something li= ke that. =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0=C2=A0 -- Linus Torvalds