lkml.org 
[lkml]   [2008]   [Jun]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 26 Jun 2008 21:17:35 -0700
FromGreg KH <>
SubjectRe: keyspan_pda.c use of keyspan_pda_get_modem_info
On Thu, Jun 26, 2008 at 04:23:46PM +0100, Alan Cox wrote:
> > In these two call sites the callers bail out if> > keyspan_pda_get_modem_info return value is < 0> > I don't think that is what the compiler is warning about.
> > We error on rc < 0
> We use the returned status on rc >= 0
> 
> We set the returned status on rc > 0
> 
> So the rc = 0 case is broken and gcc seems to be correct about that

Yes, that is correct, fortunatly that function can never return rc = 0,
so this will not happen in real life.

But there is really no way the compiler can ever figure that out, so I
don't blame it for complaining.

If you want to make a simple patch to make the compiler happy and be
quiet about the warning, I'll take it.

thanks,

greg k-h


\
 
 \ /
  Last update: 2008-06-27 06:25    [from the cache]
©2003-2008