lkml.org 
[lkml]   [2014]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: fix two sparse warnings in early boot string handling
On Tue, 11 Feb 2014, Paul Gortmaker wrote:

> > > Fixes:
> > >
> > > arch/x86/boot/compressed/../string.c:60:14: warning: symbol 'atou' was not declared. Should it be static?
> > > arch/x86/boot/string.c:133:6: warning: symbol 'strstr' was not declared. Should it be static?
> > >
> > > The atou one could be considered a false positive; it seems somehow
> > > caused by including ./string.c from within /compressed/string.c file.
> > > However git grep shows only the atou prototype and declaration, so
> > > it is completely unused and we can hence delete it.
> > >
> >
> > Declaring a prototype in a header file would be pointless if there is no
> > current breakage; I don't see why you can't remove strstr() in
> > arch/x86/boot/string.c entirely. What breaks?
>
> Explicit breakage vs. sparse warnings are two different things. It may
> be that we can delete strstr() just like I did for atou() -- but in the
> interest of doing the minimal change, I did just what was needed for
> fixing the sparse warnings for strstr. I can test if it can be removed,
> but it has the smell of generic-libc usage all over it...
>

When the minimal change is to add an unnecessary prototype for a function
that is not referenced, it doesn't seem acceptable.


\
 
 \ /
  Last update: 2014-02-12 04:01    [W:0.310 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site