lkml.org 
[lkml]   [2021]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lib/vsprintf: add __putchar()

On Fri, Aug 27, 2021 at 10:11:55AM -0700, Yury Norov wrote:
> There are 26 occurrences of the code snippet like this in the file :
> if (buf < end)
> *buf = separator;
> ++buf;
>
> This patch adds a helper function __putchar() to replace opencoding.
> It adds a lot to readability, and also saves 43 bytes of text on x86.

Last time I tried similar it failed the compilation.

Anyway, while you remove a lot of code I'm not sure it makes the code better
to read and understand. Also, we use the same idiom outside of this file.

I would ask Rasmus' opinion on this.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2021-08-29 15:37    [W:0.065 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site