* Greg KH (gregkh@xxxxxxx) wrote: > On Tue, Aug 31, 2010 at 02:19:09PM +0200, Philippe Langlais wrote: > > Bug seen by Dr. David Alan Gilbert with sparse > > sparse found this? nice. It spotted it because it ended up causing the same element of the array to be initialised twice. A few hours spent playing with sparse has spotted some nice easy-to-fix thinko type bugs (this one, two parameters being swapped to kzalloc, a few places where people passed enums in place of bools). Basically if you ignore all the address space, static and locking output whats left is 'odd' stuff that appears to be worthy of a read. (That's from my first time using it). They're all the class of problems that you would hope a type system in the compiler would spot. > But odds are we should switch this to an enum to try to find it earlier, > right? An enum would be nice; but the other problem is that there are two lists one in serial.h and one in serial_core.h that both start in the same way - it was just a matter of time until something got added to the wrong one. IMO the older list needs killing unless there is a very good reason for it. Dave -- -----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ gro.gilbert @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/ -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html