linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Brendan Higgins <brendanhiggins@google.com>,
	Joel Stanley <joel@jms.id.au>
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	openbmc@lists.ozlabs.org, linux-aspeed@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/7] [stable-4.19] i2c: aspeed: fix build warning
Date: Fri, 14 Dec 2018 23:10:10 +0100	[thread overview]
Message-ID: <20181214221023.3878670-6-arnd@arndb.de> (raw)
In-Reply-To: <20181214221023.3878670-1-arnd@arndb.de>

Upstream commit 3e9efc3299dd ("i2c: aspeed: Handle master/slave combined irq events
properly") reworked the interrupt handling and fixed a warning in the process:

drivers/i2c/busses/i2c-aspeed.c: In function 'aspeed_i2c_bus_irq':
drivers/i2c/busses/i2c-aspeed.c:567:1: error: label 'out' defined but not used [-Werror=unused-label]

The warning is still present in v4.19.8 and can be fixed either by applying
that original patch, or by adding a simple #ifdef.

Here, I choose the second simpler option as the original patch seems too
invasive for a stable backport.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/i2c/busses/i2c-aspeed.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index a4f956c6d567..a19fbff16861 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -555,7 +555,7 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id)
 	spin_lock(&bus->lock);
 
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
-	if (aspeed_i2c_slave_irq(bus)) {
+	if (IS_ENABLED(CONFIG_I2C_SLAVE) && aspeed_i2c_slave_irq(bus)) {
 		dev_dbg(bus->dev, "irq handled by slave.\n");
 		ret = true;
 		goto out;
@@ -564,7 +564,9 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id)
 
 	ret = aspeed_i2c_master_irq(bus);
 
+#if IS_ENABLED(CONFIG_I2C_SLAVE)
 out:
+#endif
 	spin_unlock(&bus->lock);
 	return ret ? IRQ_HANDLED : IRQ_NONE;
 }
-- 
2.20.0


  parent reply	other threads:[~2018-12-14 22:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 22:10 [PATCH 0/7] v4.19-stable randconfig fixes Arnd Bergmann
2018-12-14 22:10 ` [PATCH 1/7] sched/pelt: Fix warning and clean up IRQ PELT config Arnd Bergmann
2018-12-14 22:10 ` [PATCH 2/7] scsi: raid_attrs: fix unused variable warning Arnd Bergmann
2018-12-14 22:10 ` [PATCH 3/7] staging: olpc_dcon: add a missing dependency Arnd Bergmann
2018-12-14 22:10 ` [PATCH 4/7] slimbus: ngd: mark PM functions as __maybe_unused Arnd Bergmann
2018-12-14 22:10 ` Arnd Bergmann [this message]
2018-12-14 23:30   ` [PATCH 5/7] [stable-4.19] i2c: aspeed: fix build warning Brendan Higgins
2018-12-14 22:10 ` [PATCH 6/7] [stable-4.19] ARM: dts: qcom-apq8064-arrow-sd-600eval fix graph_endpoint warning Arnd Bergmann
2018-12-14 22:10 ` [PATCH 7/7] [stable-4.19] drm/msm: fix address space warning Arnd Bergmann
2018-12-18  0:20 ` [PATCH 0/7] v4.19-stable randconfig fixes Sasha Levin
2018-12-18 15:12   ` Greg Kroah-Hartman
2018-12-18 16:20     ` Sasha Levin

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=20181214221023.3878670-6-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=brendanhiggins@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joel@jms.id.au \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).