lkml.org 
[lkml]   [2015]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: wmi: Remove private %pUL implementation
On Tue, Feb 24, 2015 at 03:15:30PM +0100, Rasmus Villemoes wrote:
> The work performed by wmi_gtoa is equivalent to simply sprintf(out,
> "%pUL", in), so one could replace its body by this. However, most
> users feed the result directly as a %s argument to some other function
> which also understands the %p extensions (they all ultimately use
> vsnprintf), so we can eliminate some stack buffers and quite a bit of
> code by just using %pUL directly.
>
> In wmi_dev_uevent I'm not sure whether there's room for a
> nul-terminator in env->buf, so I've just replaced wmi_gtoa with the
> equivalent sprintf call.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Nice cleanup, thanks Rasmus. Queued for 4.1.

--
Darren Hart
Intel Open Source Technology Center


\
 
 \ /
  Last update: 2015-03-06 19:01    [W:1.109 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site