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

scsi: make device_type const

Make these const as they are only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bhumika Goyal and committed by
Martin K. Petersen
7988faf5 5f800c87

+4 -4
+2 -2
drivers/scsi/fcoe/fcoe_sysfs.c
··· 659 659 kfree(fcf); 660 660 } 661 661 662 - static struct device_type fcoe_ctlr_device_type = { 662 + static const struct device_type fcoe_ctlr_device_type = { 663 663 .name = "fcoe_ctlr", 664 664 .groups = fcoe_ctlr_attr_groups, 665 665 .release = fcoe_ctlr_device_release, 666 666 }; 667 667 668 - static struct device_type fcoe_fcf_device_type = { 668 + static const struct device_type fcoe_fcf_device_type = { 669 669 .name = "fcoe_fcf", 670 670 .groups = fcoe_fcf_attr_groups, 671 671 .release = fcoe_fcf_device_release,
+2 -2
drivers/scsi/scsi_transport_iscsi.c
··· 1009 1009 kfree(fnode_sess); 1010 1010 } 1011 1011 1012 - static struct device_type iscsi_flashnode_sess_dev_type = { 1012 + static const struct device_type iscsi_flashnode_sess_dev_type = { 1013 1013 .name = "iscsi_flashnode_sess_dev_type", 1014 1014 .groups = iscsi_flashnode_sess_attr_groups, 1015 1015 .release = iscsi_flashnode_sess_release, ··· 1195 1195 kfree(fnode_conn); 1196 1196 } 1197 1197 1198 - static struct device_type iscsi_flashnode_conn_dev_type = { 1198 + static const struct device_type iscsi_flashnode_conn_dev_type = { 1199 1199 .name = "iscsi_flashnode_conn_dev_type", 1200 1200 .groups = iscsi_flashnode_conn_attr_groups, 1201 1201 .release = iscsi_flashnode_conn_release,