Re: [PATCH] mm: cleanup swap unused warning

From: Con Kolivas
Date: Tue May 16 2006 - 06:55:27 EST

On Thursday 11 May 2006 09:04, Christoph Lameter wrote:
> On Wed, 10 May 2006, Con Kolivas wrote:
> > Are there any users of swp_entry_t when CONFIG_SWAP is not defined?
> Yes, a migration entry is a form of swap entry.

mm/vmscan.c: In function âremove_mappingâ:
mm/vmscan.c:387: warning: unused variable âswapâ

Ok so if we fix it by making swp_entry_t __attribute__((__unused__) we break
swap migration code?

If we make swap_free() an empty static inline function then gcc compiles in
the variable needlessly and we won't know it.

For the moment let's continue putting up with the warning.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at