From: Paul M. <pm...@mv...> - 2001-06-19 19:45:34
|
On Tue, Jun 19, 2001 at 10:33:17AM -0700, James Simmons wrote: > > This brings up a few other potential issues in various other portions of > > the code. This current approach is far too ugly, there are all sorts of > > opportunities where it could be dereferencing NULL, etc. > >=20 > > A more general solution for this kind of finding/removal of nodes from > > the linked list would likely be a better solution. > >=20 > > What does everyone think about something like the attached patch as a > > more unified solution? >=20 > Their is linux/include/linux/list.h which is a generic interface for > double link list. From what I see their is no single link list > implementation. I meant a more unified solution as it applied to the input code. It would be a nuisance to rewrite all the list handling in the input code to utilize a doubly linked list, and I don't think there's quite enough demand to bother writing a single linked list implementation. The patch is simply to clean up some of the input code and to avoid code duplication and a few potential oopses from occasionally dereferencing a NULL pointer. On top of that, the patch is pretty much isolated to drivers/input/input.c and suits its purpose fairly well IMO. Regards, --=20 Paul Mundt <pm...@mv...> MontaVista Software, Inc. |