linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] serial: pxa2xx: remove __deprecated annotation
@ 2016-11-08 14:50 Arnd Bergmann
  2016-11-08 14:50 ` [PATCH 2/2] serial: pxa2xx: mark PM functions as __maybe_unused Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2016-11-08 14:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Arnd Bergmann, Jiri Slaby, Peter Hurley, Sergey Yanovich,
	linux-serial, linux-kernel

An otherwise very nice cleanup of the pxa2xx uart support marked the
init function of this driver as __deprecated:

drivers/tty/serial/pxa.c:944:1: error: 'serial_pxa_init' is deprecated [-Werror=deprecated-declarations]

This seems unhelpful to me, as we now warn for every allmodconfig build,
which is otherwise free of warnings on most architectures. Let's
remove the annotation again.

Fixes: ab28f51c77cd ("serial: rewrite pxa2xx-uart to use 8250_core")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/tty/serial/pxa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
index b9dd787cb561..75952811c0da 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
@@ -927,7 +927,7 @@ static struct platform_driver serial_pxa_driver = {
 
 
 /* 8250 driver for PXA serial ports should be used */
-static int __deprecated __init serial_pxa_init(void)
+static int __init serial_pxa_init(void)
 {
 	int ret;
 
-- 
2.9.0

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

* [PATCH 2/2] serial: pxa2xx: mark PM functions as __maybe_unused
  2016-11-08 14:50 [PATCH 1/2] serial: pxa2xx: remove __deprecated annotation Arnd Bergmann
@ 2016-11-08 14:50 ` Arnd Bergmann
  2016-11-08 17:30   ` Robert Jarzmik
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2016-11-08 14:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Arnd Bergmann, Jiri Slaby, Robert Jarzmik, Sergey Yanovich,
	linux-serial, linux-kernel

The fresh new serial driver for pxa produces warnings when
CONFIG_PM_SLEEP is disabled:

drivers/tty/serial/8250/8250_pxa.c:50:12: error: 'serial_pxa_resume' defined but not used [-Werror=unused-function]
drivers/tty/serial/8250/8250_pxa.c:41:12: error: 'serial_pxa_suspend' defined but not used [-Werror=unused-function]

This removes the #ifdef around the two functions and instead marks both
as __maybe_unused, which is more robust and avoids the warning.

Fixes: ab28f51c77cd ("serial: rewrite pxa2xx-uart to use 8250_core")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/tty/serial/8250/8250_pxa.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pxa.c b/drivers/tty/serial/8250/8250_pxa.c
index 3b08f342851a..31f27d95d8b4 100644
--- a/drivers/tty/serial/8250/8250_pxa.c
+++ b/drivers/tty/serial/8250/8250_pxa.c
@@ -37,8 +37,7 @@ struct pxa8250_data {
 	struct clk		*clk;
 };
 
-#ifdef CONFIG_PM
-static int serial_pxa_suspend(struct device *dev)
+static int __maybe_unused serial_pxa_suspend(struct device *dev)
 {
 	struct pxa8250_data *data = dev_get_drvdata(dev);
 
@@ -47,7 +46,7 @@ static int serial_pxa_suspend(struct device *dev)
 	return 0;
 }
 
-static int serial_pxa_resume(struct device *dev)
+static int __maybe_unused serial_pxa_resume(struct device *dev)
 {
 	struct pxa8250_data *data = dev_get_drvdata(dev);
 
@@ -55,7 +54,6 @@ static int serial_pxa_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static const struct dev_pm_ops serial_pxa_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(serial_pxa_suspend, serial_pxa_resume)
-- 
2.9.0

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

* Re: [PATCH 2/2] serial: pxa2xx: mark PM functions as __maybe_unused
  2016-11-08 14:50 ` [PATCH 2/2] serial: pxa2xx: mark PM functions as __maybe_unused Arnd Bergmann
@ 2016-11-08 17:30   ` Robert Jarzmik
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Jarzmik @ 2016-11-08 17:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Greg Kroah-Hartman, Jiri Slaby, Sergey Yanovich, linux-serial,
	linux-kernel

Arnd Bergmann <arnd@arndb.de> writes:

> The fresh new serial driver for pxa produces warnings when
> CONFIG_PM_SLEEP is disabled:
>
> drivers/tty/serial/8250/8250_pxa.c:50:12: error: 'serial_pxa_resume' defined but not used [-Werror=unused-function]
> drivers/tty/serial/8250/8250_pxa.c:41:12: error: 'serial_pxa_suspend' defined but not used [-Werror=unused-function]
>
> This removes the #ifdef around the two functions and instead marks both
> as __maybe_unused, which is more robust and avoids the warning.
>
> Fixes: ab28f51c77cd ("serial: rewrite pxa2xx-uart to use 8250_core")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

--
Robert

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

end of thread, other threads:[~2016-11-08 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08 14:50 [PATCH 1/2] serial: pxa2xx: remove __deprecated annotation Arnd Bergmann
2016-11-08 14:50 ` [PATCH 2/2] serial: pxa2xx: mark PM functions as __maybe_unused Arnd Bergmann
2016-11-08 17:30   ` Robert Jarzmik

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