linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Luis G.F" <luisgf@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Ezequiel Garcia <elezegarcia@gmail.com>, linux-mm@kvack.org
Subject: Re: [PATCH 1/1] mm: Fix unused function warnings in vmstat.c
Date: Wed, 5 Sep 2012 08:54:11 +0200	[thread overview]
Message-ID: <CAHve1myEUVa4AF_1tijpnCBBy=qcP+U5YQDRcCzvv7cPMeLiqA@mail.gmail.com> (raw)
In-Reply-To: <20120904141235.dd9a3e39.akpm@linux-foundation.org>

Hi Andrew:

2012/9/4 Andrew Morton <akpm@linux-foundation.org>:
> On Tue, 4 Sep 2012 07:01:20 -0300
> Ezequiel Garcia <elezegarcia@gmail.com> wrote:
>
>> Also, in the future when fixing warnings you may want to add the warning message
>> to the commit message.
>
> Yes, please always quote the messages in the changelog.
>
>> Anyway, I don't really know why are you getting that (wrong) warning,
>> but I don't think the solution is to add the 'unused' attribute.
>
> And yes, let's not work around compiler problems too eagerly.  We _do_
> occasionally work around bogus warnings, but only long-established ones
> which we see no other way of fixing.
>
> In this case, it might be that these functions are indeed unused with
> certain Kconfig combinations.  For example and from inspection,
> CONFIG_PROCFS=n, CONFIG_DEBUG_FS=n, CONFIG_COMPACTION=y might cause
> such a warning?
>

I generate a complete random conf (with make randconfig) and the
problem with warnings is that
CONFIG_PROC_FS is undefined but CONFIG_COMPACTION=y (as you say).That's create
certain scenario where the variables are defined but never used.


> Also, please don't directly use __attribute__((unused)) - we have
> various helper macros in include/linux/compiler*.h for this.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2012-09-05  6:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04  9:22 Luis Gonzalez Fernandez
2012-09-04  9:44 ` Ezequiel Garcia
2012-09-04  9:51   ` Luis G.F
2012-09-04 10:01     ` Ezequiel Garcia
2012-09-04 21:12       ` Andrew Morton
2012-09-05  6:54         ` Luis G.F [this message]

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='CAHve1myEUVa4AF_1tijpnCBBy=qcP+U5YQDRcCzvv7cPMeLiqA@mail.gmail.com' \
    --to=luisgf@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=elezegarcia@gmail.com \
    --cc=linux-mm@kvack.org \
    /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