Skip to contentSkip to conversation

staging: rtl8192e: Fix conflicting types error with net_device.

PATCH Superseded Teddy Engel 2 participants 2 messages Jun 25, 2024 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: rtl8192e: Fix conflicting types error with net_device.

Add a pre-declaration of struct net_device so the compiler is able to use rtl_pci.h / rtl_cam.h.

Fix for commit: 7dff0b27d9c842f88149bf611cbc0b59be1dcd3c:
[34/59] staging: rtl89192e: Remove unnecessary pre-declaration of struct net_device.

---
v2: Add commit id that's being fixed.

 drivers/staging/rtl8192e/rtl8192e/rtl_cam.h | 2 ++
 drivers/staging/rtl8192e/rtl8192e/rtl_pci.h | 2 ++
 2 files changed, 4 insertions(+)
drivers/staging/rtl8192e/rtl8192e/rtl_cam.h +2 -0
index 3a5635494385..9deffdf96072 100644
@@ -12,6 +12,8 @@
 
 #include <linux/types.h>
 
+struct net_device;
+
 void rtl92e_cam_reset(struct net_device *dev);
 void rtl92e_enable_hw_security_config(struct net_device *dev);
 void rtl92e_set_key(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
drivers/staging/rtl8192e/rtl8192e/rtl_pci.h +2 -0
index c645775b2150..3e39c4835ac8 100644
@@ -13,6 +13,8 @@
 #include <linux/types.h>
 #include <linux/pci.h>
 
+struct net_device;
+
 bool rtl92e_check_adapter(struct pci_dev *pdev, struct net_device *dev);
 
 #endif
Signature · 1 line
2.39.2
#1 lore raw
Quoted 7 lines · Teddy Engel

Add a pre-declaration of struct net_device so the compiler is able to use rtl_pci.h / rtl_cam.h.

Fix for commit: 7dff0b27d9c842f88149bf611cbc0b59be1dcd3c:
[34/59] staging: rtl89192e: Remove unnecessary pre-declaration of struct net_device.

Quoted 5 lines

---
v2: Add commit id that's being fixed.

You do that with a "Fixes:" tag, not the paragraph you wrote above :)

The documentation should explain how to do it, right?

thanks,

greg k-h