Re: [PATCH for-next v2 1/4] null_blk: generate null_blk configfs features string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/25/24 2:09 AM, Shin'ichiro Kawasaki wrote:
Also, modify order of the
nullb_device_attrs table to not change the list order of the generated
string.

No software should depend on the order of the names of the attributes in
the help text, isn't it? Mentioning that the order has been changed into
alphabetical order may be sufficient.

+/*
+ * Place the elements in alphabetical order to keep the confingfs
+ * 'features' string readable.
+ */

confingfs -> configfs

Thank you for having sorted this list in alphabetical order.

Additionally, I don't think that a reference to the 'features' string is
necessary here. It is a common practice in Linux kernel code to keeps
list of things sorted if the order doesn't matter.

+		if (!*(entry + 1))
+			fmt = "%s\n";
+		ret = snprintf(page + written, left, fmt, (*entry)->ca_name);

Compilers do not support checking the format specifiers if the format
specification is not constant. Please make the format specification
constant, e.g. "%s%c" instead of fmt.

Thanks,

Bart.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux