[PATCH] scsi: ibmvfc: constify dev_pm_ops structures.
Arvind Yadav
arvind.yadav.cs at gmail.com
Thu Jun 29 17:54:41 AEST 2017
dev_pm_ops are not supposed to change at runtime. All functions
working with dev_pm_ops provided by <linux/device.h> work with const
dev_pm_ops. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
41937 1296 20 43253 a8f5 drivers/scsi/ibmvscsi/ibmvfc.o
File size After adding 'const':
text data bss dec hex filename
42129 1104 20 43253 a8f5 drivers/scsi/ibmvscsi/ibmvfc.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs at gmail.com>
---
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 26cd3c2..cc4e05b 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -4935,7 +4935,7 @@ static unsigned long ibmvfc_get_desired_dma(struct vio_dev *vdev)
};
MODULE_DEVICE_TABLE(vio, ibmvfc_device_table);
-static struct dev_pm_ops ibmvfc_pm_ops = {
+static const struct dev_pm_ops ibmvfc_pm_ops = {
.resume = ibmvfc_resume
};
--
1.9.1
More information about the Linuxppc-dev
mailing list