Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1705325 > unrolled thread
| Started by | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| First post | 2017-08-07 12:20 +0200 |
| Last post | 2017-08-08 12:40 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/5] constify sdhci_pltfm_data and sdhci_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-07 12:20 +0200
[PATCH 2/5] mmc: sdhci-bcm-kona: constify sdhci_pltfm_data and sdhci_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-07 12:20 +0200
[PATCH 3/5] mmc: sdhci-sirf: constify sdhci_pltfm_data and sdhci_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-07 12:20 +0200
Re: [PATCH 0/5] constify sdhci_pltfm_data and sdhci_ops structures Ulf Hansson <ulf.hansson@linaro.org> - 2017-08-08 12:40 +0200
| From | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| Date | 2017-08-07 12:20 +0200 |
| Subject | [PATCH 0/5] constify sdhci_pltfm_data and sdhci_ops structures |
| Message-ID | <ubNiF-6UQ-9@gated-at.bofh.it> |
The sdhci_pltfm_data structures are only passed as the second argument of sdhci_pltfm_init, which is const, while the sdhci_ops structures are only stored in the ops field of a sdhci_pltfm_data structure, which is also const. Thus both kinds of structures can be const as well. Done with the help of Coccinelle. --- drivers/mmc/host/sdhci-bcm-kona.c | 4 ++-- drivers/mmc/host/sdhci-brcmstb.c | 2 +- drivers/mmc/host/sdhci-of-arasan.c | 4 ++-- drivers/mmc/host/sdhci-pic32.c | 2 +- drivers/mmc/host/sdhci-pxav3.c | 2 +- drivers/mmc/host/sdhci-sirf.c | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-)
[toc] | [next] | [standalone]
| From | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| Date | 2017-08-07 12:20 +0200 |
| Subject | [PATCH 2/5] mmc: sdhci-bcm-kona: constify sdhci_pltfm_data and sdhci_ops structures |
| Message-ID | <ubNiG-6UQ-23@gated-at.bofh.it> |
| In reply to | #1705325 |
The sdhci_pltfm_data structure is only passed as the second argument
of sdhci_pltfm_init, which is const, while the sdhci_ops structure
is only stored in the ops field of a sdhci_pltfm_data structure,
which is also const. Thus both kinds of structures can be const as
well.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
drivers/mmc/host/sdhci-bcm-kona.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
index 51dd2fd..11ca95c 100644
--- a/drivers/mmc/host/sdhci-bcm-kona.c
+++ b/drivers/mmc/host/sdhci-bcm-kona.c
@@ -186,7 +186,7 @@ static void sdhci_bcm_kona_init_74_clocks(struct sdhci_host *host,
udelay(740);
}
-static struct sdhci_ops sdhci_bcm_kona_ops = {
+static const struct sdhci_ops sdhci_bcm_kona_ops = {
.set_clock = sdhci_set_clock,
.get_max_clock = sdhci_pltfm_clk_get_max_clock,
.get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
@@ -197,7 +197,7 @@ static void sdhci_bcm_kona_init_74_clocks(struct sdhci_host *host,
.card_event = sdhci_bcm_kona_card_event,
};
-static struct sdhci_pltfm_data sdhci_pltfm_data_kona = {
+static const struct sdhci_pltfm_data sdhci_pltfm_data_kona = {
.ops = &sdhci_bcm_kona_ops,
.quirks = SDHCI_QUIRK_NO_CARD_NO_RESET |
SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | SDHCI_QUIRK_32BIT_DMA_ADDR |
[toc] | [prev] | [next] | [standalone]
| From | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| Date | 2017-08-07 12:20 +0200 |
| Subject | [PATCH 3/5] mmc: sdhci-sirf: constify sdhci_pltfm_data and sdhci_ops structures |
| Message-ID | <ubNiG-6UQ-25@gated-at.bofh.it> |
| In reply to | #1705325 |
The sdhci_pltfm_data structure is only passed as the second argument
of sdhci_pltfm_init, which is const, while the sdhci_ops structure
is only stored in the ops field of a sdhci_pltfm_data structure,
which is also const. Thus both kinds of structures can be const as
well.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
drivers/mmc/host/sdhci-sirf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci-sirf.c b/drivers/mmc/host/sdhci-sirf.c
index c251c6c..556b0cf 100644
--- a/drivers/mmc/host/sdhci-sirf.c
+++ b/drivers/mmc/host/sdhci-sirf.c
@@ -146,7 +146,7 @@ static int sdhci_sirf_execute_tuning(struct sdhci_host *host, u32 opcode)
return rc;
}
-static struct sdhci_ops sdhci_sirf_ops = {
+static const struct sdhci_ops sdhci_sirf_ops = {
.read_l = sdhci_sirf_readl_le,
.read_w = sdhci_sirf_readw_le,
.platform_execute_tuning = sdhci_sirf_execute_tuning,
@@ -157,7 +157,7 @@ static int sdhci_sirf_execute_tuning(struct sdhci_host *host, u32 opcode)
.set_uhs_signaling = sdhci_set_uhs_signaling,
};
-static struct sdhci_pltfm_data sdhci_sirf_pdata = {
+static const struct sdhci_pltfm_data sdhci_sirf_pdata = {
.ops = &sdhci_sirf_ops,
.quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
[toc] | [prev] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2017-08-08 12:40 +0200 |
| Message-ID | <uca5B-71u-39@gated-at.bofh.it> |
| In reply to | #1705325 |
On 7 August 2017 at 11:50, Julia Lawall <Julia.Lawall@lip6.fr> wrote: > The sdhci_pltfm_data structures are only passed as the second > argument of sdhci_pltfm_init, which is const, while the sdhci_ops > structures are only stored in the ops field of a sdhci_pltfm_data > structure, which is also const. Thus both kinds of structures can > be const as well. > > Done with the help of Coccinelle. > > --- > > drivers/mmc/host/sdhci-bcm-kona.c | 4 ++-- > drivers/mmc/host/sdhci-brcmstb.c | 2 +- > drivers/mmc/host/sdhci-of-arasan.c | 4 ++-- > drivers/mmc/host/sdhci-pic32.c | 2 +- > drivers/mmc/host/sdhci-pxav3.c | 2 +- > drivers/mmc/host/sdhci-sirf.c | 4 ++-- > 6 files changed, 9 insertions(+), 9 deletions(-) Thanks, applied for next! Kind regards Uffe
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web