Skip to contentSkip to conversation

Incorrect checkpatch warning

PATCH Adrian Hunter 2 participants 2 messages Nov 4, 2011

Subsystems (2)
lore
Share & tools
lore

Adrian Hunter

author maintainer
#0 lore raw

Hi

This checkpatch warning looks wrong:

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable #73: FILE: drivers/mmc/host/sdhci-pci-data.c:5:
+EXPORT_SYMBOL_GPL(sdhci_pci_get_data);

The patch has this:

drivers/mmc/host/sdhci-pci-data.c new file +5 -0
new file mode 100644
index 0000000..a611217
@@ -0,0 +1,5 @@
+#include <linux/module.h>
+#include <linux/mmc/sdhci-pci-data.h>
+
+struct sdhci_pci_data *(*sdhci_pci_get_data)(struct pci_dev *pdev, int slotno);
+EXPORT_SYMBOL_GPL(sdhci_pci_get_data);

Regards
Adrian

#1 lore raw
Quoted 30 lines · Adrian Hunter

Hi

This checkpatch warning looks wrong:

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable #73: FILE: drivers/mmc/host/sdhci-pci-data.c:5:
+EXPORT_SYMBOL_GPL(sdhci_pci_get_data);

The patch has this:

drivers/mmc/host/sdhci-pci-data.c new file +5 -0
new file mode 100644
index 0000000..a611217
@@ -0,0 +1,5 @@
+#include <linux/module.h>
+#include <linux/mmc/sdhci-pci-data.h>
+
+struct sdhci_pci_data *(*sdhci_pci_get_data)(struct pci_dev *pdev, int slotno);
+EXPORT_SYMBOL_GPL(sdhci_pci_get_data);

since it is a prototype you get that message. use EXPORT_SYMBOL below the function definition and not below prototype declaration

Regards
Adrian
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html