Skip to contentSkip to conversation

dmaengine: qcom_hidma: hide MSI handler when unused

PATCH Applied Arnd Bergmann 3 participants 3 messages Nov 8, 2016 – Nov 14, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: qcom_hidma: hide MSI handler when unused

The newly added MSI support causes a harmless warning when MSI is disabled:

drivers/dma/qcom/hidma.c:558:20: error: 'hidma_chirq_handler_msi' defined but not used [-Werror=unused-function]

This adds another #ifdef to match that around the users of the function.

Fixes 1c0e3e82a7fb ("dmaengine: qcom_hidma: add MSI support for interrupts")
---
 drivers/dma/qcom/hidma.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/dma/qcom/hidma.c +2 -0
index d5e7991ad737..10425e134e06 100644
@@ -555,6 +555,7 @@ static irqreturn_t hidma_chirq_handler(int chirq, void *arg)
 	return hidma_ll_inthandler(chirq, lldev);
 }
 
+#ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN
 static irqreturn_t hidma_chirq_handler_msi(int chirq, void *arg)
 {
 	struct hidma_lldev **lldevp = arg;
@@ -563,6 +564,7 @@ static irqreturn_t hidma_chirq_handler_msi(int chirq, void *arg)
 	return hidma_ll_inthandler_msi(chirq, *lldevp,
 				       1 << (chirq - dmadev->msi_virqbase));
 }
+#endif
 
 static ssize_t hidma_show_values(struct device *dev,
 				 struct device_attribute *attr, char *buf)
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Arnd Bergmann

The newly added MSI support causes a harmless warning when MSI is disabled:

drivers/dma/qcom/hidma.c:558:20: error: 'hidma_chirq_handler_msi' defined but not used [-Werror=unused-function]

This adds another #ifdef to match that around the users of the function.

Fixes 1c0e3e82a7fb ("dmaengine: qcom_hidma: add MSI support for interrupts")

Thanks for the clean up.

Quoted 25 lines
---
 drivers/dma/qcom/hidma.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/dma/qcom/hidma.c +2 -0
index d5e7991ad737..10425e134e06 100644
@@ -555,6 +555,7 @@ static irqreturn_t hidma_chirq_handler(int chirq, void *arg)
 	return hidma_ll_inthandler(chirq, lldev);
 }
 
+#ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN
 static irqreturn_t hidma_chirq_handler_msi(int chirq, void *arg)
 {
 	struct hidma_lldev **lldevp = arg;
@@ -563,6 +564,7 @@ static irqreturn_t hidma_chirq_handler_msi(int chirq, void *arg)
 	return hidma_ll_inthandler_msi(chirq, *lldevp,
 				       1 << (chirq - dmadev->msi_virqbase));
 }
+#endif
 
 static ssize_t hidma_show_values(struct device *dev,
 				 struct device_attribute *attr, char *buf)
Signature · 3 lines
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
Applied
#2 lore raw
In reply to Arnd Bergmann
Quoted 6 lines · Arnd Bergmann

The newly added MSI support causes a harmless warning when MSI is disabled:

drivers/dma/qcom/hidma.c:558:20: error: 'hidma_chirq_handler_msi' defined but not used [-Werror=unused-function]

This adds another #ifdef to match that around the users of the function.

Applied, thanks

Signature · 1 line
~Vinod