Re: [PATCH 3/4] lib: vsprintf: Optimize put_dec_trunc8

From: George Spelvin
Date: Mon Sep 24 2012 - 07:13:48 EST


Oh, joy, a new week and a nice dose of public humiliation to start it off.
(Remind me never to go AFK for a weekend again.)

Seriously, Rabin, thank you very much for the bug report and my
apologies for inflicting the bug on you in the first place.

Denys, good to hear from you. I had hoped this would be signed off
by you before going upstream, but akpm picked it up first.


This code *was* extensively tested, but in a user-space test harness.
Moving it into the kernel was less so; I looked at a lot of /proc and
/sys files, but known answers are hard to come by there, and I didn't
actually write a complete test module.

(It's also running on the production file/mail server I'm sending
this from; I do eat my own dog food.)

However, thinking back, the sprintf code I used, for comparison with
the libc sprintf, wanted a binary->decimal primitive that converts 0 to
the empty string; getting ANSI compatible results from "%.0u" and "%.1u"
is easier with that convention.

My initial suspicion is that I didn't convert that convention properly
somehow.


Anyway, individual responses to follow.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/