From: Hugh Dickins Date: Wed, 20 Aug 2008 21:09:05 +0000 (-0700) Subject: mm: show free swap as signed X-Git-Tag: v2.6.27-rc4~17 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=07279cdfd964acc032de92a527cb11b1f40f35aa;p=linux-2.6-omap-h63xx.git mm: show free swap as signed Adjust m show_swap_cache_info() to show "Free swap" as a signed long: the signed format is preferable, because during swapoff nr_swap_pages can legitimately go negative, so makes more sense thus (it used to be shown redundantly, once as signed and once as unsigned). Signed-off-by: Hugh Dickins Reviewed-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/swap_state.c b/mm/swap_state.c index 167cf2dc8a0..797c3831cbe 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -60,7 +60,7 @@ void show_swap_cache_info(void) printk("Swap cache stats: add %lu, delete %lu, find %lu/%lu\n", swap_cache_info.add_total, swap_cache_info.del_total, swap_cache_info.find_success, swap_cache_info.find_total); - printk("Free swap = %lukB\n", nr_swap_pages << (PAGE_SHIFT - 10)); + printk("Free swap = %ldkB\n", nr_swap_pages << (PAGE_SHIFT - 10)); printk("Total swap = %lukB\n", total_swap_pages << (PAGE_SHIFT - 10)); }