Messages in this thread | | | Date | Wed, 20 May 2015 06:15:45 -0400 | From | Prarit Bhargava <> | Subject | Re: [PATCH] x86, cpuinfo x86_model_id whitespace cleanup |
| |
On 05/20/2015 02:34 AM, Ingo Molnar wrote: > > * Prarit Bhargava <prarit@redhat.com> wrote: > >> arch/x86/kernel/cpu/common.c | 17 ++++------------- >> 1 file changed, 4 insertions(+), 13 deletions(-) > > So I saw this title: > > [PATCH] x86, cpuinfo x86_model_id whitespace cleanup > > ... and in an early morning deconcentrated state was skipped the > changelog and was looking for a whitespace coding style cleanup: > >> @@ -431,18 +430,10 @@ static void get_model_name(struct cpuinfo_x86 *c) >> c->x86_model_id[48] = 0; >> >> /* >> - * Intel chips right-justify this string for some dumb reason; >> - * undo that brain damage: >> + * Remove leading whitespace on Intel processors and trailing >> + * whitespace on AMD processors. >> */ >> - p = q = &c->x86_model_id[0]; >> - while (*p == ' ') >> - p++; >> - if (p != q) { >> - while (*p) >> - *q++ = *p++; >> - while (q <= &c->x86_model_id[48]) >> - *q++ = '\0'; /* Zero-pad the rest */ >> - } >> + strlcpy(c->x86_model_id, strim(c->x86_model_id), 48); >> } > > Which this clearly isnt! > > Fortunately before complaining about that I read the changelog as > well, and realized that the 'whitespace cleanup' is done to > /proc/cpuinfo ABI output. > > Could you please make the title less ambiguous, so that sleepy kernel > developers get the right idea what the patch looks like, from the > title alone? Git shortlogs will vastly improve as well. > > Something like: > > [PATCH] x86/cpu: Strip leading and trailing spaces from the /proc/cpuinfo CPU model field > > ... or so would work very well for me!
:) Sorry Ingo -- I'll definitely clean that up in the next version.
P.
> > Thanks, > > Ingo >
| |