Skip to contentSkip to conversation

drivers: make device_type const

PATCH Applied Bhumika Goyal 13 participants 85 messages Aug 19, 2017 – Aug 31, 2017 1 message not in the archive

Subsystems (27)
DRM drivers Media (V4L/DVB) SCSI USB +23 more subsystems
lore
Share & tools
lore
#0 lore raw

cover drivers: make device_type const

Make device_type const. Done using Coccinelle.

Bhumika Goyal (15):
EDAC: make device_type const
drm: make device_type const
[media] i2c: make device_type const
[media] rc: make device_type const
mei: make device_type const
mtd: make device_type const
mux: make device_type const
PCI: make device_type const
phy: tegra: make device_type const
platform/x86: wmi: make device_type const
remoteproc: make device_type const
s390/zcrypt: make device_type const
scsi: make device_type const
staging: greybus: make device_type const
usb: make device_type const

 drivers/edac/edac_mc_sysfs.c           | 8 ++++----
 drivers/edac/i7core_edac.c             | 4 ++--
 drivers/gpu/drm/drm_sysfs.c            | 2 +-
 drivers/gpu/drm/ttm/ttm_module.c       | 2 +-
 drivers/media/i2c/soc_camera/mt9t031.c | 2 +-
 drivers/media/rc/rc-main.c             | 2 +-
 drivers/misc/mei/bus.c                 | 2 +-
 drivers/mtd/mtdcore.c                  | 2 +-
 drivers/mux/mux-core.c                 | 2 +-
 drivers/pci/endpoint/pci-epf-core.c    | 4 ++--
 drivers/phy/tegra/xusb.c               | 4 ++--
 drivers/platform/x86/wmi.c             | 6 +++---
 drivers/remoteproc/remoteproc_core.c   | 2 +-
 drivers/s390/crypto/ap_card.c          | 2 +-
 drivers/s390/crypto/ap_queue.c         | 2 +-
 drivers/scsi/fcoe/fcoe_sysfs.c         | 4 ++--
 drivers/scsi/scsi_transport_iscsi.c    | 4 ++--
 drivers/staging/greybus/gbphy.c        | 2 +-
 drivers/usb/common/ulpi.c              | 2 +-
 19 files changed, 29 insertions(+), 29 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/15 EDAC: 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.

---
 drivers/edac/edac_mc_sysfs.c | 8 ++++----
 drivers/edac/i7core_edac.c   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/edac/edac_mc_sysfs.c +4 -4
index dbc6446..e4fcfa8 100644
@@ -304,7 +304,7 @@ static void csrow_attr_release(struct device *dev)
 	kfree(csrow);
 }
 
-static struct device_type csrow_attr_type = {
+static const struct device_type csrow_attr_type = {
 	.groups		= csrow_attr_groups,
 	.release	= csrow_attr_release,
 };
@@ -644,7 +644,7 @@ static void dimm_attr_release(struct device *dev)
 	kfree(dimm);
 }
 
-static struct device_type dimm_attr_type = {
+static const struct device_type dimm_attr_type = {
 	.groups		= dimm_attr_groups,
 	.release	= dimm_attr_release,
 };
@@ -920,7 +920,7 @@ static void mci_attr_release(struct device *dev)
 	kfree(mci);
 }
 
-static struct device_type mci_attr_type = {
+static const struct device_type mci_attr_type = {
 	.groups		= mci_attr_groups,
 	.release	= mci_attr_release,
 };
@@ -1074,7 +1074,7 @@ static void mc_attr_release(struct device *dev)
 	kfree(dev);
 }
 
