All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] constify mmc_host_ops structures
@ 2017-07-29  5:59 ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-mediatek
  Cc: bhumirks, kernel-janitors, linux-arm-kernel, Ulf Hansson,
	linux-mmc, linux-kernel, linux-usb, linux-rpi-kernel


The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

---

 drivers/mmc/host/bcm2835.c     |    2 +-
 drivers/mmc/host/davinci_mmc.c |    2 +-
 drivers/mmc/host/moxart-mmc.c  |    2 +-
 drivers/mmc/host/mtk-sd.c      |    2 +-
 drivers/mmc/host/s3cmci.c      |    2 +-
 drivers/mmc/host/sdricoh_cs.c  |    2 +-
 drivers/mmc/host/sh_mmcif.c    |    2 +-
 drivers/mmc/host/sunxi-mmc.c   |    2 +-
 drivers/mmc/host/toshsd.c      |    2 +-
 drivers/mmc/host/usdhi6rol0.c  |    2 +-
 drivers/mmc/host/vub300.c      |    2 +-
 drivers/mmc/host/wmt-sdmmc.c   |    2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [PATCH 00/12] constify mmc_host_ops structures
@ 2017-07-29  5:59 ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel


The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

---

 drivers/mmc/host/bcm2835.c     |    2 +-
 drivers/mmc/host/davinci_mmc.c |    2 +-
 drivers/mmc/host/moxart-mmc.c  |    2 +-
 drivers/mmc/host/mtk-sd.c      |    2 +-
 drivers/mmc/host/s3cmci.c      |    2 +-
 drivers/mmc/host/sdricoh_cs.c  |    2 +-
 drivers/mmc/host/sh_mmcif.c    |    2 +-
 drivers/mmc/host/sunxi-mmc.c   |    2 +-
 drivers/mmc/host/toshsd.c      |    2 +-
 drivers/mmc/host/usdhi6rol0.c  |    2 +-
 drivers/mmc/host/vub300.c      |    2 +-
 drivers/mmc/host/wmt-sdmmc.c   |    2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [PATCH 00/12] constify mmc_host_ops structures
@ 2017-07-29  5:59 ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel


The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

---

 drivers/mmc/host/bcm2835.c     |    2 +-
 drivers/mmc/host/davinci_mmc.c |    2 +-
 drivers/mmc/host/moxart-mmc.c  |    2 +-
 drivers/mmc/host/mtk-sd.c      |    2 +-
 drivers/mmc/host/s3cmci.c      |    2 +-
 drivers/mmc/host/sdricoh_cs.c  |    2 +-
 drivers/mmc/host/sh_mmcif.c    |    2 +-
 drivers/mmc/host/sunxi-mmc.c   |    2 +-
 drivers/mmc/host/toshsd.c      |    2 +-
 drivers/mmc/host/usdhi6rol0.c  |    2 +-
 drivers/mmc/host/vub300.c      |    2 +-
 drivers/mmc/host/wmt-sdmmc.c   |    2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [PATCH 01/12] mmc: wmt-sdmmc: constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
  (?)
@ 2017-07-29  5:59   ` Julia Lawall
  -1 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Tony Prisk
  Cc: bhumirks, kernel-janitors, Ulf Hansson, linux-arm-kernel,
	linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/wmt-sdmmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 21ebba8..50fe69d 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -726,7 +726,7 @@ static int wmt_mci_get_cd(struct mmc_host *mmc)
 	return !(cd ^ priv->cd_inverted);
 }
 
-static struct mmc_host_ops wmt_mci_ops = {
+static const struct mmc_host_ops wmt_mci_ops = {
 	.request = wmt_mci_request,
 	.set_ios = wmt_mci_set_ios,
 	.get_ro = wmt_mci_get_ro,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 01/12] mmc: wmt-sdmmc: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/wmt-sdmmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 21ebba8..50fe69d 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -726,7 +726,7 @@ static int wmt_mci_get_cd(struct mmc_host *mmc)
 	return !(cd ^ priv->cd_inverted);
 }
 
-static struct mmc_host_ops wmt_mci_ops = {
+static const struct mmc_host_ops wmt_mci_ops = {
 	.request = wmt_mci_request,
 	.set_ios = wmt_mci_set_ios,
 	.get_ro = wmt_mci_get_ro,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 01/12] mmc: wmt-sdmmc: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i at p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i at p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/wmt-sdmmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 21ebba8..50fe69d 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -726,7 +726,7 @@ static int wmt_mci_get_cd(struct mmc_host *mmc)
 	return !(cd ^ priv->cd_inverted);
 }
 
-static struct mmc_host_ops wmt_mci_ops = {
+static const struct mmc_host_ops wmt_mci_ops = {
 	.request = wmt_mci_request,
 	.set_ios = wmt_mci_set_ios,
 	.get_ro = wmt_mci_get_ro,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 02/12] mmc: s3cmci: constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
  (?)
  (?)
@ 2017-07-29  5:59   ` Julia Lawall
  -1 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ben Dooks
  Cc: bhumirks, kernel-janitors, Ulf Hansson, linux-arm-kernel,
	linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/s3cmci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 8896bf5..f7f157a 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1313,7 +1313,7 @@ static void s3cmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
 	s3cmci_check_sdio_irq(host);
 }
 
-static struct mmc_host_ops s3cmci_ops = {
+static const struct mmc_host_ops s3cmci_ops = {
 	.request	= s3cmci_request,
 	.set_ios	= s3cmci_set_ios,
 	.get_ro		= mmc_gpio_get_ro,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 02/12] mmc: s3cmci: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/s3cmci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 8896bf5..f7f157a 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1313,7 +1313,7 @@ static void s3cmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
 	s3cmci_check_sdio_irq(host);
 }
 
-static struct mmc_host_ops s3cmci_ops = {
+static const struct mmc_host_ops s3cmci_ops = {
 	.request	= s3cmci_request,
 	.set_ios	= s3cmci_set_ios,
 	.get_ro		= mmc_gpio_get_ro,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 02/12] mmc: s3cmci: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ben Dooks
  Cc: Ulf Hansson, kernel-janitors, linux-mmc, linux-kernel, bhumirks,
	linux-arm-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/s3cmci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 8896bf5..f7f157a 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1313,7 +1313,7 @@ static void s3cmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
 	s3cmci_check_sdio_irq(host);
 }
 
-static struct mmc_host_ops s3cmci_ops = {
+static const struct mmc_host_ops s3cmci_ops = {
 	.request	= s3cmci_request,
 	.set_ios	= s3cmci_set_ios,
 	.get_ro		= mmc_gpio_get_ro,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 02/12] mmc: s3cmci: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i at p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i at p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/s3cmci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 8896bf5..f7f157a 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1313,7 +1313,7 @@ static void s3cmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
 	s3cmci_check_sdio_irq(host);
 }
 
-static struct mmc_host_ops s3cmci_ops = {
+static const struct mmc_host_ops s3cmci_ops = {
 	.request	= s3cmci_request,
 	.set_ios	= s3cmci_set_ios,
 	.get_ro		= mmc_gpio_get_ro,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 03/12] mmc: davinci: constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
@ 2017-07-29  5:59   ` Julia Lawall
  -1 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: bhumirks, kernel-janitors, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/davinci_mmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 621ce47..351330d 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1062,7 +1062,7 @@ static void mmc_davinci_enable_sdio_irq(struct mmc_host *mmc, int enable)
 	}
 }
 
-static struct mmc_host_ops mmc_davinci_ops = {
+static const struct mmc_host_ops mmc_davinci_ops = {
 	.request	= mmc_davinci_request,
 	.set_ios	= mmc_davinci_set_ios,
 	.get_cd		= mmc_davinci_get_cd,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 03/12] mmc: davinci: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: bhumirks, kernel-janitors, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/davinci_mmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 621ce47..351330d 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1062,7 +1062,7 @@ static void mmc_davinci_enable_sdio_irq(struct mmc_host *mmc, int enable)
 	}
 }
 
-static struct mmc_host_ops mmc_davinci_ops = {
+static const struct mmc_host_ops mmc_davinci_ops = {
 	.request	= mmc_davinci_request,
 	.set_ios	= mmc_davinci_set_ios,
 	.get_cd		= mmc_davinci_get_cd,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 04/12] mmc: moxart: constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
@ 2017-07-29  5:59   ` Julia Lawall
  -1 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: bhumirks, kernel-janitors, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/moxart-mmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c
index d4dc55a..a0670e9 100644
--- a/drivers/mmc/host/moxart-mmc.c
+++ b/drivers/mmc/host/moxart-mmc.c
@@ -546,7 +546,7 @@ static int moxart_get_ro(struct mmc_host *mmc)
 	return !!(readl(host->base + REG_STATUS) & WRITE_PROT);
 }
 
