* suppress warning: ‘quotatypes’ defined but not used
@ 2010-04-22 8:05 Sergey Senozhatsky
2010-04-22 19:31 ` Jan Kara
0 siblings, 1 reply; 3+ messages in thread
From: Sergey Senozhatsky @ 2010-04-22 8:05 UTC (permalink / raw)
To: Jan Kara; +Cc: Christoph Hellwig, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]
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) ..."?
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;
[-- Attachment #2: Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: suppress warning: ‘quotatypes’ defined but not used
2010-04-22 8:05 suppress warning: ‘quotatypes’ defined but not used Sergey Senozhatsky
@ 2010-04-22 19:31 ` Jan Kara
2010-04-23 10:51 ` Sergey Senozhatsky
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kara @ 2010-04-22 19:31 UTC (permalink / raw)
To: Sergey Senozhatsky; +Cc: Jan Kara, Christoph Hellwig, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: suppress warning: ‘quotatypes’ defined but not used
2010-04-22 19:31 ` Jan Kara
@ 2010-04-23 10:51 ` Sergey Senozhatsky
0 siblings, 0 replies; 3+ messages in thread
From: Sergey Senozhatsky @ 2010-04-23 10:51 UTC (permalink / raw)
To: Jan Kara; +Cc: Christoph Hellwig, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
Hello,
On (04/22/10 21:31), Jan Kara wrote:
> 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
My editor truncated /* List of registered formats */ line in the patch. So
I resent it (titled as (resent)). Sorry for inattention.
Sergey
[-- Attachment #2: Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-23 10:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-22 8:05 suppress warning: ‘quotatypes’ defined but not used Sergey Senozhatsky
2010-04-22 19:31 ` Jan Kara
2010-04-23 10:51 ` Sergey Senozhatsky
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