Skip to contentSkip to conversation

hwrng: omap3-rom fix pointer warning for omap3_rom_rng_idle

PATCH In review Ben Dooks 2 participants 2 messages Oct 15, 2019

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 hwrng: omap3-rom fix pointer warning for omap3_rom_rng_idle

The omap3_rom_rng_idle function takes a pointer, so give it a pointer instead of a plain 0. This fixes the following sparse warning:

drivers/char/hw_random/omap3-rom-rng.c:115:28: warning: Using plain integer as NULL pointer

---
Cc: Arnd Bergmann <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/char/hw_random/omap3-rom-rng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/hw_random/omap3-rom-rng.c +1 -1
index 38b719017186..75fe3dc83d28 100644
@@ -112,7 +112,7 @@ static int omap3_rom_rng_probe(struct platform_device *pdev)
 	ret = clk_prepare_enable(rng_clk);
 	if (ret)
 		return ret;
-	omap3_rom_rng_idle(0);
+	omap3_rom_rng_idle(NULL);
 
 	return hwrng_register(&omap3_rom_rng_ops);
 }
Signature · 1 line
2.23.0
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Ben Dooks

The omap3_rom_rng_idle function takes a pointer, so give it a pointer instead of a plain 0. This fixes the following sparse warning:

Quoted 8 lines

drivers/char/hw_random/omap3-rom-rng.c:115:28: warning: Using plain integer as NULL pointer

---
Cc: Arnd Bergmann <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Cc: [email protected]