linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: [Patch 3/5] dt: unittest: add const where needed
Date: Sat, 14 Mar 2015 00:00:36 -0700	[thread overview]
Message-ID: <5503DC94.1060405@gmail.com> (raw)
In-Reply-To: <5503C65F.4030000@gmail.com>

From: Frank Rowand <frank.rowand@sonymobile.com>

Fix warnings pointed out by checkpatch.

No bugs fixed, but the test code should be a good example of how to use
the devicetree API.

Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com>
---
 drivers/of/unittest.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: b/drivers/of/unittest.c
===================================================================
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -666,7 +666,7 @@ static void __init of_selftest_parse_int
 	of_node_put(np);
 }
 
-static struct of_device_id match_node_table[] = {
+static const struct of_device_id match_node_table[] = {
 	{ .data = "A", .name = "name0", }, /* Name alone is lowest priority */
 	{ .data = "B", .type = "type1", }, /* followed by type alone */
 
@@ -740,7 +740,7 @@ static void __init of_selftest_platform_
 	int irq, rc;
 	struct device_node *np, *child, *grandchild;
 	struct platform_device *pdev;
-	struct of_device_id match[] = {
+	const struct of_device_id match[] = {
 		{ .compatible = "test-device", },
 		{}
 	};
@@ -941,7 +941,7 @@ static int selftest_remove(struct platfo
 	return 0;
 }
 
-static struct of_device_id selftest_match[] = {
+static const struct of_device_id selftest_match[] = {
 	{ .compatible = "selftest", },
 	{},
 };
@@ -1533,7 +1533,7 @@ static int selftest_i2c_bus_remove(struc
 	return 0;
 }
 
-static struct of_device_id selftest_i2c_bus_match[] = {
+static const struct of_device_id selftest_i2c_bus_match[] = {
 	{ .compatible = "selftest-i2c-bus", },
 	{},
 };

  parent reply	other threads:[~2015-03-14  7:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-14  5:25 [Patch 0/5] dt: unittest: fix breakage and warnings Frank Rowand
2015-03-14  6:57 ` [Patch 1/5] dt: unittest: early return from test skips tests Frank Rowand
2015-03-28  3:58   ` Grant Likely
2015-03-14  6:59 ` [Patch 2/5] dt: unittest: typo in error string Frank Rowand
2015-03-14  7:00 ` Frank Rowand [this message]
2015-03-14  7:02 ` [Patch 4/5] dt: unittest: reduce checkpatch noise - line after declarations Frank Rowand
2015-03-14  7:04 ` [Patch 5/5] dt: unittest: breadcrumbs to reduce pain of future maintainers Frank Rowand
2015-03-28  2:55 ` [Patch 0/5] dt: unittest: fix breakage and warnings Grant Likely

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=5503DC94.1060405@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).