linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwrng: omap3-rom - Fix unused function warnings
@ 2019-10-22 14:27 Arnd Bergmann
  2019-10-23 13:14 ` Sebastian Reichel
  2019-11-01  6:07 ` Herbert Xu
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2019-10-22 14:27 UTC (permalink / raw)
  To: Matt Mackall, Herbert Xu, Arnd Bergmann, Greg Kroah-Hartman
  Cc: Aaro Koskinen, Adam Ford, Pali Rohár, Sebastian Reichel,
	Tero Kristo, Tony Lindgren, Rob Herring, linux-crypto,
	linux-kernel

When runtime-pm is disabled, we get a few harmless warnings:

drivers/char/hw_random/omap3-rom-rng.c:65:12: error: unused function 'omap_rom_rng_runtime_suspend' [-Werror,-Wunused-function]
drivers/char/hw_random/omap3-rom-rng.c:81:12: error: unused function 'omap_rom_rng_runtime_resume' [-Werror,-Wunused-function]

Mark these functions as __maybe_unused so gcc can drop them
silently.

Fixes: 8d9d4bdc495f ("hwrng: omap3-rom - Use runtime PM instead of custom functions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/char/hw_random/omap3-rom-rng.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c
index 0b90983c95c8..e08a8887e718 100644
--- a/drivers/char/hw_random/omap3-rom-rng.c
+++ b/drivers/char/hw_random/omap3-rom-rng.c
@@ -62,7 +62,7 @@ static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
 	return r;
 }
 
-static int omap_rom_rng_runtime_suspend(struct device *dev)
+static int __maybe_unused omap_rom_rng_runtime_suspend(struct device *dev)
 {
 	struct omap_rom_rng *ddata;
 	int r;
@@ -78,7 +78,7 @@ static int omap_rom_rng_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int omap_rom_rng_runtime_resume(struct device *dev)
+static int __maybe_unused omap_rom_rng_runtime_resume(struct device *dev)
 {
 	struct omap_rom_rng *ddata;
 	int r;
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] hwrng: omap3-rom - Fix unused function warnings
  2019-10-22 14:27 [PATCH] hwrng: omap3-rom - Fix unused function warnings Arnd Bergmann
@ 2019-10-23 13:14 ` Sebastian Reichel
  2019-10-23 14:39   ` Tony Lindgren
  2019-11-01  6:07 ` Herbert Xu
  1 sibling, 1 reply; 4+ messages in thread
From: Sebastian Reichel @ 2019-10-23 13:14 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Matt Mackall, Herbert Xu, Greg Kroah-Hartman, Aaro Koskinen,
	Adam Ford, Pali Rohár, Tero Kristo, Tony Lindgren,
	Rob Herring, linux-crypto, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]

Hi,

On Tue, Oct 22, 2019 at 04:27:31PM +0200, Arnd Bergmann wrote:
> When runtime-pm is disabled, we get a few harmless warnings:
> 
> drivers/char/hw_random/omap3-rom-rng.c:65:12: error: unused function 'omap_rom_rng_runtime_suspend' [-Werror,-Wunused-function]
> drivers/char/hw_random/omap3-rom-rng.c:81:12: error: unused function 'omap_rom_rng_runtime_resume' [-Werror,-Wunused-function]
> 
> Mark these functions as __maybe_unused so gcc can drop them
> silently.
> 
> Fixes: 8d9d4bdc495f ("hwrng: omap3-rom - Use runtime PM instead of custom functions")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

>  drivers/char/hw_random/omap3-rom-rng.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c
> index 0b90983c95c8..e08a8887e718 100644
> --- a/drivers/char/hw_random/omap3-rom-rng.c
> +++ b/drivers/char/hw_random/omap3-rom-rng.c
> @@ -62,7 +62,7 @@ static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
>  	return r;
>  }
>  
> -static int omap_rom_rng_runtime_suspend(struct device *dev)
> +static int __maybe_unused omap_rom_rng_runtime_suspend(struct device *dev)
>  {
>  	struct omap_rom_rng *ddata;
>  	int r;
> @@ -78,7 +78,7 @@ static int omap_rom_rng_runtime_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int omap_rom_rng_runtime_resume(struct device *dev)
> +static int __maybe_unused omap_rom_rng_runtime_resume(struct device *dev)
>  {
>  	struct omap_rom_rng *ddata;
>  	int r;
> -- 
> 2.20.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] hwrng: omap3-rom - Fix unused function warnings
  2019-10-23 13:14 ` Sebastian Reichel
@ 2019-10-23 14:39   ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2019-10-23 14:39 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Arnd Bergmann, Matt Mackall, Herbert Xu, Greg Kroah-Hartman,
	Aaro Koskinen, Adam Ford, Pali Rohár, Tero Kristo,
	Rob Herring, linux-crypto, linux-kernel

* Sebastian Reichel <sre@kernel.org> [191023 13:15]:
> Hi,
> 
> On Tue, Oct 22, 2019 at 04:27:31PM +0200, Arnd Bergmann wrote:
> > When runtime-pm is disabled, we get a few harmless warnings:
> > 
> > drivers/char/hw_random/omap3-rom-rng.c:65:12: error: unused function 'omap_rom_rng_runtime_suspend' [-Werror,-Wunused-function]
> > drivers/char/hw_random/omap3-rom-rng.c:81:12: error: unused function 'omap_rom_rng_runtime_resume' [-Werror,-Wunused-function]
> > 
> > Mark these functions as __maybe_unused so gcc can drop them
> > silently.
> > 
> > Fixes: 8d9d4bdc495f ("hwrng: omap3-rom - Use runtime PM instead of custom functions")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> 
> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>

Thanks for fixing these similar issues again:

Reviewwed-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] hwrng: omap3-rom - Fix unused function warnings
  2019-10-22 14:27 [PATCH] hwrng: omap3-rom - Fix unused function warnings Arnd Bergmann
  2019-10-23 13:14 ` Sebastian Reichel
@ 2019-11-01  6:07 ` Herbert Xu
  1 sibling, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2019-11-01  6:07 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Matt Mackall, Greg Kroah-Hartman, Aaro Koskinen, Adam Ford,
	Pali Rohár, Sebastian Reichel, Tero Kristo, Tony Lindgren,
	Rob Herring, linux-crypto, linux-kernel

On Tue, Oct 22, 2019 at 04:27:31PM +0200, Arnd Bergmann wrote:
> When runtime-pm is disabled, we get a few harmless warnings:
> 
> drivers/char/hw_random/omap3-rom-rng.c:65:12: error: unused function 'omap_rom_rng_runtime_suspend' [-Werror,-Wunused-function]
> drivers/char/hw_random/omap3-rom-rng.c:81:12: error: unused function 'omap_rom_rng_runtime_resume' [-Werror,-Wunused-function]
> 
> Mark these functions as __maybe_unused so gcc can drop them
> silently.
> 
> Fixes: 8d9d4bdc495f ("hwrng: omap3-rom - Use runtime PM instead of custom functions")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/char/hw_random/omap3-rom-rng.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-01  6:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-22 14:27 [PATCH] hwrng: omap3-rom - Fix unused function warnings Arnd Bergmann
2019-10-23 13:14 ` Sebastian Reichel
2019-10-23 14:39   ` Tony Lindgren
2019-11-01  6:07 ` Herbert Xu

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