Re: [PATCH 1/1] mm: Fix unused function warnings in vmstat.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 4 Sep 2012 07:01:20 -0300
Ezequiel Garcia <elezegarcia@xxxxxxxxx> 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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]