On 1/15/25 1:29 PM, Shin'ichiro Kawasaki wrote: > The null_blk configfs file 'features' provides a string that lists > available null_blk features for userspace programs to reference. > The string is defined as a long constant in the code, which tends to be > forgotten for updates. It also causes checkpatch.pl to report > "WARNING: quoted string split across lines". > > To avoid these drawbacks, generate the feature string on the fly. Refer > to the ca_name field of each element in the nullb_device_attrs table and > concatenate them in the given buffer. Also, sorted nullb_device_attrs > table elements in alphabetical order. > > Of note is that the feature "index" was missing before this commit. > This commit adds it to the generated string. > > Suggested-by: Bart Van Assche <bvanassche@xxxxxxx> > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> Nice cleanup ! Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx> -- Damien Le Moal Western Digital Research