mirror of https://github.com/torvalds/linux.git
usb: storage: initializers: Use const for constant array
init_string is only read, not modified. Declaring data as const makes it easier to see what's going on, and can prevent unintended writes through placement in a read-only section. Signed-off-by: Jonathan Neuschäfer <j.ne@posteo.net> Reviewed-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20250228-misc-const-v3-5-09b417ded9c4@posteo.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6623c40bed
commit
b1a23e3bbf
|
|
@ -54,7 +54,7 @@ int usb_stor_ucr61s2b_init(struct us_data *us)
|
|||
struct bulk_cs_wrap *bcs = (struct bulk_cs_wrap*) us->iobuf;
|
||||
int res;
|
||||
unsigned int partial;
|
||||
static char init_string[] = "\xec\x0a\x06\x00$PCCHIPS";
|
||||
static const char init_string[] = "\xec\x0a\x06\x00$PCCHIPS";
|
||||
|
||||
usb_stor_dbg(us, "Sending UCR-61S2B initialization packet...\n");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue