Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: storage: shuttle_usbat: Use const for constant array

This array 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-9-09b417ded9c4@posteo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jonathan Neuschäfer and committed by
Greg Kroah-Hartman
1534692e 9dd3aa74

+1 -1
+1 -1
drivers/usb/storage/shuttle_usbat.c
··· 1683 1683 struct usbat_info *info = (struct usbat_info *) (us->extra); 1684 1684 unsigned long block, blocks; 1685 1685 unsigned char *ptr = us->iobuf; 1686 - static unsigned char inquiry_response[36] = { 1686 + static const unsigned char inquiry_response[36] = { 1687 1687 0x00, 0x80, 0x00, 0x01, 0x1F, 0x00, 0x00, 0x00 1688 1688 }; 1689 1689