-static struct device_type mc_attr_type = {
+static const struct device_type mc_attr_type = {
 	.release	= mc_attr_release,
 };
 /*
drivers/edac/i7core_edac.c +2 -2
index d36cc84..c16c3b9 100644
@@ -1094,7 +1094,7 @@ static void addrmatch_release(struct device *device)
 	kfree(device);
 }
 
-static struct device_type addrmatch_type = {
+static const struct device_type addrmatch_type = {
 	.groups		= addrmatch_groups,
 	.release	= addrmatch_release,
 };
@@ -1125,7 +1125,7 @@ static void all_channel_counts_release(struct device *device)
 	kfree(device);
 }
 
-static struct device_type all_channel_counts_type = {
+static const struct device_type all_channel_counts_type = {
 	.groups		= all_channel_counts_groups,
 	.release	= all_channel_counts_release,
 };
maintainer Applied
#2 lore raw

Re: [PATCH 01/15] EDAC: make device_type const

Quoted 9 lines · Bhumika Goyal

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

---
 drivers/edac/edac_mc_sysfs.c | 8 ++++----
 drivers/edac/i7core_edac.c   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

Applied, thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

A message that is not in the archive (sent off-list or not yet received): 1503130946-2854-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw

PATCH 1/15 EDAC: 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.

---
 drivers/edac/edac_mc_sysfs.c | 8 ++++----
 drivers/edac/i7core_edac.c   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/edac/edac_mc_sysfs.c +4 -4
index dbc6446..e4fcfa8 100644
@@ -304,7 +304,7 @@ static void csrow_attr_release(struct device *dev)
 	kfree(csrow);
 }
 
-static struct device_type csrow_attr_type = {
+static const struct device_type csrow_attr_type = {
 	.groups		= csrow_attr_groups,
 	.release	= csrow_attr_release,
 };
@@ -644,7 +644,7 @@ static void dimm_attr_release(struct device *dev)
 	kfree(dimm);
 }
 
-static struct device_type dimm_attr_type = {
+static const struct device_type dimm_attr_type = {
 	.groups		= dimm_attr_groups,
 	.release	= dimm_attr_release,
 };
@@ -920,7 +920,7 @@ static void mci_attr_release(struct device *dev)
 	kfree(mci);
 }
 
-static struct device_type mci_attr_type = {
+static const struct device_type mci_attr_type = {
 	.groups		= mci_attr_groups,
 	.release	= mci_attr_release,
 };
@@ -1074,7 +1074,7 @@ static void mc_attr_release(struct device *dev)
 	kfree(dev);
 }
 
-static struct device_type mc_attr_type = {
+static const struct device_type mc_attr_type = {
 	.release	= mc_attr_release,
 };
 /*
drivers/edac/i7core_edac.c +2 -2
index d36cc84..c16c3b9 100644
@@ -1094,7 +1094,7 @@ static void addrmatch_release(struct device *device)
 	kfree(device);
 }
 
-static struct device_type addrmatch_type = {
+static const struct device_type addrmatch_type = {
 	.groups		= addrmatch_groups,
 	.release	= addrmatch_release,
 };
@@ -1125,7 +1125,7 @@ static void all_channel_counts_release(struct device *device)
 	kfree(device);
 }
 
-static struct device_type all_channel_counts_type = {
+static const struct device_type all_channel_counts_type = {
 	.groups		= all_channel_counts_groups,
 	.release	= all_channel_counts_release,
 };
Signature · 1 line
1.9.1
#5 lore raw

PATCH 2/15 drm: make device_type const

In reply to a message not in the archive

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

---
 drivers/gpu/drm/drm_sysfs.c      | 2 +-
 drivers/gpu/drm/ttm/ttm_module.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_sysfs.c +1 -1
index 1c5b5ce..84e4ebe 100644
@@ -39,7 +39,7 @@
  * drm_connector_unregister().
  */
 
-static struct device_type drm_sysfs_device_minor = {
+static const struct device_type drm_sysfs_device_minor = {
 	.name = "drm_minor"
 };
 
drivers/gpu/drm/ttm/ttm_module.c +1 -1
index 66fc639..e6604e0 100644
@@ -37,7 +37,7 @@
 static DECLARE_WAIT_QUEUE_HEAD(exit_q);
 static atomic_t device_released;
 
-static struct device_type ttm_drm_class_type = {
+static const struct device_type ttm_drm_class_type = {
 	.name = "ttm",
 	/**
 	 * Add pm ops here.
Signature · 1 line
1.9.1
#6 lore raw

PATCH 3/15 i2c: make device_type const

In reply to a message not in the archive

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

---
 drivers/media/i2c/soc_camera/mt9t031.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/soc_camera/mt9t031.c +1 -1
index 714fb35..4802d30 100644
@@ -592,7 +592,7 @@ static int mt9t031_runtime_resume(struct device *dev)
 	.runtime_resume		= mt9t031_runtime_resume,
 };
 
-static struct device_type mt9t031_dev_type = {
+static const struct device_type mt9t031_dev_type = {
 	.name	= "MT9T031",
 	.pm	= &mt9t031_dev_pm_ops,
 };
Signature · 1 line
1.9.1
#7 lore raw

PATCH 4/15 rc: make device_type const

In reply to a message not in the archive

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

---
 drivers/media/rc/rc-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/rc-main.c +1 -1
index a9eba00..ea3da3e 100644
@@ -1532,7 +1532,7 @@ static RC_FILTER_ATTR(wakeup_filter_mask, S_IRUGO|S_IWUSR,
 	.attrs	= rc_dev_wakeup_filter_attrs,
 };
 
-static struct device_type rc_dev_type = {
+static const struct device_type rc_dev_type = {
 	.release	= rc_dev_release,
 	.uevent		= rc_dev_uevent,
 };
Signature · 1 line
1.9.1
#8 lore raw

PATCH 5/15 mei: make device_type const

In reply to a message not in the archive

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

---
 drivers/misc/mei/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/mei/bus.c +1 -1
index 40c7908..1ac10cb 100644
@@ -845,7 +845,7 @@ static void mei_cl_bus_dev_release(struct device *dev)
 	kfree(cldev);
 }
 
-static struct device_type mei_cl_device_type = {
+static const struct device_type mei_cl_device_type = {
 	.release	= mei_cl_bus_dev_release,
 };
 
Signature · 1 line
1.9.1
#9 lore raw

PATCH 6/15 mtd: make device_type const

In reply to a message not in the archive

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

---
 drivers/mtd/mtdcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdcore.c +1 -1
index f872a99..e7ea842 100644
@@ -340,7 +340,7 @@ static ssize_t mtd_bbtblocks_show(struct device *dev,
 };
 ATTRIBUTE_GROUPS(mtd);
 
-static struct device_type mtd_devtype = {
+static const struct device_type mtd_devtype = {
 	.name		= "mtd",
 	.groups		= mtd_groups,
 	.release	= mtd_release,
Signature · 8 lines
1.9.1

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
#10 lore raw

PATCH 6/15 mtd: make device_type const

In reply to a message not in the archive

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

---
 drivers/mtd/mtdcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdcore.c +1 -1
index f872a99..e7ea842 100644
@@ -340,7 +340,7 @@ static ssize_t mtd_bbtblocks_show(struct device *dev,
 };
 ATTRIBUTE_GROUPS(mtd);
 
-static struct device_type mtd_devtype = {
+static const struct device_type mtd_devtype = {
 	.name		= "mtd",
 	.groups		= mtd_groups,
 	.release	= mtd_release,
Signature · 1 line
1.9.1
#11 lore raw

PATCH 7/15 mux: make device_type const

In reply to a message not in the archive

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

---
 drivers/mux/mux-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mux/mux-core.c +1 -1
index 2fe96c4..68bd16d 100644
@@ -58,7 +58,7 @@ static void mux_chip_release(struct device *dev)
 	kfree(mux_chip);
 }
 
-static struct device_type mux_type = {
+static const struct device_type mux_type = {
 	.name = "mux-chip",
 	.release = mux_chip_release,
 };
Signature · 8 lines
1.9.1

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
#12 lore raw

PATCH 7/15 mux: make device_type const

In reply to a message not in the archive

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

---
 drivers/mux/mux-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mux/mux-core.c +1 -1
index 2fe96c4..68bd16d 100644
@@ -58,7 +58,7 @@ static void mux_chip_release(struct device *dev)
 	kfree(mux_chip);
 }
 
-static struct device_type mux_type = {
+static const struct device_type mux_type = {
 	.name = "mux-chip",
 	.release = mux_chip_release,
 };
Signature · 1 line
1.9.1
#13 lore raw

PATCH 8/15 PCI: make device_type const

In reply to a message not in the archive

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

---
 drivers/pci/endpoint/pci-epf-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/endpoint/pci-epf-core.c +2 -2
index 6877d6a..9d0de12 100644
@@ -27,7 +27,7 @@
 #include <linux/pci-ep-cfs.h>
 
 static struct bus_type pci_epf_bus_type;
-static struct device_type pci_epf_type;
+static const struct device_type pci_epf_type;
 
 /**
  * pci_epf_linkup() - Notify the function driver that EPC device has
@@ -275,7 +275,7 @@ static void pci_epf_dev_release(struct device *dev)
 	kfree(epf);
 }
 
-static struct device_type pci_epf_type = {
+static const struct device_type pci_epf_type = {
 	.release	= pci_epf_dev_release,
 };
 
Signature · 1 line
1.9.1
#14 lore raw

PATCH 9/15 phy: tegra: make device_type const

In reply to a message not in the archive

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

---
 drivers/phy/tegra/xusb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/tegra/xusb.c +2 -2
index 3cbcb25..bd3f1b6 100644
@@ -155,7 +155,7 @@ static void tegra_xusb_pad_release(struct device *dev)
 	pad->soc->ops->remove(pad);
 }
 
-static struct device_type tegra_xusb_pad_type = {
+static const struct device_type tegra_xusb_pad_type = {
 	.release = tegra_xusb_pad_release,
 };
 
@@ -512,7 +512,7 @@ static void tegra_xusb_port_release(struct device *dev)
 {
 }
 
-static struct device_type tegra_xusb_port_type = {
+static const struct device_type tegra_xusb_port_type = {
 	.release = tegra_xusb_port_release,
 };
 
Signature · 1 line
1.9.1
#15 lore raw

PATCH 10/15 platform/x86: wmi: make device_type const

In reply to a message not in the archive

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

---
 drivers/platform/x86/wmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/wmi.c +3 -3
index e32ba57..a37c253 100644
@@ -810,19 +810,19 @@ static int wmi_dev_remove(struct device *dev)
 	.remove = wmi_dev_remove,
 };
 
-static struct device_type wmi_type_event = {
+static const struct device_type wmi_type_event = {
 	.name = "event",
 	.groups = wmi_event_groups,
 	.release = wmi_dev_release,
 };
 
-static struct device_type wmi_type_method = {
+static const struct device_type wmi_type_method = {
 	.name = "method",
 	.groups = wmi_method_groups,
 	.release = wmi_dev_release,
 };
 
-static struct device_type wmi_type_data = {
+static const struct device_type wmi_type_data = {
 	.name = "data",
 	.groups = wmi_data_groups,
 	.release = wmi_dev_release,
Signature · 1 line
1.9.1
#16 lore raw

PATCH 11/15 remoteproc: make device_type const

In reply to a message not in the archive

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

---
 drivers/remoteproc/remoteproc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_core.c +1 -1
index 364ef28..48b2c5d 100644
@@ -1360,7 +1360,7 @@ static void rproc_type_release(struct device *dev)
 	kfree(rproc);
 }
 
-static struct device_type rproc_type = {
+static const struct device_type rproc_type = {
 	.name		= "remoteproc",
 	.release	= rproc_type_release,
 };
Signature · 8 lines
1.9.1

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
#17 lore raw

PATCH 12/15 s390/zcrypt: make device_type const

In reply to a message not in the archive

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

---
 drivers/s390/crypto/ap_card.c  | 2 +-
 drivers/s390/crypto/ap_queue.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/s390/crypto/ap_card.c +1 -1
index 836efac9..0329148 100644
@@ -153,7 +153,7 @@ static ssize_t ap_modalias_show(struct device *dev,
 	NULL
 };
 
-static struct device_type ap_card_type = {
+static const struct device_type ap_card_type = {
 	.name = "ap_card",
 	.groups = ap_card_dev_attr_groups,
 };
drivers/s390/crypto/ap_queue.c +1 -1
index 0f1a5d0..e2a85c26 100644
@@ -577,7 +577,7 @@ static ssize_t ap_interrupt_show(struct device *dev,
 	NULL
 };
 
-static struct device_type ap_queue_type = {
+static const struct device_type ap_queue_type = {
 	.name = "ap_queue",
 	.groups = ap_queue_dev_attr_groups,
 };
Signature · 1 line
1.9.1
#18 lore raw

PATCH 13/15 scsi: make device_type const

In reply to a message not in the archive

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

---
 drivers/scsi/fcoe/fcoe_sysfs.c      | 4 ++--
 drivers/scsi/scsi_transport_iscsi.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/fcoe/fcoe_sysfs.c +2 -2
index 9cf3d56..5c8310b 100644
@@ -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,
drivers/scsi/scsi_transport_iscsi.c +2 -2
index a424eae..b9513f8 100644
@@ -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,
Signature · 1 line
1.9.1
#19 lore raw

PATCH 14/15 staging: greybus: make device_type const

In reply to a message not in the archive

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

---
 drivers/staging/greybus/gbphy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/gbphy.c +1 -1
index 603de6f..80c1da8 100644
@@ -66,7 +66,7 @@ static int gb_gbphy_idle(struct device *dev)
 			   gb_gbphy_idle)
 };
 
-static struct device_type greybus_gbphy_dev_type = {
+static const struct device_type greybus_gbphy_dev_type = {
 	.name	 =	"gbphy_device",
 	.release =	gbphy_dev_release,
 	.pm	=	&gb_gbphy_pm_ops,
Signature · 8 lines
1.9.1

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
#20 lore raw

PATCH 15/15 usb: make device_type const

In reply to a message not in the archive

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

---
 drivers/usb/common/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/common/ulpi.c +1 -1
index 930e8f3..4aa5195 100644
@@ -135,7 +135,7 @@ static void ulpi_dev_release(struct device *dev)
 	kfree(to_ulpi_dev(dev));
 }
 
-static struct device_type ulpi_dev_type = {
+static const struct device_type ulpi_dev_type = {
 	.name = "ulpi_device",
 	.groups = ulpi_dev_attr_groups,
 	.release = ulpi_dev_release,
Signature · 1 line
1.9.1
#21 lore raw

PATCH 1/15 EDAC: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/edac/edac_mc_sysfs.c | 8 ++++----
 drivers/edac/i7core_edac.c   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/edac/edac_mc_sysfs.c +4 -4
index dbc6446..e4fcfa8 100644
@@ -304,7 +304,7 @@ static void csrow_attr_release(struct device *dev)
 	kfree(csrow);
 }
 
-static struct device_type csrow_attr_type = {
+static const struct device_type csrow_attr_type = {
 	.groups		= csrow_attr_groups,
 	.release	= csrow_attr_release,
 };
@@ -644,7 +644,7 @@ static void dimm_attr_release(struct device *dev)
 	kfree(dimm);
 }
 
-static struct device_type dimm_attr_type = {
+static const struct device_type dimm_attr_type = {
 	.groups		= dimm_attr_groups,
 	.release	= dimm_attr_release,
 };
@@ -920,7 +920,7 @@ static void mci_attr_release(struct device *dev)
 	kfree(mci);
 }
 
-static struct device_type mci_attr_type = {
+static const struct device_type mci_attr_type = {
 	.groups		= mci_attr_groups,
 	.release	= mci_attr_release,
 };
@@ -1074,7 +1074,7 @@ static void mc_attr_release(struct device *dev)
 	kfree(dev);
 }
 
-static struct device_type mc_attr_type = {
+static const struct device_type mc_attr_type = {
 	.release	= mc_attr_release,
 };
 /*
drivers/edac/i7core_edac.c +2 -2
index d36cc84..c16c3b9 100644
@@ -1094,7 +1094,7 @@ static void addrmatch_release(struct device *device)
 	kfree(device);
 }
 
-static struct device_type addrmatch_type = {
+static const struct device_type addrmatch_type = {
 	.groups		= addrmatch_groups,
 	.release	= addrmatch_release,
 };
@@ -1125,7 +1125,7 @@ static void all_channel_counts_release(struct device *device)
 	kfree(device);
 }
 
-static struct device_type all_channel_counts_type = {
+static const struct device_type all_channel_counts_type = {
 	.groups		= all_channel_counts_groups,
 	.release	= all_channel_counts_release,
 };
Signature · 1 line
1.9.1
#22 lore raw

PATCH 1/15 EDAC: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/edac/edac_mc_sysfs.c | 8 ++++----
 drivers/edac/i7core_edac.c   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/edac/edac_mc_sysfs.c +4 -4
index dbc6446..e4fcfa8 100644
@@ -304,7 +304,7 @@ static void csrow_attr_release(struct device *dev)
 	kfree(csrow);
 }
 
-static struct device_type csrow_attr_type = {
+static const struct device_type csrow_attr_type = {
 	.groups		= csrow_attr_groups,
 	.release	= csrow_attr_release,
 };
@@ -644,7 +644,7 @@ static void dimm_attr_release(struct device *dev)
 	kfree(dimm);
 }
 
-static struct device_type dimm_attr_type = {
+static const struct device_type dimm_attr_type = {
 	.groups		= dimm_attr_groups,
 	.release	= dimm_attr_release,
 };
@@ -920,7 +920,7 @@ static void mci_attr_release(struct device *dev)
 	kfree(mci);
 }
 
-static struct device_type mci_attr_type = {
+static const struct device_type mci_attr_type = {
 	.groups		= mci_attr_groups,
 	.release	= mci_attr_release,
 };
@@ -1074,7 +1074,7 @@ static void mc_attr_release(struct device *dev)
 	kfree(dev);
 }
 
-static struct device_type mc_attr_type = {
+static const struct device_type mc_attr_type = {
 	.release	= mc_attr_release,
 };
 /*
drivers/edac/i7core_edac.c +2 -2
index d36cc84..c16c3b9 100644
@@ -1094,7 +1094,7 @@ static void addrmatch_release(struct device *device)
 	kfree(device);
 }
 
-static struct device_type addrmatch_type = {
+static const struct device_type addrmatch_type = {
 	.groups		= addrmatch_groups,
 	.release	= addrmatch_release,
 };
@@ -1125,7 +1125,7 @@ static void all_channel_counts_release(struct device *device)
 	kfree(device);
 }
 
-static struct device_type all_channel_counts_type = {
+static const struct device_type all_channel_counts_type = {
 	.groups		= all_channel_counts_groups,
 	.release	= all_channel_counts_release,
 };
Signature · 1 line
1.9.1
#23 lore raw

PATCH 2/15 drm: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/gpu/drm/drm_sysfs.c      | 2 +-
 drivers/gpu/drm/ttm/ttm_module.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_sysfs.c +1 -1
index 1c5b5ce..84e4ebe 100644
@@ -39,7 +39,7 @@
  * drm_connector_unregister().
  */
 
-static struct device_type drm_sysfs_device_minor = {
+static const struct device_type drm_sysfs_device_minor = {
 	.name = "drm_minor"
 };
 
drivers/gpu/drm/ttm/ttm_module.c +1 -1
index 66fc639..e6604e0 100644
@@ -37,7 +37,7 @@
 static DECLARE_WAIT_QUEUE_HEAD(exit_q);
 static atomic_t device_released;
 
-static struct device_type ttm_drm_class_type = {
+static const struct device_type ttm_drm_class_type = {
 	.name = "ttm",
 	/**
 	 * Add pm ops here.
Signature · 1 line
1.9.1
#24 lore raw

Re: [PATCH 02/15] drm: make device_type const

Quoted 3 lines · Bhumika Goyal

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

I can't apply this, it's missing your s-o-b line. You can just replay with that.

Thanks, Daniel

Quoted 38 lines
---
 drivers/gpu/drm/drm_sysfs.c      | 2 +-
 drivers/gpu/drm/ttm/ttm_module.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_sysfs.c +1 -1
index 1c5b5ce..84e4ebe 100644
@@ -39,7 +39,7 @@
  * drm_connector_unregister().
  */
 
-static struct device_type drm_sysfs_device_minor = {
+static const struct device_type drm_sysfs_device_minor = {
 	.name = "drm_minor"
 };
 
drivers/gpu/drm/ttm/ttm_module.c +1 -1
index 66fc639..e6604e0 100644
@@ -37,7 +37,7 @@
 static DECLARE_WAIT_QUEUE_HEAD(exit_q);
 static atomic_t device_released;
 
-static struct device_type ttm_drm_class_type = {
+static const struct device_type ttm_drm_class_type = {
 	.name = "ttm",
 	/**
 	 * Add pm ops here.
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
#25 lore raw

PATCH 2/15 drm: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/gpu/drm/drm_sysfs.c      | 2 +-
 drivers/gpu/drm/ttm/ttm_module.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_sysfs.c +1 -1
index 1c5b5ce..84e4ebe 100644
@@ -39,7 +39,7 @@
  * drm_connector_unregister().
  */
 
-static struct device_type drm_sysfs_device_minor = {
+static const struct device_type drm_sysfs_device_minor = {
 	.name = "drm_minor"
 };
 
drivers/gpu/drm/ttm/ttm_module.c +1 -1
index 66fc639..e6604e0 100644
@@ -37,7 +37,7 @@
 static DECLARE_WAIT_QUEUE_HEAD(exit_q);
 static atomic_t device_released;
 
-static struct device_type ttm_drm_class_type = {
+static const struct device_type ttm_drm_class_type = {
 	.name = "ttm",
 	/**
 	 * Add pm ops here.
Signature · 1 line
1.9.1
#26 lore raw

PATCH 2/15 drm: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/gpu/drm/drm_sysfs.c      | 2 +-
 drivers/gpu/drm/ttm/ttm_module.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_sysfs.c +1 -1
index 1c5b5ce..84e4ebe 100644
@@ -39,7 +39,7 @@
  * drm_connector_unregister().
  */
 
-static struct device_type drm_sysfs_device_minor = {
+static const struct device_type drm_sysfs_device_minor = {
 	.name = "drm_minor"
 };
 
drivers/gpu/drm/ttm/ttm_module.c +1 -1
index 66fc639..e6604e0 100644
@@ -37,7 +37,7 @@
 static DECLARE_WAIT_QUEUE_HEAD(exit_q);
 static atomic_t device_released;
 
-static struct device_type ttm_drm_class_type = {
+static const struct device_type ttm_drm_class_type = {
 	.name = "ttm",
 	/**
 	 * Add pm ops here.
Signature · 1 line
1.9.1
#27 lore raw

PATCH 3/15 i2c: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/media/i2c/soc_camera/mt9t031.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/soc_camera/mt9t031.c +1 -1
index 714fb35..4802d30 100644
@@ -592,7 +592,7 @@ static int mt9t031_runtime_resume(struct device *dev)
 	.runtime_resume		= mt9t031_runtime_resume,
 };
 
-static struct device_type mt9t031_dev_type = {
+static const struct device_type mt9t031_dev_type = {
 	.name	= "MT9T031",
 	.pm	= &mt9t031_dev_pm_ops,
 };
Signature · 1 line
1.9.1
Acked-by on v1 3/15
#28 lore raw

Re: [PATCH 03/15] [media] i2c: make device_type const

Quoted 5 lines · Bhumika Goyal

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

Thanks
Guennadi

Quoted 20 lines
---
 drivers/media/i2c/soc_camera/mt9t031.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/soc_camera/mt9t031.c +1 -1
index 714fb35..4802d30 100644
@@ -592,7 +592,7 @@ static int mt9t031_runtime_resume(struct device *dev)
 	.runtime_resume		= mt9t031_runtime_resume,
 };
 
-static struct device_type mt9t031_dev_type = {
+static const struct device_type mt9t031_dev_type = {
 	.name	= "MT9T031",
 	.pm	= &mt9t031_dev_pm_ops,
 };
Signature · 1 line
1.9.1

---
To unsubscribe from this list: send the line "unsubscribe linux-edac" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#29 lore raw

PATCH 3/15 i2c: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/media/i2c/soc_camera/mt9t031.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/soc_camera/mt9t031.c +1 -1
index 714fb35..4802d30 100644
@@ -592,7 +592,7 @@ static int mt9t031_runtime_resume(struct device *dev)
 	.runtime_resume		= mt9t031_runtime_resume,
 };
 
-static struct device_type mt9t031_dev_type = {
+static const struct device_type mt9t031_dev_type = {
 	.name	= "MT9T031",
 	.pm	= &mt9t031_dev_pm_ops,
 };
Signature · 1 line
1.9.1
#30 lore raw

PATCH 3/15 i2c: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/media/i2c/soc_camera/mt9t031.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/soc_camera/mt9t031.c +1 -1
index 714fb35..4802d30 100644
@@ -592,7 +592,7 @@ static int mt9t031_runtime_resume(struct device *dev)
 	.runtime_resume		= mt9t031_runtime_resume,
 };
 
-static struct device_type mt9t031_dev_type = {
+static const struct device_type mt9t031_dev_type = {
 	.name	= "MT9T031",
 	.pm	= &mt9t031_dev_pm_ops,
 };
Signature · 1 line
1.9.1
#31 lore raw

PATCH 4/15 rc: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/media/rc/rc-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/rc-main.c +1 -1
index a9eba00..ea3da3e 100644
@@ -1532,7 +1532,7 @@ static RC_FILTER_ATTR(wakeup_filter_mask, S_IRUGO|S_IWUSR,
 	.attrs	= rc_dev_wakeup_filter_attrs,
 };
 
-static struct device_type rc_dev_type = {
+static const struct device_type rc_dev_type = {
 	.release	= rc_dev_release,
 	.uevent		= rc_dev_uevent,
 };
#32 lore raw

PATCH 4/15 rc: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/media/rc/rc-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/rc-main.c +1 -1
index a9eba00..ea3da3e 100644
@@ -1532,7 +1532,7 @@ static RC_FILTER_ATTR(wakeup_filter_mask, S_IRUGO|S_IWUSR,
 	.attrs	= rc_dev_wakeup_filter_attrs,
 };
 
-static struct device_type rc_dev_type = {
+static const struct device_type rc_dev_type = {
 	.release	= rc_dev_release,
 	.uevent		= rc_dev_uevent,
 };
Signature · 1 line
1.9.1
#33 lore raw

PATCH 4/15 rc: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/media/rc/rc-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/rc-main.c +1 -1
index a9eba00..ea3da3e 100644
@@ -1532,7 +1532,7 @@ static RC_FILTER_ATTR(wakeup_filter_mask, S_IRUGO|S_IWUSR,
 	.attrs	= rc_dev_wakeup_filter_attrs,
 };
 
-static struct device_type rc_dev_type = {
+static const struct device_type rc_dev_type = {
 	.release	= rc_dev_release,
 	.uevent		= rc_dev_uevent,
 };
Signature · 1 line
1.9.1
#34 lore raw

PATCH 5/15 mei: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/misc/mei/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/mei/bus.c +1 -1
index 40c7908..1ac10cb 100644
@@ -845,7 +845,7 @@ static void mei_cl_bus_dev_release(struct device *dev)
 	kfree(cldev);
 }
 
-static struct device_type mei_cl_device_type = {
+static const struct device_type mei_cl_device_type = {
 	.release	= mei_cl_bus_dev_release,
 };
 
Signature · 1 line
1.9.1
#35 lore raw

RE: [PATCH 05/15] mei: make device_type const

Quoted 18 lines

Subject: [PATCH 05/15] mei: make device_type const

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

---
 drivers/misc/mei/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/mei/bus.c index renamed from drivers/misc/mei/bus.c +0 -0

40c7908..1ac10cb 100644

drivers/misc/mei/bus.c static void mei_cl_bus_dev_release(struct device · line 851

Quoted 8 lines
drivers/misc/mei/bus.c +1 -1
@@ -845,7 +845,7 @@ static void mei_cl_bus_dev_release(struct device
 *dev)
 	kfree(cldev);
 }
 
-static struct device_type mei_cl_device_type = {
+static const struct device_type mei_cl_device_type = {
 	.release	= mei_cl_bus_dev_release,
 };

LGTM
Thanks
Tomas

#36 lore raw

PATCH 5/15 mei: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/misc/mei/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/mei/bus.c +1 -1
index 40c7908..1ac10cb 100644
@@ -845,7 +845,7 @@ static void mei_cl_bus_dev_release(struct device *dev)
 	kfree(cldev);
 }
 
-static struct device_type mei_cl_device_type = {
+static const struct device_type mei_cl_device_type = {
 	.release	= mei_cl_bus_dev_release,
 };
 
Signature · 1 line
1.9.1
#37 lore raw

PATCH 5/15 mei: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/misc/mei/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/mei/bus.c +1 -1
index 40c7908..1ac10cb 100644
@@ -845,7 +845,7 @@ static void mei_cl_bus_dev_release(struct device *dev)
 	kfree(cldev);
 }
 
-static struct device_type mei_cl_device_type = {
+static const struct device_type mei_cl_device_type = {
 	.release	= mei_cl_bus_dev_release,
 };
 
Signature · 1 line
1.9.1
#38 lore raw

PATCH 6/15 mtd: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/mtd/mtdcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdcore.c +1 -1
index f872a99..e7ea842 100644
@@ -340,7 +340,7 @@ static ssize_t mtd_bbtblocks_show(struct device *dev,
 };
 ATTRIBUTE_GROUPS(mtd);
 
-static struct device_type mtd_devtype = {
+static const struct device_type mtd_devtype = {
 	.name		= "mtd",
 	.groups		= mtd_groups,
 	.release	= mtd_release,
#39 lore raw

Re: [PATCH 06/15] mtd: make device_type const

Quoted 4 lines · Bhumika Goyal

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

Applied to l2-mtd/master.

Thanks,

Boris

Quoted 18 lines
---
 drivers/mtd/mtdcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdcore.c +1 -1
index f872a99..e7ea842 100644
@@ -340,7 +340,7 @@ static ssize_t mtd_bbtblocks_show(struct device *dev,
 };
 ATTRIBUTE_GROUPS(mtd);
 
-static struct device_type mtd_devtype = {
+static const struct device_type mtd_devtype = {
 	.name		= "mtd",
 	.groups		= mtd_groups,
 	.release	= mtd_release,
#40 lore raw

PATCH 6/15 mtd: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/mtd/mtdcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdcore.c +1 -1
index f872a99..e7ea842 100644
@@ -340,7 +340,7 @@ static ssize_t mtd_bbtblocks_show(struct device *dev,
 };
 ATTRIBUTE_GROUPS(mtd);
 
-static struct device_type mtd_devtype = {
+static const struct device_type mtd_devtype = {
 	.name		= "mtd",
 	.groups		= mtd_groups,
 	.release	= mtd_release,
Signature · 6 lines
1.9.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#41 lore raw

PATCH 6/15 mtd: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/mtd/mtdcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdcore.c +1 -1
index f872a99..e7ea842 100644
@@ -340,7 +340,7 @@ static ssize_t mtd_bbtblocks_show(struct device *dev,
 };
 ATTRIBUTE_GROUPS(mtd);
 
-static struct device_type mtd_devtype = {
+static const struct device_type mtd_devtype = {
 	.name		= "mtd",
 	.groups		= mtd_groups,
 	.release	= mtd_release,
Signature · 1 line
1.9.1
#42 lore raw

PATCH 6/15 mtd: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/mtd/mtdcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdcore.c +1 -1
index f872a99..e7ea842 100644
@@ -340,7 +340,7 @@ static ssize_t mtd_bbtblocks_show(struct device *dev,
 };
 ATTRIBUTE_GROUPS(mtd);
 
-static struct device_type mtd_devtype = {
+static const struct device_type mtd_devtype = {
 	.name		= "mtd",
 	.groups		= mtd_groups,
 	.release	= mtd_release,
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#43 lore raw

PATCH 6/15 mtd: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/mtd/mtdcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdcore.c +1 -1
index f872a99..e7ea842 100644
@@ -340,7 +340,7 @@ static ssize_t mtd_bbtblocks_show(struct device *dev,
 };
 ATTRIBUTE_GROUPS(mtd);
 
-static struct device_type mtd_devtype = {
+static const struct device_type mtd_devtype = {
 	.name		= "mtd",
 	.groups		= mtd_groups,
 	.release	= mtd_release,
Signature · 1 line
1.9.1
#44 lore raw

PATCH 7/15 mux: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/mux/mux-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mux/mux-core.c +1 -1
index 2fe96c4..68bd16d 100644
@@ -58,7 +58,7 @@ static void mux_chip_release(struct device *dev)
 	kfree(mux_chip);
 }
 
-static struct device_type mux_type = {
+static const struct device_type mux_type = {
 	.name = "mux-chip",
 	.release = mux_chip_release,
 };
#45 lore raw

PATCH 7/15 mux: make device_type const

From: Bhumika Goyal <[email protected]>

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

---
 drivers/mux/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi Greg!

Here's a rebased version, handling the mux-core.c -> core.c rename.

Cheers,
Peter

drivers/mux/core.c +1 -1
index aabfb1549d4e..2260063b0ea8 100644
@@ -58,7 +58,7 @@ static void mux_chip_release(struct device *dev)
 	kfree(mux_chip);
 }
 
-static struct device_type mux_type = {
+static const struct device_type mux_type = {
 	.name = "mux-chip",
 	.release = mux_chip_release,
 };
Signature · 1 line
2.11.0
#46 lore raw

PATCH 7/15 mux: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/mux/mux-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mux/mux-core.c +1 -1
index 2fe96c4..68bd16d 100644
@@ -58,7 +58,7 @@ static void mux_chip_release(struct device *dev)
 	kfree(mux_chip);
 }
 
-static struct device_type mux_type = {
+static const struct device_type mux_type = {
 	.name = "mux-chip",
 	.release = mux_chip_release,
 };
Signature · 1 line
1.9.1
#47 lore raw

PATCH 7/15 mux: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/mux/mux-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mux/mux-core.c +1 -1
index 2fe96c4..68bd16d 100644
@@ -58,7 +58,7 @@ static void mux_chip_release(struct device *dev)
 	kfree(mux_chip);
 }
 
-static struct device_type mux_type = {
+static const struct device_type mux_type = {
 	.name = "mux-chip",
 	.release = mux_chip_release,
 };
Signature · 6 lines
1.9.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#48 lore raw

PATCH 7/15 mux: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/mux/mux-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mux/mux-core.c +1 -1
index 2fe96c4..68bd16d 100644
@@ -58,7 +58,7 @@ static void mux_chip_release(struct device *dev)
 	kfree(mux_chip);
 }
 
-static struct device_type mux_type = {
+static const struct device_type mux_type = {
 	.name = "mux-chip",
 	.release = mux_chip_release,
 };
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#49 lore raw

PATCH 7/15 mux: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/mux/mux-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mux/mux-core.c +1 -1
index 2fe96c4..68bd16d 100644
@@ -58,7 +58,7 @@ static void mux_chip_release(struct device *dev)
 	kfree(mux_chip);
 }
 
-static struct device_type mux_type = {
+static const struct device_type mux_type = {
 	.name = "mux-chip",
 	.release = mux_chip_release,
 };
Signature · 1 line
1.9.1
#50 lore raw

PATCH 8/15 PCI: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/pci/endpoint/pci-epf-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/endpoint/pci-epf-core.c +2 -2
index 6877d6a..9d0de12 100644
@@ -27,7 +27,7 @@
 #include <linux/pci-ep-cfs.h>
 
 static struct bus_type pci_epf_bus_type;
-static struct device_type pci_epf_type;
+static const struct device_type pci_epf_type;
 
 /**
  * pci_epf_linkup() - Notify the function driver that EPC device has
@@ -275,7 +275,7 @@ static void pci_epf_dev_release(struct device *dev)
 	kfree(epf);
 }
 
-static struct device_type pci_epf_type = {
+static const struct device_type pci_epf_type = {
 	.release	= pci_epf_dev_release,
 };
 
Signature · 1 line
1.9.1
#51 lore raw

Re: [PATCH 08/15] PCI: make device_type const

Quoted 5 lines · Bhumika Goyal

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

Applied to pci/misc for v4.14, thanks!

Quoted 29 lines
---
 drivers/pci/endpoint/pci-epf-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/endpoint/pci-epf-core.c +2 -2
index 6877d6a..9d0de12 100644
@@ -27,7 +27,7 @@
 #include <linux/pci-ep-cfs.h>
 
 static struct bus_type pci_epf_bus_type;
-static struct device_type pci_epf_type;
+static const struct device_type pci_epf_type;
 
 /**
  * pci_epf_linkup() - Notify the function driver that EPC device has
@@ -275,7 +275,7 @@ static void pci_epf_dev_release(struct device *dev)
 	kfree(epf);
 }
 
-static struct device_type pci_epf_type = {
+static const struct device_type pci_epf_type = {
 	.release	= pci_epf_dev_release,
 };
 
Signature · 1 line
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#52 lore raw

PATCH 8/15 PCI: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/pci/endpoint/pci-epf-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/endpoint/pci-epf-core.c +2 -2
index 6877d6a..9d0de12 100644
@@ -27,7 +27,7 @@
 #include <linux/pci-ep-cfs.h>
 
 static struct bus_type pci_epf_bus_type;
-static struct device_type pci_epf_type;
+static const struct device_type pci_epf_type;
 
 /**
  * pci_epf_linkup() - Notify the function driver that EPC device has
@@ -275,7 +275,7 @@ static void pci_epf_dev_release(struct device *dev)
 	kfree(epf);
 }
 
-static struct device_type pci_epf_type = {
+static const struct device_type pci_epf_type = {
 	.release	= pci_epf_dev_release,
 };
 
Signature · 1 line
1.9.1
#53 lore raw

PATCH 8/15 PCI: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/pci/endpoint/pci-epf-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/endpoint/pci-epf-core.c +2 -2
index 6877d6a..9d0de12 100644
@@ -27,7 +27,7 @@
 #include <linux/pci-ep-cfs.h>
 
 static struct bus_type pci_epf_bus_type;
-static struct device_type pci_epf_type;
+static const struct device_type pci_epf_type;
 
 /**
  * pci_epf_linkup() - Notify the function driver that EPC device has
@@ -275,7 +275,7 @@ static void pci_epf_dev_release(struct device *dev)
 	kfree(epf);
 }
 
-static struct device_type pci_epf_type = {
+static const struct device_type pci_epf_type = {
 	.release	= pci_epf_dev_release,
 };
 
Signature · 1 line
1.9.1
#54 lore raw

PATCH 9/15 phy: tegra: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/phy/tegra/xusb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/tegra/xusb.c +2 -2
index 3cbcb25..bd3f1b6 100644
@@ -155,7 +155,7 @@ static void tegra_xusb_pad_release(struct device *dev)
 	pad->soc->ops->remove(pad);
 }
 
-static struct device_type tegra_xusb_pad_type = {
+static const struct device_type tegra_xusb_pad_type = {
 	.release = tegra_xusb_pad_release,
 };
 
@@ -512,7 +512,7 @@ static void tegra_xusb_port_release(struct device *dev)
 {
 }
 
-static struct device_type tegra_xusb_port_type = {
+static const struct device_type tegra_xusb_port_type = {
 	.release = tegra_xusb_port_release,
 };
 
Signature · 1 line
1.9.1
#55 lore raw

PATCH 9/15 phy: tegra: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/phy/tegra/xusb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/tegra/xusb.c +2 -2
index 3cbcb25..bd3f1b6 100644
@@ -155,7 +155,7 @@ static void tegra_xusb_pad_release(struct device *dev)
 	pad->soc->ops->remove(pad);
 }
 
-static struct device_type tegra_xusb_pad_type = {
+static const struct device_type tegra_xusb_pad_type = {
 	.release = tegra_xusb_pad_release,
 };
 
@@ -512,7 +512,7 @@ static void tegra_xusb_port_release(struct device *dev)
 {
 }
 
-static struct device_type tegra_xusb_port_type = {
+static const struct device_type tegra_xusb_port_type = {
 	.release = tegra_xusb_port_release,
 };
 
Signature · 1 line
1.9.1
#56 lore raw

PATCH 9/15 phy: tegra: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/phy/tegra/xusb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/tegra/xusb.c +2 -2
index 3cbcb25..bd3f1b6 100644
@@ -155,7 +155,7 @@ static void tegra_xusb_pad_release(struct device *dev)
 	pad->soc->ops->remove(pad);
 }
 
-static struct device_type tegra_xusb_pad_type = {
+static const struct device_type tegra_xusb_pad_type = {
 	.release = tegra_xusb_pad_release,
 };
 
@@ -512,7 +512,7 @@ static void tegra_xusb_port_release(struct device *dev)
 {
 }
 
-static struct device_type tegra_xusb_port_type = {
+static const struct device_type tegra_xusb_port_type = {
 	.release = tegra_xusb_port_release,
 };
 
Signature · 1 line
1.9.1
#57 lore raw

PATCH 10/15 platform/x86: wmi: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/platform/x86/wmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/wmi.c +3 -3
index e32ba57..a37c253 100644
@@ -810,19 +810,19 @@ static int wmi_dev_remove(struct device *dev)
 	.remove = wmi_dev_remove,
 };
 
-static struct device_type wmi_type_event = {
+static const struct device_type wmi_type_event = {
 	.name = "event",
 	.groups = wmi_event_groups,
 	.release = wmi_dev_release,
 };
 
-static struct device_type wmi_type_method = {
+static const struct device_type wmi_type_method = {
 	.name = "method",
 	.groups = wmi_method_groups,
 	.release = wmi_dev_release,
 };
 
-static struct device_type wmi_type_data = {
+static const struct device_type wmi_type_data = {
 	.name = "data",
 	.groups = wmi_data_groups,
 	.release = wmi_dev_release,
#58 lore raw

Re: [PATCH 10/15] platform/x86: wmi: make device_type const

Quoted 4 lines · Bhumika Goyal

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

Please, stop spamming so many people and MLs with no relation to the subsystem!

Now, resend with reduced Cc (see headers) and don't forget to include Andy Lutomirski

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#59 lore raw

Re: [PATCH 10/15] platform/x86: wmi: make device_type const

Quoted 8 lines · Andy Shevchenko
Quoted 4 lines · Bhumika Goyal

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

Please, stop spamming so many people and MLs with no relation to the subsystem!

Sorry, for the inconvenience.

Quoted 3 lines

Now, resend with reduced Cc (see headers) and don't forget to include Andy Lutomirski

Yes.

Thanks,
Bhumika

Quoted 4 lines

--
With Best Regards,
Andy Shevchenko

#60 lore raw

PATCH 10/15 platform/x86: wmi: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/platform/x86/wmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/wmi.c +3 -3
index e32ba57..a37c253 100644
@@ -810,19 +810,19 @@ static int wmi_dev_remove(struct device *dev)
 	.remove = wmi_dev_remove,
 };
 
-static struct device_type wmi_type_event = {
+static const struct device_type wmi_type_event = {
 	.name = "event",
 	.groups = wmi_event_groups,
 	.release = wmi_dev_release,
 };
 
-static struct device_type wmi_type_method = {
+static const struct device_type wmi_type_method = {
 	.name = "method",
 	.groups = wmi_method_groups,
 	.release = wmi_dev_release,
 };
 
-static struct device_type wmi_type_data = {
+static const struct device_type wmi_type_data = {
 	.name = "data",
 	.groups = wmi_data_groups,
 	.release = wmi_dev_release,
Signature · 1 line
1.9.1
#61 lore raw

PATCH 10/15 platform/x86: wmi: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/platform/x86/wmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/wmi.c +3 -3
index e32ba57..a37c253 100644
@@ -810,19 +810,19 @@ static int wmi_dev_remove(struct device *dev)
 	.remove = wmi_dev_remove,
 };
 
-static struct device_type wmi_type_event = {
+static const struct device_type wmi_type_event = {
 	.name = "event",
 	.groups = wmi_event_groups,
 	.release = wmi_dev_release,
 };
 
-static struct device_type wmi_type_method = {
+static const struct device_type wmi_type_method = {
 	.name = "method",
 	.groups = wmi_method_groups,
 	.release = wmi_dev_release,
 };
 
-static struct device_type wmi_type_data = {
+static const struct device_type wmi_type_data = {
 	.name = "data",
 	.groups = wmi_data_groups,
 	.release = wmi_dev_release,
Signature · 1 line
1.9.1
#62 lore raw

PATCH 11/15 remoteproc: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/remoteproc/remoteproc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_core.c +1 -1
index 364ef28..48b2c5d 100644
@@ -1360,7 +1360,7 @@ static void rproc_type_release(struct device *dev)
 	kfree(rproc);
 }
 
-static struct device_type rproc_type = {
+static const struct device_type rproc_type = {
 	.name		= "remoteproc",
 	.release	= rproc_type_release,
 };
#63 lore raw

Re: [PATCH 11/15] remoteproc: make device_type const

Quoted 5 lines · Bhumika Goyal

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

Applied, thanks.

Regards,
Bjorn

Quoted 20 lines
---
 drivers/remoteproc/remoteproc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_core.c +1 -1
index 364ef28..48b2c5d 100644
@@ -1360,7 +1360,7 @@ static void rproc_type_release(struct device *dev)
 	kfree(rproc);
 }
 
-static struct device_type rproc_type = {
+static const struct device_type rproc_type = {
 	.name		= "remoteproc",
 	.release	= rproc_type_release,
 };
Signature · 1 line
1.9.1
#64 lore raw

PATCH 11/15 remoteproc: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/remoteproc/remoteproc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_core.c +1 -1
index 364ef28..48b2c5d 100644
@@ -1360,7 +1360,7 @@ static void rproc_type_release(struct device *dev)
 	kfree(rproc);
 }
 
-static struct device_type rproc_type = {
+static const struct device_type rproc_type = {
 	.name		= "remoteproc",
 	.release	= rproc_type_release,
 };
Signature · 1 line
1.9.1
#65 lore raw

PATCH 11/15 remoteproc: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/remoteproc/remoteproc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_core.c +1 -1
index 364ef28..48b2c5d 100644
@@ -1360,7 +1360,7 @@ static void rproc_type_release(struct device *dev)
 	kfree(rproc);
 }
 
-static struct device_type rproc_type = {
+static const struct device_type rproc_type = {
 	.name		= "remoteproc",
 	.release	= rproc_type_release,
 };
Signature · 6 lines
1.9.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#66 lore raw

PATCH 11/15 remoteproc: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/remoteproc/remoteproc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_core.c +1 -1
index 364ef28..48b2c5d 100644
@@ -1360,7 +1360,7 @@ static void rproc_type_release(struct device *dev)
 	kfree(rproc);
 }
 
-static struct device_type rproc_type = {
+static const struct device_type rproc_type = {
 	.name		= "remoteproc",
 	.release	= rproc_type_release,
 };
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#67 lore raw

PATCH 11/15 remoteproc: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/remoteproc/remoteproc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_core.c +1 -1
index 364ef28..48b2c5d 100644
@@ -1360,7 +1360,7 @@ static void rproc_type_release(struct device *dev)
 	kfree(rproc);
 }
 
-static struct device_type rproc_type = {
+static const struct device_type rproc_type = {
 	.name		= "remoteproc",
 	.release	= rproc_type_release,
 };
Signature · 1 line
1.9.1
#68 lore raw

PATCH 11/15 remoteproc: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/remoteproc/remoteproc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_core.c +1 -1
index 364ef28..48b2c5d 100644
@@ -1360,7 +1360,7 @@ static void rproc_type_release(struct device *dev)
 	kfree(rproc);
 }
 
-static struct device_type rproc_type = {
+static const struct device_type rproc_type = {
 	.name		= "remoteproc",
 	.release	= rproc_type_release,
 };
Signature · 1 line
1.9.1
#69 lore raw

PATCH 12/15 s390/zcrypt: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/s390/crypto/ap_card.c  | 2 +-
 drivers/s390/crypto/ap_queue.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/s390/crypto/ap_card.c +1 -1
index 836efac9..0329148 100644
@@ -153,7 +153,7 @@ static ssize_t ap_modalias_show(struct device *dev,
 	NULL
 };
 
-static struct device_type ap_card_type = {
+static const struct device_type ap_card_type = {
 	.name = "ap_card",
 	.groups = ap_card_dev_attr_groups,
 };
drivers/s390/crypto/ap_queue.c +1 -1
index 0f1a5d0..e2a85c26 100644
@@ -577,7 +577,7 @@ static ssize_t ap_interrupt_show(struct device *dev,
 	NULL
 };
 
-static struct device_type ap_queue_type = {
+static const struct device_type ap_queue_type = {
 	.name = "ap_queue",
 	.groups = ap_queue_dev_attr_groups,
 };
Signature · 1 line
1.9.1
#70 lore raw

PATCH 12/15 s390/zcrypt: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/s390/crypto/ap_card.c  | 2 +-
 drivers/s390/crypto/ap_queue.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/s390/crypto/ap_card.c +1 -1
index 836efac9..0329148 100644
@@ -153,7 +153,7 @@ static ssize_t ap_modalias_show(struct device *dev,
 	NULL
 };
 
-static struct device_type ap_card_type = {
+static const struct device_type ap_card_type = {
 	.name = "ap_card",
 	.groups = ap_card_dev_attr_groups,
 };
drivers/s390/crypto/ap_queue.c +1 -1
index 0f1a5d0..e2a85c26 100644
@@ -577,7 +577,7 @@ static ssize_t ap_interrupt_show(struct device *dev,
 	NULL
 };
 
-static struct device_type ap_queue_type = {
+static const struct device_type ap_queue_type = {
 	.name = "ap_queue",
 	.groups = ap_queue_dev_attr_groups,
 };
Signature · 1 line
1.9.1
#71 lore raw

PATCH 12/15 s390/zcrypt: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/s390/crypto/ap_card.c  | 2 +-
 drivers/s390/crypto/ap_queue.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/s390/crypto/ap_card.c +1 -1
index 836efac9..0329148 100644
@@ -153,7 +153,7 @@ static ssize_t ap_modalias_show(struct device *dev,
 	NULL
 };
 
-static struct device_type ap_card_type = {
+static const struct device_type ap_card_type = {
 	.name = "ap_card",
 	.groups = ap_card_dev_attr_groups,
 };
drivers/s390/crypto/ap_queue.c +1 -1
index 0f1a5d0..e2a85c26 100644
@@ -577,7 +577,7 @@ static ssize_t ap_interrupt_show(struct device *dev,
 	NULL
 };
 
-static struct device_type ap_queue_type = {
+static const struct device_type ap_queue_type = {
 	.name = "ap_queue",
 	.groups = ap_queue_dev_attr_groups,
 };
Signature · 1 line
1.9.1
#72 lore raw

PATCH 13/15 scsi: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/scsi/fcoe/fcoe_sysfs.c      | 4 ++--
 drivers/scsi/scsi_transport_iscsi.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/fcoe/fcoe_sysfs.c +2 -2
index 9cf3d56..5c8310b 100644
@@ -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,
drivers/scsi/scsi_transport_iscsi.c +2 -2
index a424eae..b9513f8 100644
@@ -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,
Signature · 1 line
1.9.1
#73 lore raw

Re: [PATCH 13/15] scsi: make device_type const

Bhumika,

Quoted 2 lines

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!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#74 lore raw

PATCH 13/15 scsi: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/scsi/fcoe/fcoe_sysfs.c      | 4 ++--
 drivers/scsi/scsi_transport_iscsi.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/fcoe/fcoe_sysfs.c +2 -2
index 9cf3d56..5c8310b 100644
@@ -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,
drivers/scsi/scsi_transport_iscsi.c +2 -2
index a424eae..b9513f8 100644
@@ -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,
Signature · 1 line
1.9.1
#75 lore raw

PATCH 13/15 scsi: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/scsi/fcoe/fcoe_sysfs.c      | 4 ++--
 drivers/scsi/scsi_transport_iscsi.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/fcoe/fcoe_sysfs.c +2 -2
index 9cf3d56..5c8310b 100644
@@ -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,
drivers/scsi/scsi_transport_iscsi.c +2 -2
index a424eae..b9513f8 100644
@@ -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,
Signature · 1 line
1.9.1
#76 lore raw

PATCH 14/15 staging: greybus: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/staging/greybus/gbphy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/gbphy.c +1 -1
index 603de6f..80c1da8 100644
@@ -66,7 +66,7 @@ static int gb_gbphy_idle(struct device *dev)
 			   gb_gbphy_idle)
 };
 
-static struct device_type greybus_gbphy_dev_type = {
+static const struct device_type greybus_gbphy_dev_type = {
 	.name	 =	"gbphy_device",
 	.release =	gbphy_dev_release,
 	.pm	=	&gb_gbphy_pm_ops,
#77 lore raw

PATCH 14/15 staging: greybus: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/staging/greybus/gbphy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/gbphy.c +1 -1
index 603de6f..80c1da8 100644
@@ -66,7 +66,7 @@ static int gb_gbphy_idle(struct device *dev)
 			   gb_gbphy_idle)
 };
 
-static struct device_type greybus_gbphy_dev_type = {
+static const struct device_type greybus_gbphy_dev_type = {
 	.name	 =	"gbphy_device",
 	.release =	gbphy_dev_release,
 	.pm	=	&gb_gbphy_pm_ops,
Signature · 1 line
1.9.1
#78 lore raw

PATCH 14/15 staging: greybus: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/staging/greybus/gbphy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/gbphy.c +1 -1
index 603de6f..80c1da8 100644
@@ -66,7 +66,7 @@ static int gb_gbphy_idle(struct device *dev)
 			   gb_gbphy_idle)
 };
 
-static struct device_type greybus_gbphy_dev_type = {
+static const struct device_type greybus_gbphy_dev_type = {
 	.name	 =	"gbphy_device",
 	.release =	gbphy_dev_release,
 	.pm	=	&gb_gbphy_pm_ops,
Signature · 6 lines
1.9.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#79 lore raw

PATCH 14/15 staging: greybus: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/staging/greybus/gbphy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/gbphy.c +1 -1
index 603de6f..80c1da8 100644
@@ -66,7 +66,7 @@ static int gb_gbphy_idle(struct device *dev)
 			   gb_gbphy_idle)
 };
 
-static struct device_type greybus_gbphy_dev_type = {
+static const struct device_type greybus_gbphy_dev_type = {
 	.name	 =	"gbphy_device",
 	.release =	gbphy_dev_release,
 	.pm	=	&gb_gbphy_pm_ops,
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#80 lore raw

PATCH 14/15 staging: greybus: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/staging/greybus/gbphy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/gbphy.c +1 -1
index 603de6f..80c1da8 100644
@@ -66,7 +66,7 @@ static int gb_gbphy_idle(struct device *dev)
 			   gb_gbphy_idle)
 };
 
-static struct device_type greybus_gbphy_dev_type = {
+static const struct device_type greybus_gbphy_dev_type = {
 	.name	 =	"gbphy_device",
 	.release =	gbphy_dev_release,
 	.pm	=	&gb_gbphy_pm_ops,
Signature · 1 line
1.9.1
#81 lore raw

PATCH 14/15 staging: greybus: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/staging/greybus/gbphy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/gbphy.c +1 -1
index 603de6f..80c1da8 100644
@@ -66,7 +66,7 @@ static int gb_gbphy_idle(struct device *dev)
 			   gb_gbphy_idle)
 };
 
-static struct device_type greybus_gbphy_dev_type = {
+static const struct device_type greybus_gbphy_dev_type = {
 	.name	 =	"gbphy_device",
 	.release =	gbphy_dev_release,
 	.pm	=	&gb_gbphy_pm_ops,
Signature · 1 line
1.9.1
#82 lore raw

PATCH 15/15 usb: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/usb/common/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/common/ulpi.c +1 -1
index 930e8f3..4aa5195 100644
@@ -135,7 +135,7 @@ static void ulpi_dev_release(struct device *dev)
 	kfree(to_ulpi_dev(dev));
 }
 
-static struct device_type ulpi_dev_type = {
+static const struct device_type ulpi_dev_type = {
 	.name = "ulpi_device",
 	.groups = ulpi_dev_attr_groups,
 	.release = ulpi_dev_release,
Signature · 1 line
1.9.1
maintainer Acked-by on v1 15/15
#83 lore raw

Re: [PATCH 15/15] usb: make device_type const

Quoted 5 lines · Bhumika Goyal

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

Quoted 9 lines
---
 drivers/usb/common/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/common/ulpi.c +0 -0
index 930e8f3..4aa5195 100644

drivers/usb/common/ulpi.c static void ulpi_dev_release(struct device *dev) · line 141

Quoted 8 lines
drivers/usb/common/ulpi.c +1 -1
@@ -135,7 +135,7 @@ static void ulpi_dev_release(struct device *dev)
 	kfree(to_ulpi_dev(dev));
 }
 
-static struct device_type ulpi_dev_type = {
+static const struct device_type ulpi_dev_type = {
 	.name = "ulpi_device",
 	.groups = ulpi_dev_attr_groups,
 	.release = ulpi_dev_release,

Thanks,

Signature · 1 line
heikki
#84 lore raw

PATCH 15/15 usb: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/usb/common/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/common/ulpi.c +1 -1
index 930e8f3..4aa5195 100644
@@ -135,7 +135,7 @@ static void ulpi_dev_release(struct device *dev)
 	kfree(to_ulpi_dev(dev));
 }
 
-static struct device_type ulpi_dev_type = {
+static const struct device_type ulpi_dev_type = {
 	.name = "ulpi_device",
 	.groups = ulpi_dev_attr_groups,
 	.release = ulpi_dev_release,
Signature · 1 line
1.9.1
#85 lore raw

PATCH 15/15 usb: make device_type const

In reply to Bhumika Goyal

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

---
 drivers/usb/common/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/common/ulpi.c +1 -1
index 930e8f3..4aa5195 100644
@@ -135,7 +135,7 @@ static void ulpi_dev_release(struct device *dev)
 	kfree(to_ulpi_dev(dev));
 }
 
-static struct device_type ulpi_dev_type = {
+static const struct device_type ulpi_dev_type = {
 	.name = "ulpi_device",
 	.groups = ulpi_dev_attr_groups,
 	.release = ulpi_dev_release,
Signature · 1 line
1.9.1