From: Clément Calmels <[email protected]>
Found running sparse on the rtl8723au driver.
CHECK drivers/staging/rtl8723au/core/rtw_cmd.c
drivers/staging/rtl8723au/core/rtw_cmd.c:1479:54: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8723au/core/rtw_cmd.c:1479:54: expected int [signed] gfp
drivers/staging/rtl8723au/core/rtw_cmd.c:1479:54: got restricted gfp_t
Signed-off-by: Clement Calmels <[email protected]>
---
drivers/staging/rtl8723au/core/rtw_mlme.c | 2 +-
drivers/staging/rtl8723au/include/rtw_mlme.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 7170258..c6f4e47 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -125,7 +125,7 @@ void rtw_free_mlme_priv23a(struct mlme_priv *pmlmepriv)
rtw23a_free_mlme_priv_ie_data(pmlmepriv);
}
-struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv, int gfp)
+struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv, gfp_t gfp)
{
struct wlan_network *pnetwork;
diff --git a/drivers/staging/rtl8723au/include/rtw_mlme.h b/drivers/staging/rtl8723au/include/rtw_mlme.h
index 4d327ba..f798078 100644
--- a/drivers/staging/rtl8723au/include/rtw_mlme.h
+++ b/drivers/staging/rtl8723au/include/rtw_mlme.h
@@ -344,7 +344,7 @@ void rtw23a_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
void _rtw_free_mlme_priv23a(struct mlme_priv *pmlmepriv);
-struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv, int gfp);
+struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv, gfp_t gfp);
int rtw_if_up23a(struct rtw_adapter *padapter);
--
2.0.0
Clement Calmels <[email protected]> writes:
> From: Clément Calmels <[email protected]>
>
> Found running sparse on the rtl8723au driver.
>
> CHECK drivers/staging/rtl8723au/core/rtw_cmd.c
> drivers/staging/rtl8723au/core/rtw_cmd.c:1479:54: warning: incorrect type in argument 2 (different base types)
> drivers/staging/rtl8723au/core/rtw_cmd.c:1479:54: expected int [signed] gfp
> drivers/staging/rtl8723au/core/rtw_cmd.c:1479:54: got restricted gfp_t
>
> Signed-off-by: Clement Calmels <[email protected]>
> ---
> drivers/staging/rtl8723au/core/rtw_mlme.c | 2 +-
> drivers/staging/rtl8723au/include/rtw_mlme.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Thanks, I'll add it to my tree!
Cheers,
Jes
Aleh Suprunovich <[email protected]> writes:
> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:747:1: warning: symbol
> 'rtl8723a_EfusePgPacketRead' was not declared. Should it be static?
>
> Function 'rtl8723a_EfusePgPacketRead' seems to be unused in current
> staging code.
>
> Before, it was available as 'static s32 Hal_EfusePgPacketRead',
> but code that was using it removed, in the same commit as rename and
> signature change to 'bool rtl8723a_EfusePgPacketRead' has taken place.
>
> Signed-off-by: Aleh Suprunovich <[email protected]>
> ---
> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 78 -----------------------
> 1 file changed, 78 deletions(-)
Looks good to me
Signed-off-by: Jes Sorensen <[email protected]>
>
> diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
> index 9a75eb6..3e61a45 100644
> --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
> +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
> @@ -743,84 +743,6 @@ u16 rtl8723a_EfuseGetCurrentSize_BT(struct rtw_adapter *padapter)
> return retU2;
> }
>
> -bool
> -rtl8723a_EfusePgPacketRead(struct rtw_adapter *padapter, u8 offset, u8 *data)
> -{
> - u8 efuse_data, word_cnts = 0;
> - u16 efuse_addr = 0;
> - u8 hoffset = 0, hworden = 0;
> - u8 i;
> - u8 max_section = 0;
> - s32 ret;
> -
> - if (data == NULL)
> - return false;
> -
> - EFUSE_GetEfuseDefinition23a(padapter, EFUSE_WIFI, TYPE_EFUSE_MAX_SECTION,
> - &max_section);
> - if (offset > max_section) {
> - DBG_8723A("%s: Packet offset(%d) is illegal(>%d)!\n",
> - __func__, offset, max_section);
> - return false;
> - }
> -
> - memset(data, 0xFF, PGPKT_DATA_SIZE);
> - ret = true;
> -
> - /* */
> - /* <Roger_TODO> Efuse has been pre-programmed dummy 5Bytes at the
> - end of Efuse by CP. */
> - /* Skip dummy parts to prevent unexpected data read from Efuse. */
> - /* By pass right now. 2009.02.19. */
> - /* */
> - while (AVAILABLE_EFUSE_ADDR(efuse_addr)) {
> - if (efuse_OneByteRead23a(padapter, efuse_addr++, &efuse_data) ==
> - _FAIL) {
> - ret = false;
> - break;
> - }
> -
> - if (efuse_data == 0xFF)
> - break;
> -
> - if (EXT_HEADER(efuse_data)) {
> - hoffset = GET_HDR_OFFSET_2_0(efuse_data);
> - efuse_OneByteRead23a(padapter, efuse_addr++, &efuse_data);
> - if (ALL_WORDS_DISABLED(efuse_data)) {
> - DBG_8723A("%s: Error!! All words disabled!\n",
> - __func__);
> - continue;
> - }
> -
> - hoffset |= ((efuse_data & 0xF0) >> 1);
> - hworden = efuse_data & 0x0F;
> - } else {
> - hoffset = (efuse_data >> 4) & 0x0F;
> - hworden = efuse_data & 0x0F;
> - }
> -
> - if (hoffset == offset) {
> - for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) {
> - /* Check word enable condition in the section */
> - if (!(hworden & (0x01 << i))) {
> - ReadEFuseByte23a(padapter, efuse_addr++,
> - &efuse_data);
> - data[i * 2] = efuse_data;
> -
> - ReadEFuseByte23a(padapter, efuse_addr++,
> - &efuse_data);
> - data[(i * 2) + 1] = efuse_data;
> - }
> - }
> - } else {
> - word_cnts = Efuse_CalculateWordCnts23a(hworden);
> - efuse_addr += word_cnts * 2;
> - }
> - }
> -
> - return ret;
> -}
> -
> void rtl8723a_read_chip_version(struct rtw_adapter *padapter)
> {
> u32 value32;