Hi Andrew,
By the way, I do see a call (sysfs_streq) in use for this purpose other places. Sorry, I didn't find it while looking at the original problem. I'm not sure if this is preferable, but it appears to have been added specifically for the strings coming through sysfs.
My preference is copying the string and cleaning it up before passing it to internal functions, even though we incur an allocation.
Thanks,
Sebastian