From: Jonathan Neuschäfer Date: Fri, 28 Feb 2025 15:11:24 +0000 (+0100) Subject: usb: storage: shuttle_usbat: Use const for constant array X-Git-Tag: v6.15-rc1~46^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1534692e953c767ae6a3b6b504596de1c2c30082;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20250228-misc-const-v3-9-09b417ded9c4@posteo.net Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c index c33cbf177e6fc..27faa0ead11d1 100644 --- a/drivers/usb/storage/shuttle_usbat.c +++ b/drivers/usb/storage/shuttle_usbat.c @@ -1683,7 +1683,7 @@ static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us) struct usbat_info *info = (struct usbat_info *) (us->extra); unsigned long block, blocks; unsigned char *ptr = us->iobuf; - static unsigned char inquiry_response[36] = { + static const unsigned char inquiry_response[36] = { 0x00, 0x80, 0x00, 0x01, 0x1F, 0x00, 0x00, 0x00 };