Skip to contentSkip to conversation

hwrng: atmel - drop __maybe_unused from atmel_trng_pm_ops

PATCH Superseded Thorsten Blum 2 participants 2 messages Jun 6 – Jul 5

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwrng: atmel - drop __maybe_unused from atmel_trng_pm_ops

Since atmel_trng_driver keeps atmel_trng_pm_ops referenced and pm_ptr() uses IS_ENABLED(), which allows the compiler to optimize away unused variables, drop the redundant __maybe_unused annotation.

---
 drivers/char/hw_random/atmel-rng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/hw_random/atmel-rng.c +1 -1
index 6ed24be3481d..10082add0886 100644
@@ -186,7 +186,7 @@ static int __maybe_unused atmel_trng_runtime_resume(struct device *dev)
 	return atmel_trng_init(trng);
 }
 
-static const struct dev_pm_ops __maybe_unused atmel_trng_pm_ops = {
+static const struct dev_pm_ops atmel_trng_pm_ops = {
 	SET_RUNTIME_PM_OPS(atmel_trng_runtime_suspend,
 			   atmel_trng_runtime_resume, NULL)
 	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,

base-commit: 79bbe453e5bfa6e1c6aa2e8329bfc8f152b81c9b

maintainer
#1 lore raw
Quoted 8 lines · Thorsten Blum

Since atmel_trng_driver keeps atmel_trng_pm_ops referenced and pm_ptr() uses IS_ENABLED(), which allows the compiler to optimize away unused variables, drop the redundant __maybe_unused annotation.

---
 drivers/char/hw_random/atmel-rng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt