linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: remove hal_btcoex_SetChipType()
@ 2023-03-24  8:43 Michael Straube
  2023-03-24  8:47 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Straube @ 2023-03-24  8:43 UTC (permalink / raw)
  To: gregkh
  Cc: hdegoede, Larry.Finger, linux-staging, linux-kernel, Michael Straube

Remove the function hal_btcoex_SetChipType() as it does nothing and
produces the following gcc warning when compiling with W=1.

drivers/staging/rtl8723bs/hal/hal_btcoex.c:1182:30: warning: variable 'pHalData' set but not used [-Wunused-but-set-variable]
 1182 |         struct hal_com_data *pHalData;
      |                              ^~~~~~~~

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/rtl8723bs/hal/hal_btcoex.c        | 8 --------
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 1 -
 drivers/staging/rtl8723bs/include/hal_btcoex.h    | 1 -
 3 files changed, 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index e36f8c369a04..e26b789b9cdd 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -1177,14 +1177,6 @@ bool hal_btcoex_IsBtDisabled(struct adapter *padapter)
 		return false;
 }
 
-void hal_btcoex_SetChipType(struct adapter *padapter, u8 chipType)
-{
-	struct hal_com_data *pHalData;
-
-
-	pHalData = GET_HAL_DATA(padapter);
-}
-
 void hal_btcoex_SetPgAntNum(struct adapter *padapter, u8 antNum)
 {
 	struct hal_com_data *pHalData;
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 0fcae6871108..c3c1b49674d3 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -2304,7 +2304,6 @@ void Hal_EfuseParseBTCoexistInfo_8723B(
 	}
 
 	hal_btcoex_SetBTCoexist(padapter, pHalData->EEPROMBluetoothCoexist);
-	hal_btcoex_SetChipType(padapter, pHalData->EEPROMBluetoothType);
 	hal_btcoex_SetPgAntNum(padapter, pHalData->EEPROMBluetoothAntNum == Ant_x2 ? 2 : 1);
 	if (pHalData->EEPROMBluetoothAntNum == Ant_x1)
 		hal_btcoex_SetSingleAntPath(padapter, pHalData->ant_path);
diff --git a/drivers/staging/rtl8723bs/include/hal_btcoex.h b/drivers/staging/rtl8723bs/include/hal_btcoex.h
index fb167642da01..525cce3574fe 100644
--- a/drivers/staging/rtl8723bs/include/hal_btcoex.h
+++ b/drivers/staging/rtl8723bs/include/hal_btcoex.h
@@ -23,7 +23,6 @@ struct bt_coexist {
 void hal_btcoex_SetBTCoexist(struct adapter *padapter, u8 bBtExist);
 bool hal_btcoex_IsBtExist(struct adapter *padapter);
 bool hal_btcoex_IsBtDisabled(struct adapter *);
-void hal_btcoex_SetChipType(struct adapter *padapter, u8 chipType);
 void hal_btcoex_SetPgAntNum(struct adapter *padapter, u8 antNum);
 void hal_btcoex_SetSingleAntPath(struct adapter *padapter, u8 singleAntPath);
 
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove hal_btcoex_SetChipType()
  2023-03-24  8:43 [PATCH] staging: rtl8723bs: remove hal_btcoex_SetChipType() Michael Straube
@ 2023-03-24  8:47 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2023-03-24  8:47 UTC (permalink / raw)
  To: Michael Straube, gregkh; +Cc: Larry.Finger, linux-staging, linux-kernel

Hi,

On 3/24/23 09:43, Michael Straube wrote:
> Remove the function hal_btcoex_SetChipType() as it does nothing and
> produces the following gcc warning when compiling with W=1.
> 
> drivers/staging/rtl8723bs/hal/hal_btcoex.c:1182:30: warning: variable 'pHalData' set but not used [-Wunused-but-set-variable]
>  1182 |         struct hal_com_data *pHalData;
>       |                              ^~~~~~~~
> 
> Signed-off-by: Michael Straube <straube.linux@gmail.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>  drivers/staging/rtl8723bs/hal/hal_btcoex.c        | 8 --------
>  drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 1 -
>  drivers/staging/rtl8723bs/include/hal_btcoex.h    | 1 -
>  3 files changed, 10 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
> index e36f8c369a04..e26b789b9cdd 100644
> --- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
> +++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
> @@ -1177,14 +1177,6 @@ bool hal_btcoex_IsBtDisabled(struct adapter *padapter)
>  		return false;
>  }
>  
> -void hal_btcoex_SetChipType(struct adapter *padapter, u8 chipType)
> -{
> -	struct hal_com_data *pHalData;
> -
> -
> -	pHalData = GET_HAL_DATA(padapter);
> -}
> -
>  void hal_btcoex_SetPgAntNum(struct adapter *padapter, u8 antNum)
>  {
>  	struct hal_com_data *pHalData;
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> index 0fcae6871108..c3c1b49674d3 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> @@ -2304,7 +2304,6 @@ void Hal_EfuseParseBTCoexistInfo_8723B(
>  	}
>  
>  	hal_btcoex_SetBTCoexist(padapter, pHalData->EEPROMBluetoothCoexist);
> -	hal_btcoex_SetChipType(padapter, pHalData->EEPROMBluetoothType);
>  	hal_btcoex_SetPgAntNum(padapter, pHalData->EEPROMBluetoothAntNum == Ant_x2 ? 2 : 1);
>  	if (pHalData->EEPROMBluetoothAntNum == Ant_x1)
>  		hal_btcoex_SetSingleAntPath(padapter, pHalData->ant_path);
> diff --git a/drivers/staging/rtl8723bs/include/hal_btcoex.h b/drivers/staging/rtl8723bs/include/hal_btcoex.h
> index fb167642da01..525cce3574fe 100644
> --- a/drivers/staging/rtl8723bs/include/hal_btcoex.h
> +++ b/drivers/staging/rtl8723bs/include/hal_btcoex.h
> @@ -23,7 +23,6 @@ struct bt_coexist {
>  void hal_btcoex_SetBTCoexist(struct adapter *padapter, u8 bBtExist);
>  bool hal_btcoex_IsBtExist(struct adapter *padapter);
>  bool hal_btcoex_IsBtDisabled(struct adapter *);
> -void hal_btcoex_SetChipType(struct adapter *padapter, u8 chipType);
>  void hal_btcoex_SetPgAntNum(struct adapter *padapter, u8 antNum);
>  void hal_btcoex_SetSingleAntPath(struct adapter *padapter, u8 singleAntPath);
>  


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-24  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24  8:43 [PATCH] staging: rtl8723bs: remove hal_btcoex_SetChipType() Michael Straube
2023-03-24  8:47 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).