diff mbox series

power: nvmem-reboot-mode: cast away pointer type confusion

Message ID 20190916015427.129610-1-kilobyte@angband.pl (mailing list archive)
State Not Applicable, archived
Headers show
Series power: nvmem-reboot-mode: cast away pointer type confusion | expand

Commit Message

Adam Borowski Sept. 16, 2019, 1:54 a.m. UTC
As the kernel builds with -Werror=incompatible-pointer-types, this
caused a build failure.

The warning also suggests a question about machines with variable
endianness.

Fixes: 7a78a7f7695bf9ef9cef3c06fbc5fa4573fd0eef
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
 drivers/power/reset/nvmem-reboot-mode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/power/reset/nvmem-reboot-mode.c b/drivers/power/reset/nvmem-reboot-mode.c
index e229308d43e2..606fb7e60590 100644
--- a/drivers/power/reset/nvmem-reboot-mode.c
+++ b/drivers/power/reset/nvmem-reboot-mode.c
@@ -24,7 +24,7 @@  static int nvmem_reboot_mode_write(struct reboot_mode_driver *reboot,
 
 	nvmem_rbm = container_of(reboot, struct nvmem_reboot_mode, reboot);
 
-	ret = nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic));
+	ret = nvmem_cell_write(nvmem_rbm->cell, (char *)&magic, sizeof(magic));
 	if (ret < 0)
 		dev_err(reboot->dev, "update reboot mode bits failed\n");