* [13/15] scsi: make device_type const
@ 2017-08-19 8:22 Bhumika Goyal
0 siblings, 0 replies; 2+ messages in thread
From: Bhumika Goyal @ 2017-08-19 8:22 UTC (permalink / raw)
To: julia.lawall, bp, mchehab, daniel.vetter, jani.nikula, seanpaul,
airlied, g.liakhovetski, tomas.winkler, dwmw2, computersforpeace,
boris.brezillon, marek.vasut, richard, cyrille.pitchen, peda,
kishon, bhelgaas, thierry.reding, jonathanh, dvhart, andy, ohad,
bjorn.andersson, freude, schwidefsky, heiko.carstens, jth, jejb,
martin.petersen, lduncan, cleech, johan, elder, gregkh,
heikki.krogerus, linux-edac, linux-kernel, dri-devel, linux-media,
linux-mtd, linux-pci, linux-tegra, platform-driver-x86,
linux-remoteproc, linux-s390, fcoe-devel, linux-scsi, open-iscsi,
greybus-dev, devel, linux-usb
Cc: Bhumika Goyal
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>
---
drivers/scsi/fcoe/fcoe_sysfs.c | 4 ++--
drivers/scsi/scsi_transport_iscsi.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c
index 9cf3d56..5c8310b 100644
--- a/drivers/scsi/fcoe/fcoe_sysfs.c
+++ b/drivers/scsi/fcoe/fcoe_sysfs.c
@@ -659,13 +659,13 @@ static void fcoe_fcf_device_release(struct device *dev)
kfree(fcf);
}
-static struct device_type fcoe_ctlr_device_type = {
+static const struct device_type fcoe_ctlr_device_type = {
.name = "fcoe_ctlr",
.groups = fcoe_ctlr_attr_groups,
.release = fcoe_ctlr_device_release,
};
-static struct device_type fcoe_fcf_device_type = {
+static const struct device_type fcoe_fcf_device_type = {
.name = "fcoe_fcf",
.groups = fcoe_fcf_attr_groups,
.release = fcoe_fcf_device_release,
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index a424eae..b9513f8 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -1009,7 +1009,7 @@ static void iscsi_flashnode_sess_release(struct device *dev)
kfree(fnode_sess);
}
-static struct device_type iscsi_flashnode_sess_dev_type = {
+static const struct device_type iscsi_flashnode_sess_dev_type = {
.name = "iscsi_flashnode_sess_dev_type",
.groups = iscsi_flashnode_sess_attr_groups,
.release = iscsi_flashnode_sess_release,
@@ -1195,7 +1195,7 @@ static void iscsi_flashnode_conn_release(struct device *dev)
kfree(fnode_conn);
}
-static struct device_type iscsi_flashnode_conn_dev_type = {
+static const struct device_type iscsi_flashnode_conn_dev_type = {
.name = "iscsi_flashnode_conn_dev_type",
.groups = iscsi_flashnode_conn_attr_groups,
.release = iscsi_flashnode_conn_release,
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [13/15] scsi: make device_type const
@ 2017-08-25 21:30 Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2017-08-25 21:30 UTC (permalink / raw)
To: Bhumika Goyal
Cc: julia.lawall, bp, mchehab, daniel.vetter, jani.nikula, seanpaul,
airlied, g.liakhovetski, tomas.winkler, dwmw2, computersforpeace,
boris.brezillon, marek.vasut, richard, cyrille.pitchen, peda,
kishon, bhelgaas, thierry.reding, jonathanh, dvhart, andy, ohad,
bjorn.andersson, freude, schwidefsky, heiko.carstens, jth, jejb,
martin.petersen, lduncan, cleech, johan, elder, gregkh,
heikki.krogerus, linux-edac, linux-kernel, dri-devel, linux-media,
linux-mtd, linux-pci, linux-tegra, platform-driver-x86,
linux-remoteproc, linux-s390, fcoe-devel, linux-scsi, open-iscsi,
greybus-dev, devel, linux-usb
Bhumika,
> Make these const as they are only stored in the type field of a device
> structure, which is const.
Applied to 4.14/scsi-queue. Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-25 21:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25 21:30 [13/15] scsi: make device_type const Martin K. Petersen
-- strict thread matches above, loose matches on Subject: below --
2017-08-19 8:22 Bhumika Goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).