[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181218163927.733959335@linuxfoundation.org>
Date: Tue, 18 Dec 2018 17:39:17 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Brendan Higgins <brendanhiggins@...gle.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.19 05/44] i2c: aspeed: fix build warning
4.19-stable review patch. If anyone has any objections, please let me know.
------------------
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@...db.de>
Reviewed-by: Brendan Higgins <brendanhiggins@...gle.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
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.19.1
Powered by blists - more mailing lists