Re: [PATCH v3] staging: rtl8192e: Fix conflicting types error with net_device.

Philipp Hortmann <[email protected]> Tue, 25 Jun 2024 22:52:18 +0200
Newsgroups org.linuxdriverproject.driverdev-devel,dev.linux.lists.linux-staging,dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 6/25/24 18:33, Teddy Engel wrote:
> Add a pre-declaration of struct net_device so the compiler is able to
> use rtl_pci.h / rtl_cam.h.
> 
> Signed-off-by: Teddy Engel <[email protected]>
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> Fixes: 7dff0b27d9c8 ("staging: rtl8192e: Remove unnecessary pre-declaration of struct net_device")
> ---
> v3: Replace ad-hoc commit id / subject by expected Fixes tag.
> v2: Add commit id / commit subject  under description.
> 
>   drivers/staging/rtl8192e/rtl8192e/rtl_cam.h | 2 ++
>   drivers/staging/rtl8192e/rtl8192e/rtl_pci.h | 2 ++
>   2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h
> index 3a5635494385..9deffdf96072 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h
> @@ -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,
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.h b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.h
> index c645775b2150..3e39c4835ac8 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.h
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.h
> @@ -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

Tested-by: Philipp Hortmann <[email protected]>
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel