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

scsi: ibmvfc: ibmvscsi: ibmvscsi_tgt: constify vio_device_id

vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by <asm/vio.h> work with const
vio_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Arvind Yadav and committed by
Martin K. Petersen
e4df3eaa 35c0506f

+3 -3
+1 -1
drivers/scsi/ibmvscsi/ibmvfc.c
··· 4925 4925 return pool_dma + ((512 * 1024) * driver_template.cmd_per_lun); 4926 4926 } 4927 4927 4928 - static struct vio_device_id ibmvfc_device_table[] = { 4928 + static const struct vio_device_id ibmvfc_device_table[] = { 4929 4929 {"fcp", "IBM,vfc-client"}, 4930 4930 { "", "" } 4931 4931 };
+1 -1
drivers/scsi/ibmvscsi/ibmvscsi.c
··· 2330 2330 * ibmvscsi_device_table: Used by vio.c to match devices in the device tree we 2331 2331 * support. 2332 2332 */ 2333 - static struct vio_device_id ibmvscsi_device_table[] = { 2333 + static const struct vio_device_id ibmvscsi_device_table[] = { 2334 2334 {"vscsi", "IBM,v-scsi"}, 2335 2335 { "", "" } 2336 2336 };
+1 -1
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
··· 4086 4086 .dev_groups = ibmvscsis_dev_groups, 4087 4087 }; 4088 4088 4089 - static struct vio_device_id ibmvscsis_device_table[] = { 4089 + static const struct vio_device_id ibmvscsis_device_table[] = { 4090 4090 { "v-scsi-host", "IBM,v-scsi-host" }, 4091 4091 { "", "" } 4092 4092 };