Search Linux Wireless

Re: [PATCH] staging: rtl8723au: Fix static symbol sparse warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/01/2014 08:06 AM, Miguel Oliveira wrote:
> Fix sparse warning:
> drivers/staging/rtl8723au/core/rtw_efuse.c:579:5: warning: symbol 'efuse_GetCurrentSize23a' was not declared. Should it be static?
> 
> Signed-off-by: Miguel Oliveira <cmroliv@xxxxxxxxx>
> ---
>  drivers/staging/rtl8723au/include/rtw_efuse.h |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/rtl8723au/include/rtw_efuse.h b/drivers/staging/rtl8723au/include/rtw_efuse.h
> index 07bdc34..304cc71 100644
> --- a/drivers/staging/rtl8723au/include/rtw_efuse.h
> +++ b/drivers/staging/rtl8723au/include/rtw_efuse.h
> @@ -82,6 +82,7 @@ struct pg_pkt_struct {
>  /*------------------------Export global variable----------------------------*/
>  
>  u16	efuse_GetMaxSize23a(struct rtw_adapter *padapter);
> +int	efuse_GetCurrentSize23a(struct rtw_adapter *padapter, u16 *size);
>  int	rtw_efuse_access23a(struct rtw_adapter *padapter, u8 bRead, u16 start_addr, u16 cnts, u8 *data);
>  int	rtw_efuse_map_read23a(struct rtw_adapter *padapter, u16 addr, u16 cnts, u8 *data);
>  u8	rtw_efuse_map_write(struct rtw_adapter *padapter, u16 addr, u16 cnts, u8 *data);

NACK. Whenever Sparse issues this warning, you should first check to see if it
can be made static. Adding it to a header to make the Sparse warning go away is
not correct unless some other routine needs it to be globally known. In this
case, no other routine needs it.

Of course, making it static will lead to the compilation warning that the
routine is not used. The correct patch is to delete the entire routine as it is
never called.

Larry


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux