lkml.org 
[lkml]   [2014]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] fs/ubifs/super.c: replace seq_printf by seq_puts
Am 15.07.2014 22:59, schrieb Andrew Morton:
> On Tue, 15 Jul 2014 22:10:24 +0200 Richard Weinberger <richard.weinberger@gmail.com> wrote:
>
>> On Tue, Jul 15, 2014 at 9:26 PM, Fabian Frederick <fabf@skynet.be> wrote:
>>> Fix checkpatch warnings:
>>> "WARNING: Prefer seq_puts to seq_printf"
>>
>> Can you explain why seq_puts() is preferred over seq_printf()?
>
> - puts is presumably faster
>
> - puts doesn't go rogue if you accidentally pass it a "%".
>
> - this patch actually made fs/ubifs/super.o 12 bytes smaller.
> Perhaps because seq_printf() is a varargs function, forcing the
> caller to pass args on the stack instead of in registers.

This needs to go into the commit message. :-)

Thanks,
//richard


\
 
 \ /
  Last update: 2014-07-15 23:41    [W:0.042 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site