Re: [RESEND PATCH] scsi: sd: Use str_on_off() helper in sd_read_write_protect_flag()
From: Bart Van Assche
Date: Thu Mar 13 2025 - 13:51:37 EST
On 3/13/25 10:05 AM, Thorsten Blum wrote:
* 3) Deduping by the linker, which results in a smaller binary file.
Hmm ... I'm not sure that using functions like str_on_off() will result
in a smaller binary file since the str_on_off() function (and other
similar helper functions) have been declared inline. Additionally, isn't
a linker supposed to deduplicate literal strings even if str_on_off()
is not used? Isn't the compiler assumed to merge identical literal
strings if -fmerge-constants has been specified? From the GCC
documentation about that option: "Enabled at levels -O1, -O2, -O3, -Os."
Bart.