For someone who wants to get their feet wet in the kernel, an relatively 
easy task would be to clean up some of the cases where char * is used, 
but const char * could be used instead.

For example, the ddi_log_sysevent(), ddi_create_minor_node(), and 
similar interfaces take char * arguments, where const char * would be 
sufficient.  (IMO, the use of char * in these things makes it harder to 
use const char * elsewhere, especially in device drivers.)

Another benefit is that the compiler can do better optimizations on some 
of these routines.  In places like ddi_log_sysevent() (and the 
underlying structures and code), this could add up, especially on 
particularly busy systems where a lot of sysevents are getting tossed 
around.

There are probably a bunch more opportunities to cleanup char * -> const 
char *, but if anyone wants to help out here, let me know.  If I don't 
hear any takers for this oss-bite-sized task (which doesn't have a CR at 
the moment, I think), I might just do it myself.

    -- Garrett

_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to