From: Arvind Yadav Date: Thu, 17 Aug 2017 13:45:05 +0000 (+0530) Subject: scsi: ibmvfc: ibmvscsi: ibmvscsi_tgt: constify vio_device_id X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e4df3eaa6e72459767cbf9b883fdfd2d28197583;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 work with const vio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 51f52480bf34..b491af31a5f8 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -4925,7 +4925,7 @@ static unsigned long ibmvfc_get_desired_dma(struct vio_dev *vdev) return pool_dma + ((512 * 1024) * driver_template.cmd_per_lun); } -static struct vio_device_id ibmvfc_device_table[] = { +static const struct vio_device_id ibmvfc_device_table[] = { {"fcp", "IBM,vfc-client"}, { "", "" } }; diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index da22b3665cb0..7d156b161482 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -2330,7 +2330,7 @@ static int ibmvscsi_resume(struct device *dev) * ibmvscsi_device_table: Used by vio.c to match devices in the device tree we * support. */ -static struct vio_device_id ibmvscsi_device_table[] = { +static const struct vio_device_id ibmvscsi_device_table[] = { {"vscsi", "IBM,v-scsi"}, { "", "" } }; diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index 1f75d0380516..785fb42f6650 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c @@ -4086,7 +4086,7 @@ static struct class ibmvscsis_class = { .dev_groups = ibmvscsis_dev_groups, }; -static struct vio_device_id ibmvscsis_device_table[] = { +static const struct vio_device_id ibmvscsis_device_table[] = { { "v-scsi-host", "IBM,v-scsi-host" }, { "", "" } };