Skip to content

Commit 1534692

Browse files
neuschaefergregkh
authored andcommitted
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>
1 parent 9dd3aa7 commit 1534692

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/usb/storage/shuttle_usbat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1683,7 +1683,7 @@ static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us)
16831683
struct usbat_info *info = (struct usbat_info *) (us->extra);
16841684
unsigned long block, blocks;
16851685
unsigned char *ptr = us->iobuf;
1686-
static unsigned char inquiry_response[36] = {
1686+
static const unsigned char inquiry_response[36] = {
16871687
0x00, 0x80, 0x00, 0x01, 0x1F, 0x00, 0x00, 0x00
16881688
};
16891689

0 commit comments

Comments
 (0)