Skip to contentSkip to conversation

Patch "gpio: intel-mid: Fix build warning when !CONFIG_PM" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Feb 23, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

gpio: intel-mid: Fix build warning when !CONFIG_PM

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
gpio-intel-mid-fix-build-warning-when-config_pm.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From fbc2a294f29e726787a0f5238b27137904f26b81 Mon Sep 17 00:00:00 2001

From: Augusto Mecking Caringi <[email protected]>
Date: Mon, 16 Jan 2017 14:30:41 +0000
Subject: gpio: intel-mid: Fix build warning when !CONFIG_PM
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Augusto Mecking Caringi <[email protected]>

commit fbc2a294f29e726787a0f5238b27137904f26b81 upstream.

The only usage of function intel_gpio_runtime_idle() is here (in the same file):

static const struct dev_pm_ops intel_gpio_pm_ops = {
SET_RUNTIME_PM_OPS(NULL, NULL, intel_gpio_runtime_idle)
};

And when CONFIG_PM is not set, the macro SET_RUNTIME_PM_OPS expands to nothing, causing the following compiler warning:

drivers/gpio/gpio-intel-mid.c:324:12: warning: ‘intel_gpio_runtime_idle’ defined but not used [-Wunused-function]
static int intel_gpio_runtime_idle(struct device *dev)

Fix it by annotating the function with __maybe_unused.

---
 drivers/gpio/gpio-intel-mid.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-intel-mid.c +1 -1
@@ -326,7 +326,7 @@ static void intel_mid_irq_init_hw(struct
 	}
 }
 
-static int intel_gpio_runtime_idle(struct device *dev)
+static int __maybe_unused intel_gpio_runtime_idle(struct device *dev)
 {
 	int err = pm_schedule_suspend(dev, 500);
 	return err ?: -EBUSY;

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/gpio-intel-mid-fix-build-warning-when-config_pm.patch