From: Arnd Bergmann <arnd@arndb.de>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nandor Han <nandor.han@vaisala.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Fabrice Gasnier <fabrice.gasnier@st.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] nvmem: fix nvmem_cell_write() prototype
Date: Mon, 8 Jul 2019 14:51:07 +0200 [thread overview]
Message-ID: <20190708125115.3731543-1-arnd@arndb.de> (raw)
The dummy declaration for nvmem_cell_write() has a different prototype
from the one that is normally used, and it causes a warning when
CONFIG_NVMEM is disabled:
drivers/power/reset/nvmem-reboot-mode.c:27:42: error: incompatible pointer types passing 'unsigned int *' to parameter
of type 'const char *' [-Werror,-Wincompatible-pointer-types]
ret = nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic));
Make the second argument a void pointer like the other prototype has.
Fixes: 69aba7948cbe ("nvmem: Add a simple NVMEM framework for consumers")
Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/nvmem-consumer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index 8f8be5b00060..459df4ba5408 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -118,7 +118,7 @@ static inline void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
}
static inline int nvmem_cell_write(struct nvmem_cell *cell,
- const char *buf, size_t len)
+ const void *buf, size_t len)
{
return -EOPNOTSUPP;
}
--
2.20.0
reply other threads:[~2019-07-08 12:51 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=20190708125115.3731543-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=bgolaszewski@baylibre.com \
--cc=fabrice.gasnier@st.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=nandor.han@vaisala.com \
--cc=sebastian.reichel@collabora.com \
--cc=srinivas.kandagatla@linaro.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®