lkml.org 
[lkml]   [2010]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] mm/swapfile.c: better messages for swap_info_get
Em 22-05-2010 15:13, Borislav Petkov escreveu:
>> @@ -522,16 +522,16 @@ static struct swap_info_struct *swap_info_get(swp_entry_t entry)
>> return p;
>>
>> bad_free:
>> - printk(KERN_ERR "swap_free: %s%08lx\n", Unused_offset, entry.val);
>> + printk(KERN_ERR "swap_info_get: %s%08lx\n", Unused_offset, entry.val);
>
> Why not let the compiler do it for ya:
>
> printk(KERN_ERR "%s: %s%08lx\n", __func__, Unused_offset, entry.val);
>
> ?... etc.

See the third patch. This function becomes swap_info_get_unlocked(), and
swap_info_get() becomes a small wrapper around it. Yet, I still want to
keep printing swap_info_get: in the error message (whether it is locked
or not makes no difference from the point of view of the error messsage).

--
Cesar Eduardo Barros
cesarb@cesarb.net
cesar.barros@gmail.com


\
 
 \ /
  Last update: 2010-05-22 20:21    [W:0.149 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site