From: Jan Kara <jack@suse.cz>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@lst.de>,
linux-kernel@vger.kernel.org
Subject: Re: suppress warning: ‘quotatypes’ defined but not used
Date: Thu, 22 Apr 2010 21:31:49 +0200 [thread overview]
Message-ID: <20100422193148.GG5805@quack.suse.cz> (raw)
In-Reply-To: <20100422080540.GA3286@swordfish.minsk.epam.com>
On Thu 22-04-10 11:05:40, Sergey Senozhatsky wrote:
> Hello,
> There is unused (in some cases) pointer in dquot.c
> fs/quota/dquot.c:135: warning: ‘quotatypes’ defined but not used
>
> which is referenced only when
> #ifdef CONFIG_QUOTA_DEBUG or #ifdef CONFIG_PRINT_QUOTA_WARNING
>
> My proposal is to wrap declaration in "if defined(CONFIG_QUOTA_DEBUG) || defined(CONFIG_PRINT_QUOTA_WARNING) ..."?
The patch is fine. Could you please add your Signed-off-by to the patch
(see Documentation/SubmittingPatches in case you don't know what it is).
Thanks.
Honza
>
>
> diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
> index 788b580..ab0a08a 100644
> --- a/fs/quota/dquot.c
> +++ b/fs/quota/dquot.c
> @@ -132,7 +132,10 @@ static __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_state_lock);
> __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_data_lock);
> EXPORT_SYMBOL(dq_data_lock);
>
> -static char *quotatypes[] = INITQFNAMES;
> +#if defined(CONFIG_QUOTA_DEBUG) || defined(CONFIG_PRINT_QUOTA_WARNING)
> + static char *quotatypes[] = INITQFNAMES;
> +#endif
> +
> static struct quota_format_type *quota_formats; /* List of registered formats */
> static struct quota_module_name module_names[] = INIT_QUOTA_MODULE_NAMES;
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2010-04-22 19:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 8:05 Sergey Senozhatsky
2010-04-22 19:31 ` Jan Kara [this message]
2010-04-23 10:51 ` Sergey Senozhatsky
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=20100422193148.GG5805@quack.suse.cz \
--to=jack@suse.cz \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sergey.senozhatsky@gmail.com \
/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
Powered by JetHome