public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: ext3 tree build warning
@ 2009-12-14 23:59 Stephen Rothwell
  2009-12-15  9:58 ` Dmitry Monakhov
  2009-12-15 12:24 ` Jan Kara
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Rothwell @ 2009-12-14 23:59 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-next, linux-kernel, Dmitry Monakhov

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

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*'

Introduced by commit e91077e3d523c2ac2090b3447bf6244567cf7128 ("quota:
Move duplicated code to separate functions").

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: ext3 tree build warning
  2009-12-14 23:59 linux-next: ext3 tree build warning Stephen Rothwell
@ 2009-12-15  9:58 ` Dmitry Monakhov
  2009-12-15 12:35   ` Jan Kara
  2009-12-15 12:24 ` Jan Kara
  1 sibling, 1 reply; 5+ messages in thread
From: Dmitry Monakhov @ 2009-12-15  9:58 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Jan Kara, linux-next, linux-kernel

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
Even if inode is not in a good state, quta code may and must(what's
how it designed for now) change it internals.
>
> Introduced by commit e91077e3d523c2ac2090b3447bf6244567cf7128 ("quota:
> Move duplicated code to separate functions").
>
> --
> Cheers,
> Stephen Rothwell                    sfr@canb•auug.org.au
> http://www.canb.auug.org.au/~sfr/
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: ext3 tree build warning
  2009-12-14 23:59 linux-next: ext3 tree build warning Stephen Rothwell
  2009-12-15  9:58 ` Dmitry Monakhov
@ 2009-12-15 12:24 ` Jan Kara
  2009-12-15 12:58   ` Stephen Rothwell
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Kara @ 2009-12-15 12:24 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Jan Kara, linux-next, linux-kernel, Dmitry Monakhov

  Hi Stephen,

On Tue 15-12-09 10:59:25, Stephen Rothwell wrote:
> 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*'
> 
> Introduced by commit e91077e3d523c2ac2090b3447bf6244567cf7128 ("quota:
> Move duplicated code to separate functions").
  Sorry, I forgot to commit this compilation fix before pushing. It should
be fixed now.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: ext3 tree build warning
  2009-12-15  9:58 ` Dmitry Monakhov
@ 2009-12-15 12:35   ` Jan Kara
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Kara @ 2009-12-15 12:35 UTC (permalink / raw)
  To: Dmitry Monakhov; +Cc: Stephen Rothwell, Jan Kara, linux-next, linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: ext3 tree build warning
  2009-12-15 12:24 ` Jan Kara
@ 2009-12-15 12:58   ` Stephen Rothwell
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2009-12-15 12:58 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-next, linux-kernel, Dmitry Monakhov

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

Hi Jan,

On Tue, 15 Dec 2009 13:24:16 +0100 Jan Kara <jack@suse•cz> wrote:
>
>   Sorry, I forgot to commit this compilation fix before pushing. It should
> be fixed now.

Thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-15 12:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-14 23:59 linux-next: ext3 tree build warning Stephen Rothwell
2009-12-15  9:58 ` Dmitry Monakhov
2009-12-15 12:35   ` Jan Kara
2009-12-15 12:24 ` Jan Kara
2009-12-15 12:58   ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox