lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon,  8 Jul 2019 14:51:07 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Maxime Ripard <maxime.ripard@...e-electrons.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Nandor Han <nandor.han@...sala.com>,
        Sebastian Reichel <sebastian.reichel@...labora.com>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Fabrice Gasnier <fabrice.gasnier@...com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] nvmem: fix nvmem_cell_write() prototype

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@...db.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