On Wed, Aug 19, 2015 at 10:29:53PM +0100, Mark Cave-Ayland wrote:
set_property(dnode, "model", ((current_channel == 3) ?
"ata-3" : "ata-4"), 6);
set_property(dnode, "AAPL,connector", "ata", 4);
Slight nit here: can we use the same convention as in the earlier patch for specifying the property length, e.g. strlen("ata-3") + 1 and strlen("ata") + 1. I should imagine the overhead should be minimal, and
Zero overhead to be exact; GCC knows how to do strlen on constant strings.
It would be nice if you could do e.g.
set_string_property(dnode, "AAPL,connector", "ata");
which handles all common cases. Little helpers are not just for fairy tales :-)
Segher