ddi_prop_lookup(9F) family should accept const property name
The ddi_prop_lookup family of functions (e.g.,
ddi_prop_lookup_string(), etc) accept a
char *name value naming the property the caller wishes to fetch. These functions don't (and should not!) modify the provided
name value, so we should declare that parameter as a
const char * instead. The manual page will need to be updated as well.
Updated by Jeff Walsh about 1 year ago
I was having a look through this as a bite-size bug, however chaining through the const qualifiers in functions calls leads us to ddi_prop_op/ cb_prop_op. and so it creates a list of drivers to fix up, which I am prepared to do, however I'm not sure if that was the intention of the change.
Updated by Joshua M. Clulow about 1 year ago
It seems that it might be reasonable to do at least two different things:
- fix up just the
ddi_prop_lookupfamily, managing the casting away of
constwithin the DDI
- make the broader change you're describing, which will probably need more testing or at least serious use of
wsdiffto confirm that program text isn't unduely changing as a result
Either one seems reasonable, depending on how much effort is available and how risky the change ends up being!