lkml.org 
[lkml]   [2014]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] scripts/mod/modpost.c: Fix bug in number_prefix
Date
Rasmus Villemoes <linux@rasmusvillemoes.dk> writes:
> Paul Gortmaker <paul.gortmaker@windriver.com> writes:
>
>> On 14-06-25 04:46 AM, Rasmus Villemoes wrote:
>>> The function number_prefix() can currently only return 1 if its
>>> argument is the empty string: If line 3 is reached and *sym (now the
>>> second character in the argument) is not '.', 0 is returned. However,
>>> if that character is '.', the first assignment to c is that same '.',
>>> which obviously fails to be a digit.
>>
>> I'd suggest you expand the commit log to actually list the end-user
>> visible symptom and the use case that this actually fixes, since it
>> isn't obvious to me at all.
>
> Sorry, it isn't obvious to me either. I just stumbled on it reading the
> code; the rest of modpost.c is too deep magic for me.

The function is horribly mis-named which doesn't help ("number_postfix"
would be closer).

And yes, it's completely broken.

Sam, this never worked, and was clearly never tested. Seems like we
should just rip out the '$' postfix then, or are you aware of platforms
which have been ignoring modpost complaints since 2008?

Cheers,
Rusty.


\
 
 \ /
  Last update: 2014-07-09 03:21    [W:0.057 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site