From: Arnd Bergmann <arnd@arndb.de>
To: Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Marek Szyprowski <m.szyprowski@samsung.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] of: reserved_mem: fix 'const' annotation
Date: Thu, 11 May 2017 14:24:50 +0200 [thread overview]
Message-ID: <20170511122458.3862716-2-arnd@arndb.de> (raw)
In-Reply-To: <20170511122458.3862716-1-arnd@arndb.de>
It's the pointer that is supposed to be const, not the return
type of the function.
drivers/of/of_reserved_mem.c: In function '__reserved_mem_init_node':
drivers/of/of_reserved_mem.c:200:7: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
int const (*initfn)(struct reserved_mem *rmem) = i->data;
Fixes: 17a70355ea57 ("of: fix sparse warnings in fdt, irq, reserved mem, and resolver code")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/of/of_reserved_mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 4dec07ea510f..3f03ec004829 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -197,7 +197,7 @@ static int __init __reserved_mem_init_node(struct reserved_mem *rmem)
const struct of_device_id *i;
for (i = __reservedmem_of_table; i < &__rmem_of_table_sentinel; i++) {
- int const (*initfn)(struct reserved_mem *rmem) = i->data;
+ int (* const initfn)(struct reserved_mem *rmem) = i->data;
const char *compat = i->compatible;
if (!of_flat_dt_is_compatible(rmem->fdt_node, compat))
--
2.9.0
next prev parent reply other threads:[~2017-05-11 12:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 12:24 [PATCH 1/2] of: remove extraneous 'const' in typedef Arnd Bergmann
2017-05-11 12:24 ` Arnd Bergmann [this message]
2017-05-11 14:50 ` [PATCH 2/2] of: reserved_mem: fix 'const' annotation Rob Herring
2017-05-11 15:00 ` Arnd Bergmann
2017-05-11 15:59 ` Luc Van Oostenryck
2017-05-11 14:44 ` [PATCH 1/2] of: remove extraneous 'const' in typedef Rob Herring
2017-05-11 15:03 ` Arnd Bergmann
2017-05-11 15:13 ` Rob Herring
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=20170511122458.3862716-2-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--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
all inboxes | Powered by JetHome®