linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Ezequiel Garcia <elezegarcia@gmail.com>
Cc: "Luis G.F" <luisgf@gmail.com>, linux-mm@kvack.org
Subject: Re: [PATCH 1/1] mm: Fix unused function warnings in vmstat.c
Date: Tue, 4 Sep 2012 14:12:35 -0700	[thread overview]
Message-ID: <20120904141235.dd9a3e39.akpm@linux-foundation.org> (raw)
In-Reply-To: <CALF0-+XNXNWm7qQ3vZRrN1cd89hCowDiJgTn7Ty80FBRsqB=4g@mail.gmail.com>

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?

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-04 21:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04  9:22 [PATCH 1/1] mm: Fix unused function warnings in vmstat.c 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 [this message]
2012-09-05  6:54         ` Luis G.F

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=20120904141235.dd9a3e39.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=elezegarcia@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=luisgf@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;
as well as URLs for NNTP newsgroup(s).