Re: [PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Satyam Sharma <satyam@...>
Cc: Andrew Morton <akpm@...>, Antonino Daplas <adaplas@...>, <linux-fbdev-devel@...>, <linux-mips@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 10:04 am

Hi Satyam,


 Of course -- essentially GCC cannot really figure out whether all the 
possible paths of execution include initialisation or not and complains 
just in case.


 GCC for MIPS used to be problematic enough elsewhere I do not want to 
turn back.  Even 4.0.x generates bad code, e.g. fs/partitions/msdos.c gets 
miscompiled for the big endianness (but not for the little one!).  
Compared to that some useless warnings are negligible.  This 4.1.2 version 
has triggered no problems with the kernel yet (though I suspect it is 
still so-so -- e.g. gmp gets miscompiled; which used to be fine with 
4.0.x, oddly enough).


 Perhaps preinitialising to an error value such as -EINVAL would be of 
more sense.  This way any error paths lacking initialisation are still 
reported as errors, even though the classification might be wrong.  In 
fact more exotic one might be chosen (the glibc manual has some nice 
proposals if none of these we currently define fits) so the mistake is 
more obvious.

  Maciej
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics, Maciej W. Rozycki, (Mon Sep 17, 12:45 pm)
Re: [PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics, Maciej W. Rozycki, (Tue Sep 18, 8:18 am)
Re: [PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics, Maciej W. Rozycki, (Thu Sep 20, 8:52 am)
Re: [PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics, Maciej W. Rozycki, (Thu Sep 20, 10:04 am)
Re: [PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics, Martin Michlmayr, (Thu Sep 20, 2:16 am)