linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] power: nvmem-reboot-mode: cast away pointer type confusion
@ 2019-09-16  1:54 Adam Borowski
  0 siblings, 0 replies; only message in thread
From: Adam Borowski @ 2019-09-16  1:54 UTC (permalink / raw)
  To: Sebastian Reichel, linux-pm, Han Nandor; +Cc: Adam Borowski

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 --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");
 
-- 
2.23.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-16  1:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16  1:54 [PATCH] power: nvmem-reboot-mode: cast away pointer type confusion Adam Borowski

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).