lkml.org 
[lkml]   [2009]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: ext3 tree build warning
On Tue 15-12-09 12:58:36, Dmitry Monakhov wrote:
> 2009/12/15 Stephen Rothwell <sfr@canb.auug.org.au>:
> > Hi Jan,
> >
> > Today's linux-next build (x86_64 allmodconfig) produced this warning:
> >
> > fs/quota/dquot.c: In function 'dquot_alloc_inode':
> > fs/quota/dquot.c:1521: warning: passing argument 1 of 'mark_all_dquot_dirty' discards qualifiers from pointer target type
> > fs/quota/dquot.c:327: note: expected 'struct dquot **' but argument is of type 'struct dquot * const*'
> > fs/quota/dquot.c: In function 'dquot_free_inode':
> > fs/quota/dquot.c:1649: warning: passing argument 1 of 'mark_all_dquot_dirty' discards qualifiers from pointer target type
> > fs/quota/dquot.c:327: note: expected 'struct dquot **' but argument is of type 'struct dquot * const*'
> What's why my original patch contained type casts.
> In fact i dont understand why {alloc,free}_inode accept pointer to
> const struct inode, it's contradicts to normal logic
Does it? The 'const' keyword just promises we won't change struct inode.
And that is true. We only change structures that are pointed to from the
inode. So the code is correct as is.

Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR


\
 
 \ /
  Last update: 2009-12-15 13:37    [W:0.050 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site