* [PATCH] staging: rtl8723au: fix sparse warning
@ 2015-05-23 5:03 Juston Li
2015-05-26 14:10 ` Jes Sorensen
0 siblings, 1 reply; 7+ messages in thread
From: Juston Li @ 2015-05-23 5:03 UTC (permalink / raw)
To: Larry.Finger
Cc: Jes.Sorensen, gregkh, linux-wireless, devel, linux-kernel, Juston Li
change cast to __le16 to fix the following warning:
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1488:20: warning: cast to restricted __le16
Signed-off-by: Juston Li <juston.h.li@gmail.com>
---
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
index 04d0183..e23af8e 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
@@ -1485,7 +1485,7 @@ void Hal_EfuseParseIDCode(struct rtw_adapter *padapter, u8 *hwinfo)
u16 EEPROMId;
/* Checl 0x8129 again for making sure autoload status!! */
- EEPROMId = le16_to_cpu(*((u16 *) hwinfo));
+ EEPROMId = le16_to_cpu(*((__le16 *) hwinfo));
if (EEPROMId != RTL_EEPROM_ID) {
DBG_8723A("EEPROM ID(%#x) is invalid!!\n", EEPROMId);
pEEPROM->bautoload_fail_flag = true;
--
2.4.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: rtl8723au: fix sparse warning
2015-05-23 5:03 [PATCH] staging: rtl8723au: fix sparse warning Juston Li
@ 2015-05-26 14:10 ` Jes Sorensen
0 siblings, 0 replies; 7+ messages in thread
From: Jes Sorensen @ 2015-05-26 14:10 UTC (permalink / raw)
To: Juston Li; +Cc: Larry.Finger, gregkh, linux-wireless, devel, linux-kernel
Juston Li <juston.h.li@gmail.com> writes:
> change cast to __le16 to fix the following warning:
> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1488:20: warning: cast to restricted __le16
>
> Signed-off-by: Juston Li <juston.h.li@gmail.com>
> ---
> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Looks OK to me
Jes
>
> diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
> index 04d0183..e23af8e 100644
> --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
> +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
> @@ -1485,7 +1485,7 @@ void Hal_EfuseParseIDCode(struct rtw_adapter *padapter, u8 *hwinfo)
> u16 EEPROMId;
>
> /* Checl 0x8129 again for making sure autoload status!! */
> - EEPROMId = le16_to_cpu(*((u16 *) hwinfo));
> + EEPROMId = le16_to_cpu(*((__le16 *) hwinfo));
> if (EEPROMId != RTL_EEPROM_ID) {
> DBG_8723A("EEPROM ID(%#x) is invalid!!\n", EEPROMId);
> pEEPROM->bautoload_fail_flag = true;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] staging: rtl8723au: fix sparse warning
@ 2014-12-22 16:32 Alexey Tulia
0 siblings, 0 replies; 7+ messages in thread
From: Alexey Tulia @ 2014-12-22 16:32 UTC (permalink / raw)
To: Larry Finger, Jes Sorensen; +Cc: Greg Kroah-Hartman, linux-wireless, devel
drivers/staging/rtl8723au/core/rtw_xmit.c:2375 warning: symbol
'rtl8723a_EfusePgPacketRead' was not declared. Should it be static?
Function 'rtw_ack_tx_done23a' seems to be unused in current staging
code.
Signed-off-by: Alexey Tulia <alexey.tulia@gmail.com>
---
drivers/staging/rtl8723au/core/rtw_xmit.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c b/drivers/staging/rtl8723au/core/rtw_xmit.c
index 7a5e6bf..1c82dff 100644
--- a/drivers/staging/rtl8723au/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723au/core/rtw_xmit.c
@@ -2372,12 +2372,3 @@ int rtw_ack_tx_wait23a(struct xmit_priv *pxmitpriv, u32 timeout_ms)
return rtw_sctx_wait23a(pack_tx_ops);
}
-void rtw_ack_tx_done23a(struct xmit_priv *pxmitpriv, int status)
-{
- struct submit_ctx *pack_tx_ops = &pxmitpriv->ack_tx_ops;
-
- if (pxmitpriv->ack_tx)
- rtw23a_sctx_done_err(&pack_tx_ops, status);
- else
- DBG_8723A("%s ack_tx not set\n", __func__);
-}
--
2.1.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: rtl8723au: fix sparse warning
2014-11-17 10:22 Aleh Suprunovich
@ 2014-11-19 15:06 ` Jes Sorensen
0 siblings, 0 replies; 7+ messages in thread
From: Jes Sorensen @ 2014-11-19 15:06 UTC (permalink / raw)
To: Aleh Suprunovich; +Cc: Greg Kroah-Hartman, devel, Larry Finger, linux-wireless
Aleh Suprunovich <br@ahlamon.org> 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 <br@ahlamon.org>
> ---
> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 78 -----------------------
> 1 file changed, 78 deletions(-)
Looks good to me
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
>
> 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;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] staging: rtl8723au: fix sparse warning
@ 2014-11-17 10:22 Aleh Suprunovich
2014-11-19 15:06 ` Jes Sorensen
0 siblings, 1 reply; 7+ messages in thread
From: Aleh Suprunovich @ 2014-11-17 10:22 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Jes Sorensen, devel, Larry Finger, linux-wireless, Aleh Suprunovich
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 <br@ahlamon.org>
---
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 78 -----------------------
1 file changed, 78 deletions(-)
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;
--
2.1.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: rtl8723au: fix sparse warning
2014-06-24 20:57 Clement Calmels
@ 2014-06-24 22:07 ` Jes Sorensen
0 siblings, 0 replies; 7+ messages in thread
From: Jes Sorensen @ 2014-06-24 22:07 UTC (permalink / raw)
To: Clement Calmels
Cc: Larry Finger, Greg Kroah-Hartman, linux-wireless, devel, linux-kernel
Clement Calmels <clement.calmels@free.fr> writes:
> From: Clément Calmels <clement.calmels@free.fr>
>
> 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 <clement.calmels@free.fr>
> ---
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] staging: rtl8723au: fix sparse warning
@ 2014-06-24 20:57 Clement Calmels
2014-06-24 22:07 ` Jes Sorensen
0 siblings, 1 reply; 7+ messages in thread
From: Clement Calmels @ 2014-06-24 20:57 UTC (permalink / raw)
To: Larry Finger, Jes Sorensen, Greg Kroah-Hartman, linux-wireless,
devel, linux-kernel
Cc: Clément Calmels
From: Clément Calmels <clement.calmels@free.fr>
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 <clement.calmels@free.fr>
---
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-26 14:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-23 5:03 [PATCH] staging: rtl8723au: fix sparse warning Juston Li
2015-05-26 14:10 ` Jes Sorensen
-- strict thread matches above, loose matches on Subject: below --
2014-12-22 16:32 Alexey Tulia
2014-11-17 10:22 Aleh Suprunovich
2014-11-19 15:06 ` Jes Sorensen
2014-06-24 20:57 Clement Calmels
2014-06-24 22:07 ` Jes Sorensen
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).