Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1348247 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2016-03-02 17:10 +0100 |
| Last post | 2016-03-03 00:50 +0100 |
| Articles | 5 on this page of 25 — 9 participants |
Back to article view | Back to linux.kernel
[PATCH 00/14] drivers: use __maybe_unused to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
[PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
RE: [PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide pm functions Frank Li <frank.li@nxp.com> - 2016-03-02 17:40 +0100
Re: [PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide pm functions Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-03-02 18:20 +0100
[PATCH 03/14] power: ipaq-micro-battery: use __maybe_unused to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
Re: [PATCH 03/14] power: ipaq-micro-battery: use __maybe_unused to hide pm functions Sebastian Reichel <sre@kernel.org> - 2016-03-03 15:30 +0100
[PATCH 10/14] wireless: cw1200: use __maybe_unused to hide pm functions_ Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
[PATCH 11/14] input: spear-keyboard: use __maybe_unused to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
Re: [PATCH 11/14] input: spear-keyboard: use __maybe_unused to hide pm functions Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-03-02 18:20 +0100
Re: [PATCH 01/14] pinctrl: at91: use __maybe_unused to hide pm functions Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-03-02 17:10 +0100
[PATCH 13/14] [media] omap3isp: use IS_ENABLED() to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
[PATCH 06/14] dma: sirf: use __maybe_unused to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
Re: [PATCH 06/14] dma: sirf: use __maybe_unused to hide pm functions Vinod Koul <vinod.koul@intel.com> - 2016-03-03 04:50 +0100
Re: [PATCH 06/14] dma: sirf: use __maybe_unused to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-03 13:40 +0100
[PATCH 01/14] pinctrl: at91: use __maybe_unused to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
Re: [PATCH 01/14] pinctrl: at91: use __maybe_unused to hide pm functions Ludovic Desroches <ludovic.desroches@atmel.com> - 2016-03-02 17:50 +0100
[PATCH 09/14] amd-xgbe: use __maybe_unused to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
[PATCH 04/14] power: pm2301-charger: use __maybe_unused to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
Re: [PATCH 04/14] power: pm2301-charger: use __maybe_unused to hide pm functions Sebastian Reichel <sre@kernel.org> - 2016-03-03 15:30 +0100
[PATCH 14/14] ASoC: rockchip: use __maybe_unused to hide st_irq_syscfg_resume Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
[PATCH 08/14] scsi: mvumi: use __maybe_unused to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
Re: [PATCH 08/14] scsi: mvumi: use __maybe_unused to hide pm functions Johannes Thumshirn <jthumshirn@suse.de> - 2016-03-03 09:40 +0100
[PATCH 02/14] irqchip: st: use __maybe_unused to hide st_irq_syscfg_resume Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
[PATCH 07/14] hw_random: exynos: use __maybe_unused to hide pm functions Arnd Bergmann <arnd@arndb.de> - 2016-03-02 17:10 +0100
Re: [PATCH 07/14] hw_random: exynos: use __maybe_unused to hide pm functions Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-03-03 00:50 +0100
Page 2 of 2 — ← Prev page 1 [2]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-03-02 17:10 +0100 |
| Subject | [PATCH 08/14] scsi: mvumi: use __maybe_unused to hide pm functions |
| Message-ID | <r8hvD-1yT-69@gated-at.bofh.it> |
| In reply to | #1348247 |
The mvumi scsi hides the references to its suspend/resume functions
in an #ifdef but does not hide the implementation the same way:
drivers/scsi/mvumi.c:2632:12: error: 'mvumi_suspend' defined but not used [-Werror=unused-function]
drivers/scsi/mvumi.c:2651:12: error: 'mvumi_resume' defined but not used [-Werror=unused-function]
This adds __maybe_unused annotations so the compiler knows
it can silently drop them instead of warning, while avoiding
the addition of another #ifdef.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/scsi/mvumi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index 02360de6b7e0..39285070f3b5 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -2629,7 +2629,7 @@ static void mvumi_shutdown(struct pci_dev *pdev)
mvumi_flush_cache(mhba);
}
-static int mvumi_suspend(struct pci_dev *pdev, pm_message_t state)
+static int __maybe_unused mvumi_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct mvumi_hba *mhba = NULL;
@@ -2648,7 +2648,7 @@ static int mvumi_suspend(struct pci_dev *pdev, pm_message_t state)
return 0;
}
-static int mvumi_resume(struct pci_dev *pdev)
+static int __maybe_unused mvumi_resume(struct pci_dev *pdev)
{
int ret;
struct mvumi_hba *mhba = NULL;
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Johannes Thumshirn <jthumshirn@suse.de> |
|---|---|
| Date | 2016-03-03 09:40 +0100 |
| Subject | Re: [PATCH 08/14] scsi: mvumi: use __maybe_unused to hide pm functions |
| Message-ID | <r8wXF-4lu-35@gated-at.bofh.it> |
| In reply to | #1348271 |
On Wed, Mar 02, 2016 at 04:59:00PM +0100, Arnd Bergmann wrote: > The mvumi scsi hides the references to its suspend/resume functions > in an #ifdef but does not hide the implementation the same way: > > drivers/scsi/mvumi.c:2632:12: error: 'mvumi_suspend' defined but not used [-Werror=unused-function] > drivers/scsi/mvumi.c:2651:12: error: 'mvumi_resume' defined but not used [-Werror=unused-function] > > This adds __maybe_unused annotations so the compiler knows > it can silently drop them instead of warning, while avoiding > the addition of another #ifdef. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> -- Johannes Thumshirn Storage jthumshirn@suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-03-02 17:10 +0100 |
| Subject | [PATCH 02/14] irqchip: st: use __maybe_unused to hide st_irq_syscfg_resume |
| Message-ID | <r8hvD-1yT-71@gated-at.bofh.it> |
| In reply to | #1348247 |
the st irqchip driver uses SIMPLE_DEV_PM_OPS to conditionally
set its power management functions, but we get a warning
about st_irq_syscfg_resume being unused when CONFIG_PM is not
set:
drivers/irqchip/irq-st.c:183:12: error: 'st_irq_syscfg_resume' defined but not used [-Werror=unused-function]
This adds a __maybe_unused annotation so the compiler knows
it can silently drop it instead of warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/irqchip/irq-st.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-st.c b/drivers/irqchip/irq-st.c
index 9af48a85c16f..5e0e250db0be 100644
--- a/drivers/irqchip/irq-st.c
+++ b/drivers/irqchip/irq-st.c
@@ -180,7 +180,7 @@ static int st_irq_syscfg_probe(struct platform_device *pdev)
return st_irq_syscfg_enable(pdev);
}
-static int st_irq_syscfg_resume(struct device *dev)
+static int __maybe_unused st_irq_syscfg_resume(struct device *dev)
{
struct st_irq_syscfg *ddata = dev_get_drvdata(dev);
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-03-02 17:10 +0100 |
| Subject | [PATCH 07/14] hw_random: exynos: use __maybe_unused to hide pm functions |
| Message-ID | <r8hvE-1yT-85@gated-at.bofh.it> |
| In reply to | #1348247 |
The exynos random driver uses #ifdef to check for CONFIG_PM, but
then uses SIMPLE_DEV_PM_OPS, which leaves the references out when
CONFIG_PM_SLEEP is not defined, so we get a warning with
PM=y && PM_SLEEP=n:
drivers/char/hw_random/exynos-rng.c:166:12: error: 'exynos_rng_suspend' defined but not used [-Werror=unused-function]
drivers/char/hw_random/exynos-rng.c:171:12: error: 'exynos_rng_resume' defined but not used [-Werror=unused-function]
This removes the incorrect #ifdef and instead uses a __maybe_unused
annotation to let the compiler know it can silently drop
the function definition.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/char/hw_random/exynos-rng.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c
index 30cf4623184f..ada081232528 100644
--- a/drivers/char/hw_random/exynos-rng.c
+++ b/drivers/char/hw_random/exynos-rng.c
@@ -144,8 +144,7 @@ static int exynos_rng_probe(struct platform_device *pdev)
return devm_hwrng_register(&pdev->dev, &exynos_rng->rng);
}
-#ifdef CONFIG_PM
-static int exynos_rng_runtime_suspend(struct device *dev)
+static int __maybe_unused exynos_rng_runtime_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct exynos_rng *exynos_rng = platform_get_drvdata(pdev);
@@ -155,7 +154,7 @@ static int exynos_rng_runtime_suspend(struct device *dev)
return 0;
}
-static int exynos_rng_runtime_resume(struct device *dev)
+static int __maybe_unused exynos_rng_runtime_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct exynos_rng *exynos_rng = platform_get_drvdata(pdev);
@@ -163,12 +162,12 @@ static int exynos_rng_runtime_resume(struct device *dev)
return clk_prepare_enable(exynos_rng->clk);
}
-static int exynos_rng_suspend(struct device *dev)
+static int __maybe_unused exynos_rng_suspend(struct device *dev)
{
return pm_runtime_force_suspend(dev);
}
-static int exynos_rng_resume(struct device *dev)
+static int __maybe_unused exynos_rng_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct exynos_rng *exynos_rng = platform_get_drvdata(pdev);
@@ -180,7 +179,6 @@ static int exynos_rng_resume(struct device *dev)
return exynos_rng_configure(exynos_rng);
}
-#endif
static const struct dev_pm_ops exynos_rng_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(exynos_rng_suspend, exynos_rng_resume)
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2016-03-03 00:50 +0100 |
| Subject | Re: [PATCH 07/14] hw_random: exynos: use __maybe_unused to hide pm functions |
| Message-ID | <r8oGK-6PW-7@gated-at.bofh.it> |
| In reply to | #1348277 |
On 03.03.2016 00:58, Arnd Bergmann wrote: > The exynos random driver uses #ifdef to check for CONFIG_PM, but > then uses SIMPLE_DEV_PM_OPS, which leaves the references out when > CONFIG_PM_SLEEP is not defined, so we get a warning with > PM=y && PM_SLEEP=n: > > drivers/char/hw_random/exynos-rng.c:166:12: error: 'exynos_rng_suspend' defined but not used [-Werror=unused-function] > drivers/char/hw_random/exynos-rng.c:171:12: error: 'exynos_rng_resume' defined but not used [-Werror=unused-function] > > This removes the incorrect #ifdef and instead uses a __maybe_unused > annotation to let the compiler know it can silently drop > the function definition. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/char/hw_random/exynos-rng.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Best regards, Krzysztof
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.kernel
csiph-web