-static struct mmc_host_ops moxart_ops = {
+static const struct mmc_host_ops moxart_ops = {
 	.request = moxart_request,
 	.set_ios = moxart_set_ios,
 	.get_ro = moxart_get_ro,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 04/12] mmc: moxart: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: bhumirks, kernel-janitors, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/moxart-mmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c
index d4dc55a..a0670e9 100644
--- a/drivers/mmc/host/moxart-mmc.c
+++ b/drivers/mmc/host/moxart-mmc.c
@@ -546,7 +546,7 @@ static int moxart_get_ro(struct mmc_host *mmc)
 	return !!(readl(host->base + REG_STATUS) & WRITE_PROT);
 }
 
-static struct mmc_host_ops moxart_ops = {
+static const struct mmc_host_ops moxart_ops = {
 	.request = moxart_request,
 	.set_ios = moxart_set_ios,
 	.get_ro = moxart_get_ro,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 05/12] mmc: sh_mmcif: constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
@ 2017-07-29  5:59   ` Julia Lawall
  -1 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: bhumirks, kernel-janitors, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/sh_mmcif.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 4062d6b..53fb18b 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1079,7 +1079,7 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	host->state = STATE_IDLE;
 }
 
-static struct mmc_host_ops sh_mmcif_ops = {
+static const struct mmc_host_ops sh_mmcif_ops = {
 	.request	= sh_mmcif_request,
 	.set_ios	= sh_mmcif_set_ios,
 	.get_cd		= mmc_gpio_get_cd,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 05/12] mmc: sh_mmcif: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: bhumirks, kernel-janitors, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/sh_mmcif.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 4062d6b..53fb18b 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1079,7 +1079,7 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	host->state = STATE_IDLE;
 }
 
-static struct mmc_host_ops sh_mmcif_ops = {
+static const struct mmc_host_ops sh_mmcif_ops = {
 	.request	= sh_mmcif_request,
 	.set_ios	= sh_mmcif_set_ios,
 	.get_cd		= mmc_gpio_get_cd,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 06/12] mmc: toshsd: constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
@ 2017-07-29  5:59   ` Julia Lawall
  -1 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: bhumirks, kernel-janitors, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/toshsd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/toshsd.c b/drivers/mmc/host/toshsd.c
index 553ef41..dd961c5 100644
--- a/drivers/mmc/host/toshsd.c
+++ b/drivers/mmc/host/toshsd.c
@@ -550,7 +550,7 @@ static int toshsd_get_cd(struct mmc_host *mmc)
 	return !!(ioread16(host->ioaddr + SD_CARDSTATUS) & SD_CARD_PRESENT_0);
 }
 
-static struct mmc_host_ops toshsd_ops = {
+static const struct mmc_host_ops toshsd_ops = {
 	.request = toshsd_request,
 	.set_ios = toshsd_set_ios,
 	.get_ro = toshsd_get_ro,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 06/12] mmc: toshsd: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: bhumirks, kernel-janitors, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/toshsd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/toshsd.c b/drivers/mmc/host/toshsd.c
index 553ef41..dd961c5 100644
--- a/drivers/mmc/host/toshsd.c
+++ b/drivers/mmc/host/toshsd.c
@@ -550,7 +550,7 @@ static int toshsd_get_cd(struct mmc_host *mmc)
 	return !!(ioread16(host->ioaddr + SD_CARDSTATUS) & SD_CARD_PRESENT_0);
 }
 
-static struct mmc_host_ops toshsd_ops = {
+static const struct mmc_host_ops toshsd_ops = {
 	.request = toshsd_request,
 	.set_ios = toshsd_set_ios,
 	.get_ro = toshsd_get_ro,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 07/12] mmc: usdhi6rol0: constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
@ 2017-07-29  5:59   ` Julia Lawall
  -1 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: bhumirks, kernel-janitors, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/usdhi6rol0.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
index 1bd5f1a..64da6a8 100644
--- a/drivers/mmc/host/usdhi6rol0.c
+++ b/drivers/mmc/host/usdhi6rol0.c
@@ -1185,7 +1185,7 @@ static int usdhi6_sig_volt_switch(struct mmc_host *mmc, struct mmc_ios *ios)
 	return ret;
 }
 
-static struct mmc_host_ops usdhi6_ops = {
+static const struct mmc_host_ops usdhi6_ops = {
 	.request	= usdhi6_request,
 	.set_ios	= usdhi6_set_ios,
 	.get_cd		= usdhi6_get_cd,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 07/12] mmc: usdhi6rol0: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: bhumirks, kernel-janitors, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/usdhi6rol0.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
index 1bd5f1a..64da6a8 100644
--- a/drivers/mmc/host/usdhi6rol0.c
+++ b/drivers/mmc/host/usdhi6rol0.c
@@ -1185,7 +1185,7 @@ static int usdhi6_sig_volt_switch(struct mmc_host *mmc, struct mmc_ios *ios)
 	return ret;
 }
 
-static struct mmc_host_ops usdhi6_ops = {
+static const struct mmc_host_ops usdhi6_ops = {
 	.request	= usdhi6_request,
 	.set_ios	= usdhi6_set_ios,
 	.get_cd		= usdhi6_get_cd,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 08/12] mmc: vub300: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Tony Olech
  Cc: bhumirks, kernel-janitors, Ulf Hansson, linux-mmc, linux-usb,
	linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/vub300.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index fbeea1a..6e08597 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -2079,7 +2079,7 @@ static void vub300_init_card(struct mmc_host *mmc, struct mmc_card *card)
 	dev_info(&vub300->udev->dev, "NO host QUIRKS for this card\n");
 }
 
-static struct mmc_host_ops vub300_mmc_ops = {
+static const struct mmc_host_ops vub300_mmc_ops = {
 	.request = vub300_mmc_request,
 	.set_ios = vub300_mmc_set_ios,
 	.get_ro = vub300_mmc_get_ro,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 08/12] mmc: vub300: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Tony Olech
  Cc: bhumirks-Re5JQEeQqe8AvxtiuMwx3w,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Ulf Hansson,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/vub300.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index fbeea1a..6e08597 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -2079,7 +2079,7 @@ static void vub300_init_card(struct mmc_host *mmc, struct mmc_card *card)
 	dev_info(&vub300->udev->dev, "NO host QUIRKS for this card\n");
 }
 
-static struct mmc_host_ops vub300_mmc_ops = {
+static const struct mmc_host_ops vub300_mmc_ops = {
 	.request = vub300_mmc_request,
 	.set_ios = vub300_mmc_set_ios,
 	.get_ro = vub300_mmc_get_ro,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 08/12] mmc: vub300: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Tony Olech
  Cc: bhumirks-Re5JQEeQqe8AvxtiuMwx3w,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Ulf Hansson,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall-L2FTfq7BK8M@public.gmane.org>

---
 drivers/mmc/host/vub300.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index fbeea1a..6e08597 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -2079,7 +2079,7 @@ static void vub300_init_card(struct mmc_host *mmc, struct mmc_card *card)
 	dev_info(&vub300->udev->dev, "NO host QUIRKS for this card\n");
 }
 
-static struct mmc_host_ops vub300_mmc_ops = {
+static const struct mmc_host_ops vub300_mmc_ops = {
 	.request = vub300_mmc_request,
 	.set_ios = vub300_mmc_set_ios,
 	.get_ro = vub300_mmc_get_ro,

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 09/12] mmc: sunxi: constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
  (?)
@ 2017-07-29  5:59   ` Julia Lawall
  -1 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: bhumirks, kernel-janitors, Maxime Ripard, Chen-Yu Tsai,
	linux-mmc, linux-arm-kernel, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/sunxi-mmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 6adc524..fa0601c 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1048,7 +1048,7 @@ static int sunxi_mmc_card_busy(struct mmc_host *mmc)
 	return !!(mmc_readl(host, REG_STAS) & SDXC_CARD_DATA_BUSY);
 }
 
-static struct mmc_host_ops sunxi_mmc_ops = {
+static const struct mmc_host_ops sunxi_mmc_ops = {
 	.request	 = sunxi_mmc_request,
 	.set_ios	 = sunxi_mmc_set_ios,
 	.get_ro		 = mmc_gpio_get_ro,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 09/12] mmc: sunxi: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/sunxi-mmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 6adc524..fa0601c 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1048,7 +1048,7 @@ static int sunxi_mmc_card_busy(struct mmc_host *mmc)
 	return !!(mmc_readl(host, REG_STAS) & SDXC_CARD_DATA_BUSY);
 }
 
-static struct mmc_host_ops sunxi_mmc_ops = {
+static const struct mmc_host_ops sunxi_mmc_ops = {
 	.request	 = sunxi_mmc_request,
 	.set_ios	 = sunxi_mmc_set_ios,
 	.get_ro		 = mmc_gpio_get_ro,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 09/12] mmc: sunxi: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i at p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i at p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/sunxi-mmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 6adc524..fa0601c 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1048,7 +1048,7 @@ static int sunxi_mmc_card_busy(struct mmc_host *mmc)
 	return !!(mmc_readl(host, REG_STAS) & SDXC_CARD_DATA_BUSY);
 }
 
-static struct mmc_host_ops sunxi_mmc_ops = {
+static const struct mmc_host_ops sunxi_mmc_ops = {
 	.request	 = sunxi_mmc_request,
 	.set_ios	 = sunxi_mmc_set_ios,
 	.get_ro		 = mmc_gpio_get_ro,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 10/12] mmc: sdricoh_cs: constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
@ 2017-07-29  5:59   ` Julia Lawall
  -1 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Sascha Sommer
  Cc: bhumirks, kernel-janitors, Ulf Hansson, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/sdricoh_cs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c
index 70cb00a..9e46039 100644
--- a/drivers/mmc/host/sdricoh_cs.c
+++ b/drivers/mmc/host/sdricoh_cs.c
@@ -385,7 +385,7 @@ static int sdricoh_get_ro(struct mmc_host *mmc)
 	return (status & STATUS_CARD_LOCKED);
 }
 
-static struct mmc_host_ops sdricoh_ops = {
+static const struct mmc_host_ops sdricoh_ops = {
 	.request = sdricoh_request,
 	.set_ios = sdricoh_set_ios,
 	.get_ro = sdricoh_get_ro,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 10/12] mmc: sdricoh_cs: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Sascha Sommer
  Cc: bhumirks, kernel-janitors, Ulf Hansson, linux-mmc, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/sdricoh_cs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c
index 70cb00a..9e46039 100644
--- a/drivers/mmc/host/sdricoh_cs.c
+++ b/drivers/mmc/host/sdricoh_cs.c
@@ -385,7 +385,7 @@ static int sdricoh_get_ro(struct mmc_host *mmc)
 	return (status & STATUS_CARD_LOCKED);
 }
 
-static struct mmc_host_ops sdricoh_ops = {
+static const struct mmc_host_ops sdricoh_ops = {
 	.request = sdricoh_request,
 	.set_ios = sdricoh_set_ios,
 	.get_ro = sdricoh_get_ro,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 11/12] mmc: mediatek: constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
  (?)
@ 2017-07-29  5:59   ` Julia Lawall
  -1 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: bhumirks, kernel-janitors, Matthias Brugger, linux-mmc,
	linux-arm-kernel, linux-mediatek, linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/mtk-sd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 68f4453..267f7ab 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -1579,7 +1579,7 @@ static void msdc_hw_reset(struct mmc_host *mmc)
 	sdr_clr_bits(host->base + EMMC_IOCON, 1);
 }
 
-static struct mmc_host_ops mt_msdc_ops = {
+static const struct mmc_host_ops mt_msdc_ops = {
 	.post_req = msdc_post_req,
 	.pre_req = msdc_pre_req,
 	.request = msdc_ops_request,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 11/12] mmc: mediatek: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/mtk-sd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 68f4453..267f7ab 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -1579,7 +1579,7 @@ static void msdc_hw_reset(struct mmc_host *mmc)
 	sdr_clr_bits(host->base + EMMC_IOCON, 1);
 }
 
-static struct mmc_host_ops mt_msdc_ops = {
+static const struct mmc_host_ops mt_msdc_ops = {
 	.post_req = msdc_post_req,
 	.pre_req = msdc_pre_req,
 	.request = msdc_ops_request,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 11/12] mmc: mediatek: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i at p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i at p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/mtk-sd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 68f4453..267f7ab 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -1579,7 +1579,7 @@ static void msdc_hw_reset(struct mmc_host *mmc)
 	sdr_clr_bits(host->base + EMMC_IOCON, 1);
 }
 
-static struct mmc_host_ops mt_msdc_ops = {
+static const struct mmc_host_ops mt_msdc_ops = {
 	.post_req = msdc_post_req,
 	.pre_req = msdc_pre_req,
 	.request = msdc_ops_request,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 12/12] mmc: bcm2835: constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
  (?)
@ 2017-07-29  5:59   ` Julia Lawall
  -1 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: bhumirks, kernel-janitors, Florian Fainelli, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Eric Anholt,
	Stefan Wahren, linux-mmc, linux-rpi-kernel, linux-arm-kernel,
	linux-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/bcm2835.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index abba9a2..229dc18 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -1252,7 +1252,7 @@ static void bcm2835_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	mutex_unlock(&host->mutex);
 }
 
-static struct mmc_host_ops bcm2835_ops = {
+static const struct mmc_host_ops bcm2835_ops = {
 	.request = bcm2835_request,
 	.set_ios = bcm2835_set_ios,
 	.hw_reset = bcm2835_reset,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 12/12] mmc: bcm2835: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i@p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/bcm2835.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index abba9a2..229dc18 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -1252,7 +1252,7 @@ static void bcm2835_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	mutex_unlock(&host->mutex);
 }
 
-static struct mmc_host_ops bcm2835_ops = {
+static const struct mmc_host_ops bcm2835_ops = {
 	.request = bcm2835_request,
 	.set_ios = bcm2835_set_ios,
 	.hw_reset = bcm2835_reset,


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 12/12] mmc: bcm2835: constify mmc_host_ops structures
@ 2017-07-29  5:59   ` Julia Lawall
  0 siblings, 0 replies; 41+ messages in thread
From: Julia Lawall @ 2017-07-29  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

The mmc_host_ops structure is only stored in the ops field of an
mmc_host structure, which is declared as const.  Thus the mmc_host_ops
structure itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct mmc_host_ops i at p = { ... };

@ok1@
struct mmc_host *mmc;
identifier r.i;
position p;
@@
mmc->ops = &i at p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct mmc_host_ops e;
@@
e at i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct mmc_host_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/mmc/host/bcm2835.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index abba9a2..229dc18 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -1252,7 +1252,7 @@ static void bcm2835_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	mutex_unlock(&host->mutex);
 }
 
-static struct mmc_host_ops bcm2835_ops = {
+static const struct mmc_host_ops bcm2835_ops = {
 	.request = bcm2835_request,
 	.set_ios = bcm2835_set_ios,
 	.hw_reset = bcm2835_reset,

^ permalink raw reply related	[flat|nested] 41+ messages in thread

* Re: [PATCH 12/12] mmc: bcm2835: constify mmc_host_ops structures
  2017-07-29  5:59   ` Julia Lawall
  (?)
@ 2017-07-31  5:55     ` Stefan Wahren
  -1 siblings, 0 replies; 41+ messages in thread
From: Stefan Wahren @ 2017-07-31  5:55 UTC (permalink / raw)
  To: Julia Lawall, Ulf Hansson
  Cc: bhumirks, kernel-janitors, Florian Fainelli, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Eric Anholt, linux-mmc,
	linux-rpi-kernel, linux-arm-kernel, linux-kernel

Am 29.07.2017 um 07:59 schrieb Julia Lawall:
> The mmc_host_ops structure is only stored in the ops field of an
> mmc_host structure, which is declared as const.  Thus the mmc_host_ops
> structure itself can be const.
>
> Done with the help of Coccinelle.
>
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct mmc_host_ops i@p = { ... };
>
> @ok1@
> struct mmc_host *mmc;
> identifier r.i;
> position p;
> @@
> mmc->ops = &i@p
>
> @bad@
> position p != {r.p,ok1.p};
> identifier r.i;
> struct mmc_host_ops e;
> @@
> e@i@p
>
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct mmc_host_ops i = { ... };
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Stefan Wahren <stefan.wahren@i2se.com>

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 12/12] mmc: bcm2835: constify mmc_host_ops structures
@ 2017-07-31  5:55     ` Stefan Wahren
  0 siblings, 0 replies; 41+ messages in thread
From: Stefan Wahren @ 2017-07-31  5:55 UTC (permalink / raw)
  To: linux-arm-kernel

Am 29.07.2017 um 07:59 schrieb Julia Lawall:
> The mmc_host_ops structure is only stored in the ops field of an
> mmc_host structure, which is declared as const.  Thus the mmc_host_ops
> structure itself can be const.
>
> Done with the help of Coccinelle.
>
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct mmc_host_ops i@p = { ... };
>
> @ok1@
> struct mmc_host *mmc;
> identifier r.i;
> position p;
> @@
> mmc->ops = &i@p
>
> @bad@
> position p != {r.p,ok1.p};
> identifier r.i;
> struct mmc_host_ops e;
> @@
> e@i@p
>
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct mmc_host_ops i = { ... };
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Stefan Wahren <stefan.wahren@i2se.com>

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [PATCH 12/12] mmc: bcm2835: constify mmc_host_ops structures
@ 2017-07-31  5:55     ` Stefan Wahren
  0 siblings, 0 replies; 41+ messages in thread
From: Stefan Wahren @ 2017-07-31  5:55 UTC (permalink / raw)
  To: linux-arm-kernel

Am 29.07.2017 um 07:59 schrieb Julia Lawall:
> The mmc_host_ops structure is only stored in the ops field of an
> mmc_host structure, which is declared as const.  Thus the mmc_host_ops
> structure itself can be const.
>
> Done with the help of Coccinelle.
>
> // <smpl>
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct mmc_host_ops i at p = { ... };
>
> @ok1@
> struct mmc_host *mmc;
> identifier r.i;
> position p;
> @@
> mmc->ops = &i at p
>
> @bad@
> position p != {r.p,ok1.p};
> identifier r.i;
> struct mmc_host_ops e;
> @@
> e at i@p
>
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct mmc_host_ops i = { ... };
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Stefan Wahren <stefan.wahren@i2se.com>

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 00/12] constify mmc_host_ops structures
  2017-07-29  5:59 ` Julia Lawall
  (?)
  (?)
@ 2017-07-31  8:52   ` Ulf Hansson
  -1 siblings, 0 replies; 41+ messages in thread
From: Ulf Hansson @ 2017-07-31  8:52 UTC (permalink / raw)
  To: Julia Lawall
  Cc: linux-mediatek, bhumirks, kernel-janitors, linux-arm-kernel,
	linux-mmc, linux-kernel, Linux USB List, linux-rpi-kernel

On 29 July 2017 at 07:59, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
>
> The mmc_host_ops structure is only stored in the ops field of an
> mmc_host structure, which is declared as const.  Thus the mmc_host_ops
> structure itself can be const.
>
> Done with the help of Coccinelle.
>
> ---
>
>  drivers/mmc/host/bcm2835.c     |    2 +-
>  drivers/mmc/host/davinci_mmc.c |    2 +-
>  drivers/mmc/host/moxart-mmc.c  |    2 +-
>  drivers/mmc/host/mtk-sd.c      |    2 +-
>  drivers/mmc/host/s3cmci.c      |    2 +-
>  drivers/mmc/host/sdricoh_cs.c  |    2 +-
>  drivers/mmc/host/sh_mmcif.c    |    2 +-
>  drivers/mmc/host/sunxi-mmc.c   |    2 +-
>  drivers/mmc/host/toshsd.c      |    2 +-
>  drivers/mmc/host/usdhi6rol0.c  |    2 +-
>  drivers/mmc/host/vub300.c      |    2 +-
>  drivers/mmc/host/wmt-sdmmc.c   |    2 +-
>  12 files changed, 12 insertions(+), 12 deletions(-)


Thanks, applied for next!

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 00/12] constify mmc_host_ops structures
@ 2017-07-31  8:52   ` Ulf Hansson
  0 siblings, 0 replies; 41+ messages in thread
From: Ulf Hansson @ 2017-07-31  8:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 29 July 2017 at 07:59, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
>
> The mmc_host_ops structure is only stored in the ops field of an
> mmc_host structure, which is declared as const.  Thus the mmc_host_ops
> structure itself can be const.
>
> Done with the help of Coccinelle.
>
> ---
>
>  drivers/mmc/host/bcm2835.c     |    2 +-
>  drivers/mmc/host/davinci_mmc.c |    2 +-
>  drivers/mmc/host/moxart-mmc.c  |    2 +-
>  drivers/mmc/host/mtk-sd.c      |    2 +-
>  drivers/mmc/host/s3cmci.c      |    2 +-
>  drivers/mmc/host/sdricoh_cs.c  |    2 +-
>  drivers/mmc/host/sh_mmcif.c    |    2 +-
>  drivers/mmc/host/sunxi-mmc.c   |    2 +-
>  drivers/mmc/host/toshsd.c      |    2 +-
>  drivers/mmc/host/usdhi6rol0.c  |    2 +-
>  drivers/mmc/host/vub300.c      |    2 +-
>  drivers/mmc/host/wmt-sdmmc.c   |    2 +-
>  12 files changed, 12 insertions(+), 12 deletions(-)


Thanks, applied for next!

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH 00/12] constify mmc_host_ops structures
@ 2017-07-31  8:52   ` Ulf Hansson
  0 siblings, 0 replies; 41+ messages in thread
From: Ulf Hansson @ 2017-07-31  8:52 UTC (permalink / raw)
  To: Julia Lawall
  Cc: linux-mediatek, bhumirks, kernel-janitors, linux-arm-kernel,
	linux-mmc, linux-kernel, Linux USB List, linux-rpi-kernel

On 29 July 2017 at 07:59, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
>
> The mmc_host_ops structure is only stored in the ops field of an
> mmc_host structure, which is declared as const.  Thus the mmc_host_ops
> structure itself can be const.
>
> Done with the help of Coccinelle.
>
> ---
>
>  drivers/mmc/host/bcm2835.c     |    2 +-
>  drivers/mmc/host/davinci_mmc.c |    2 +-
>  drivers/mmc/host/moxart-mmc.c  |    2 +-
>  drivers/mmc/host/mtk-sd.c      |    2 +-
>  drivers/mmc/host/s3cmci.c      |    2 +-
>  drivers/mmc/host/sdricoh_cs.c  |    2 +-
>  drivers/mmc/host/sh_mmcif.c    |    2 +-
>  drivers/mmc/host/sunxi-mmc.c   |    2 +-
>  drivers/mmc/host/toshsd.c      |    2 +-
>  drivers/mmc/host/usdhi6rol0.c  |    2 +-
>  drivers/mmc/host/vub300.c      |    2 +-
>  drivers/mmc/host/wmt-sdmmc.c   |    2 +-
>  12 files changed, 12 insertions(+), 12 deletions(-)


Thanks, applied for next!

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [PATCH 00/12] constify mmc_host_ops structures
@ 2017-07-31  8:52   ` Ulf Hansson
  0 siblings, 0 replies; 41+ messages in thread
From: Ulf Hansson @ 2017-07-31  8:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 29 July 2017 at 07:59, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
>
> The mmc_host_ops structure is only stored in the ops field of an
> mmc_host structure, which is declared as const.  Thus the mmc_host_ops
> structure itself can be const.
>
> Done with the help of Coccinelle.
>
> ---
>
>  drivers/mmc/host/bcm2835.c     |    2 +-
>  drivers/mmc/host/davinci_mmc.c |    2 +-
>  drivers/mmc/host/moxart-mmc.c  |    2 +-
>  drivers/mmc/host/mtk-sd.c      |    2 +-
>  drivers/mmc/host/s3cmci.c      |    2 +-
>  drivers/mmc/host/sdricoh_cs.c  |    2 +-
>  drivers/mmc/host/sh_mmcif.c    |    2 +-
>  drivers/mmc/host/sunxi-mmc.c   |    2 +-
>  drivers/mmc/host/toshsd.c      |    2 +-
>  drivers/mmc/host/usdhi6rol0.c  |    2 +-
>  drivers/mmc/host/vub300.c      |    2 +-
>  drivers/mmc/host/wmt-sdmmc.c   |    2 +-
>  12 files changed, 12 insertions(+), 12 deletions(-)


Thanks, applied for next!

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2017-07-31  8:52 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-29  5:59 [PATCH 00/12] constify mmc_host_ops structures Julia Lawall
2017-07-29  5:59 ` Julia Lawall
2017-07-29  5:59 ` Julia Lawall
2017-07-29  5:59 ` [PATCH 01/12] mmc: wmt-sdmmc: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59 ` [PATCH 02/12] mmc: s3cmci: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59 ` [PATCH 03/12] mmc: davinci: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59 ` [PATCH 04/12] mmc: moxart: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59 ` [PATCH 05/12] mmc: sh_mmcif: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59 ` [PATCH 06/12] mmc: toshsd: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59 ` [PATCH 07/12] mmc: usdhi6rol0: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59 ` [PATCH 08/12] mmc: vub300: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59 ` [PATCH 09/12] mmc: sunxi: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59 ` [PATCH 10/12] mmc: sdricoh_cs: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59 ` [PATCH 11/12] mmc: mediatek: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59 ` [PATCH 12/12] mmc: bcm2835: " Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-29  5:59   ` Julia Lawall
2017-07-31  5:55   ` Stefan Wahren
2017-07-31  5:55     ` Stefan Wahren
2017-07-31  5:55     ` Stefan Wahren
2017-07-31  8:52 ` [PATCH 00/12] " Ulf Hansson
2017-07-31  8:52   ` Ulf Hansson
2017-07-31  8:52   ` Ulf Hansson
2017-07-31  8:52   ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.