From: Jan Kara <jack@suse.cz>
To: Dmitry Monakhov <rjevskiy@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>, Jan Kara <jack@suse.cz>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: linux-next: ext3 tree build warning
Date: Tue, 15 Dec 2009 13:35:31 +0100 [thread overview]
Message-ID: <20091215123530.GB5405@quack.suse.cz> (raw)
In-Reply-To: <c18d6aa20912150158m1b77c17ey2dcfacb3aa86d67a@mail.gmail.com>
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
next prev parent reply other threads:[~2009-12-15 12:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-14 23:59 Stephen Rothwell
2009-12-15 9:58 ` Dmitry Monakhov
2009-12-15 12:35 ` Jan Kara [this message]
2009-12-15 12:24 ` Jan Kara
2009-12-15 12:58 ` Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091215123530.GB5405@quack.suse.cz \
--to=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rjevskiy@gmail.com \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®