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 <[email protected]> Reviewed-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9dd3aa7 commit 1534692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)