[PATCH] staging: r8188eu: include variable declarations from Hal8188EPwrSeq.h

Abdun Nihaal posted 1 patch 4 years, 6 months ago
drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] staging: r8188eu: include variable declarations from Hal8188EPwrSeq.h
Posted by Abdun Nihaal 4 years, 6 months ago
Variable declarations of rtl8188E_power_on_flow, rtl8188E_card_disable_flow
and rtl8188E_enter_lps_flow are present in Hal8188EPwrSeq.h.

A previous commit changed Hal8188EPwrSeq.c to include HalPwrSeqCmd.h
directly instead of Hal8188EPwrSeq.h, causing these sparse warnings:
- symbol 'rtl8188E_power_on_flow' was not declared. Should it be static?
- symbol 'rtl8188E_card_disable_flow' was not declared.Should it be static?
- symbol 'rtl8188E_enter_lps_flow' was not declared. Should it be static?

This patch reverts the include line to include the declarations.

Fixes: 4f458ec5f497 ("staging: r8188: move the steps into Hal8188EPwrSeq.c")
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
---
 drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c b/drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c
index 566a1701302c..6505e1fcb070 100644
--- a/drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c
+++ b/drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 /* Copyright(c) 2007 - 2011 Realtek Corporation. */
 
-#include "../include/HalPwrSeqCmd.h"
+#include "../include/Hal8188EPwrSeq.h"
 #include "../include/rtl8188e_hal.h"
 
 struct wl_pwr_cfg rtl8188E_power_on_flow[] = {
-- 
2.34.1

Re: [PATCH] staging: r8188eu: include variable declarations from Hal8188EPwrSeq.h
Posted by Martin Kaiser 4 years, 6 months ago
Hi Abdun,

Thus wrote Abdun Nihaal (abdun.nihaal@gmail.com):

> Variable declarations of rtl8188E_power_on_flow, rtl8188E_card_disable_flow
> and rtl8188E_enter_lps_flow are present in Hal8188EPwrSeq.h.

> A previous commit changed Hal8188EPwrSeq.c to include HalPwrSeqCmd.h
> directly instead of Hal8188EPwrSeq.h, causing these sparse warnings:
> - symbol 'rtl8188E_power_on_flow' was not declared. Should it be static?
> - symbol 'rtl8188E_card_disable_flow' was not declared.Should it be static?
> - symbol 'rtl8188E_enter_lps_flow' was not declared. Should it be static?

> This patch reverts the include line to include the declarations.

> Fixes: 4f458ec5f497 ("staging: r8188: move the steps into Hal8188EPwrSeq.c")
> Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
> ---
>  drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c b/drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c
> index 566a1701302c..6505e1fcb070 100644
> --- a/drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c
> +++ b/drivers/staging/r8188eu/hal/Hal8188EPwrSeq.c
> @@ -1,7 +1,7 @@
>  // SPDX-License-Identifier: GPL-2.0
>  /* Copyright(c) 2007 - 2011 Realtek Corporation. */

> -#include "../include/HalPwrSeqCmd.h"
> +#include "../include/Hal8188EPwrSeq.h"
>  #include "../include/rtl8188e_hal.h"

>  struct wl_pwr_cfg rtl8188E_power_on_flow[] = {

thanks for spotting this, I should run my patches through sparse
before submitting.

Acked-by: Martin Kaiser <martin@kaiser.cx>