Messages in this thread |  | | | From | (H. Peter Anvin) | | Subject | Re: 2.1.118 Tons of oopes | | Date | 29 Aug 1998 08:40:12 GMT |
| |
Followup to: <199808290218.MAA28352@vindaloo.atnf.CSIRO.AU> By author: Richard Gooch <rgooch@atnf.csiro.au> In newsgroup: linux.dev.kernel > > Before I get into the part about the flames, I have a suggestion: how > about we start using the GCC intialiser extensions? In other words, if > I have a "xyz" driver, I do this: > > struct file_operations xyz_fops = { > open:xyz_open, > read:xyz_read, > write:xyz_write, > }; > > if I only implement those 3 methods. This is insensitive to members > being moved around and it seems to me that it solves the problem which > Doug explained which is if you don't carefully look at the structure > declaration beforehand, you're stuffed. > > Is this the way you'd like things to be done? This appears to be quite > maintainable. > If so, it seems to me it would make sense to change all the drivers > over to this method. Would you accept a patch that does this? >
IMNSHO, the whole usage of NULL silly. Is there a good reason why we're not simply a pointer pointing to a routine implementing the default action? (Does nothing if empty?) That way we wouldn't have to have a null pointer check on every call...
-hpa -- PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74 See http://www.zytor.com/~hpa/ for web page and full PGP public key I am Bahá'í -- ask me about it or see http://www.bahai.org/ "To love another person is to see the face of God." -- Les Misérables
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
|  |