[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110913135107.295aecfe.akpm@google.com>
Date: Tue, 13 Sep 2011 13:51:07 -0700
From: Andrew Morton <akpm@...gle.com>
To: Seth Jennings <sjenning@...ux.vnet.ibm.com>
Cc: Dan Magenheimer <dan.magenheimer@...cle.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org, jeremy@...p.org,
hughd@...gle.com, ngupta@...are.org, konrad.wilk@...cle.com,
JBeulich@...ell.com, kurt.hackel@...cle.com, npiggin@...nel.dk,
riel@...hat.com, hannes@...xchg.org, matthew@....cx,
chris.mason@...cle.com, kamezawa.hiroyu@...fujitsu.com,
jackdachef@...il.com, cyclonusj@...il.com, levinsasha928@...il.com
Subject: Re: [PATCH V9 3/6] mm: frontswap: core frontswap functionality
On Tue, 13 Sep 2011 15:40:36 -0500
Seth Jennings <sjenning@...ux.vnet.ibm.com> wrote:
> Hey Dan,
>
> I get the following compile warnings:
>
> mm/frontswap.c: In function ‘init_frontswap’:
> mm/frontswap.c:264:5: warning: passing argument 4 of ‘debugfs_create_size_t’ from incompatible pointer type
> include/linux/debugfs.h:68:16: note: expected ‘size_t *’ but argument is of type ‘long unsigned int *’
> mm/frontswap.c:266:5: warning: passing argument 4 of ‘debugfs_create_size_t’ from incompatible pointer type
> include/linux/debugfs.h:68:16: note: expected ‘size_t *’ but argument is of type ‘long unsigned int *’
> mm/frontswap.c:268:5: warning: passing argument 4 of ‘debugfs_create_size_t’ from incompatible pointer type
> include/linux/debugfs.h:68:16: note: expected ‘size_t *’ but argument is of type ‘long unsigned int *’
> mm/frontswap.c:270:5: warning: passing argument 4 of ‘debugfs_create_size_t’ from incompatible pointer type
> include/linux/debugfs.h:68:16: note: expected ‘size_t *’ but argument is of type ‘long unsigned int *’
>
> size_t is platform dependent but is generally "unsigned int"
> for 32-bit and "unsigned long" for 64-bit.
>
> I think just typecasting these to size_t * would fix it.
That's very risky.
> On 09/13/2011 12:40 PM, Dan Magenheimer wrote:
> > +#ifdef CONFIG_DEBUG_FS
> > + struct dentry *root = debugfs_create_dir("frontswap", NULL);
> > + if (root == NULL)
> > + return -ENXIO;
> > + debugfs_create_size_t("gets", S_IRUGO,
> > + root, &frontswap_gets);
> > + debugfs_create_size_t("succ_puts", S_IRUGO,
> > + root, &frontswap_succ_puts);
> > + debugfs_create_size_t("puts", S_IRUGO,
> > + root, &frontswap_failed_puts);
> > + debugfs_create_size_t("invalidates", S_IRUGO,
> > + root, &frontswap_invalidates);
> > +#endif
Make them u32 and use debugfs_create_x32(), perhaps. Or create
debugfs_create_ulong().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists