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

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

 



Hi Andrew:

2012/9/4 Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>:
> 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?
>

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@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]