mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Tony Lindgren <tony@atomide.com>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: [PATCH] bus: ti-sysc: mark PM functions as __maybe_unused
Date: Fri, 13 Oct 2017 11:25:32 +0200	[thread overview]
Message-ID: <20171013092554.531186-1-arnd@arndb.de> (raw)

The new bus driver causes a harmless compile-time warning when
CONFIG_PM is disabled:

drivers/bus/ti-sysc.c:440:12: error: 'sysc_runtime_resume' defined but not used [-Werror=unused-function]
 static int sysc_runtime_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~
drivers/bus/ti-sysc.c:421:12: error: 'sysc_runtime_suspend' defined but not used [-Werror=unused-function]
 static int sysc_runtime_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~

This marks the two unused functions as __maybe_unused to shut up
that warning.

Fixes: 0eecc636e5a2 ("bus: ti-sysc: Add minimal TI sysc interconnect target driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/bus/ti-sysc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 9b3cb278ce41..8b95d0f0c319 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -418,7 +418,7 @@ static void sysc_show_registers(struct sysc *ddata)
 		buf);
 }
 
-static int sysc_runtime_suspend(struct device *dev)
+static int __maybe_unused sysc_runtime_suspend(struct device *dev)
 {
 	struct sysc *ddata;
 	int i;
@@ -437,7 +437,7 @@ static int sysc_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int sysc_runtime_resume(struct device *dev)
+static int __maybe_unused sysc_runtime_resume(struct device *dev)
 {
 	struct sysc *ddata;
 	int i, error;
-- 
2.9.0

             reply	other threads:[~2017-10-13  9:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13  9:25 Arnd Bergmann [this message]
2017-10-13 17:27 ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171013092554.531186-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®