From: Bhumika Goyal <bhumirks@gmail.com>
To: julia.lawall@lip6.fr, realmz6@gmail.com,
adi-buildroot-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Cc: Bhumika Goyal <bhumirks@gmail.com>
Subject: [PATCH] Blackfin: bf527: make musb_hdrc_config const
Date: Mon, 21 Aug 2017 20:04:38 +0530 [thread overview]
Message-ID: <1503326078-7565-1-git-send-email-bhumirks@gmail.com> (raw)
Make these const as they are only stored in the const field of a
musb_hdrc_platform_data structure.
Done using Coccinelle.
@match disable optional_qualifier@
identifier s;
@@
static struct musb_hdrc_config s = {...};
@ref@
position p;
identifier match.s;
@@
s@p
@good1@
identifier y;
position ref.p;
identifier match.s;
@@
struct musb_hdrc_platform_data y = {...,.config=&s@p,...};
@good2@
struct musb_hdrc_platform_data y;
identifier match.s;
position ref.p;
@@
y.config = &s@p
@bad depends on !good1 && !good2@
position ref.p;
identifier match.s;
@@
s@p
@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct musb_hdrc_config s;
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
arch/blackfin/mach-bf527/boards/ad7160eval.c | 2 +-
arch/blackfin/mach-bf527/boards/cm_bf527.c | 2 +-
arch/blackfin/mach-bf527/boards/ezbrd.c | 2 +-
arch/blackfin/mach-bf527/boards/ezkit.c | 2 +-
arch/blackfin/mach-bf527/boards/tll6527m.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index 68f2a8a..114575b 100644
--- a/arch/blackfin/mach-bf527/boards/ad7160eval.c
+++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c
@@ -56,7 +56,7 @@
},
};
-static struct musb_hdrc_config musb_config = {
+static const struct musb_hdrc_config musb_config = {
.multipoint = 0,
.dyn_fifo = 0,
.soft_con = 1,
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index b1004b3..44ccaf4 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -93,7 +93,7 @@
},
};
-static struct musb_hdrc_config musb_config = {
+static const struct musb_hdrc_config musb_config = {
.multipoint = 0,
.dyn_fifo = 0,
.soft_con = 1,
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 80bcfd1..2ef2ffa 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -57,7 +57,7 @@
},
};
-static struct musb_hdrc_config musb_config = {
+static const struct musb_hdrc_config musb_config = {
.multipoint = 0,
.dyn_fifo = 0,
.soft_con = 1,
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 571edfd..33539d4 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -98,7 +98,7 @@
},
};
-static struct musb_hdrc_config musb_config = {
+static const struct musb_hdrc_config musb_config = {
.multipoint = 0,
.dyn_fifo = 0,
.soft_con = 1,
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c b/arch/blackfin/mach-bf527/boards/tll6527m.c
index ce5488e..29ac9c3 100644
--- a/arch/blackfin/mach-bf527/boards/tll6527m.c
+++ b/arch/blackfin/mach-bf527/boards/tll6527m.c
@@ -63,7 +63,7 @@
},
};
-static struct musb_hdrc_config musb_config = {
+static const struct musb_hdrc_config musb_config = {
.multipoint = 0,
.dyn_fifo = 0,
.soft_con = 1,
--
1.9.1
reply other threads:[~2017-08-21 14:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1503326078-7565-1-git-send-email-bhumirks@gmail.com \
--to=bhumirks@gmail.com \
--cc=adi-buildroot-devel@lists.sourceforge.net \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=realmz6@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®