public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Miguel Oliveira <cmroliv@gmail.com>,
	gregkh@linuxfoundation.org, linux-wireless@vger.kernel.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723au: Fix static symbol sparse warning
Date: Sat, 02 Aug 2014 11:55:02 +0200	[thread overview]
Message-ID: <wrfjwqarfc7d.fsf@ultrasam.lan.trained-monkey.org> (raw)
In-Reply-To: <53DBA840.6050804@lwfinger.net> (Larry Finger's message of "Fri, 01 Aug 2014 09:46:24 -0500")

Larry Finger <Larry.Finger@lwfinger.net> writes:
> 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@gmail.com>
>> ---
>>  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.

Yep, fix it correctly, or don't bother!

Cheers,
Jes

      parent reply	other threads:[~2014-08-02  9:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 13:06 [PATCH] staging: rtl8723au: Fix static symbol sparse warning Miguel Oliveira
2014-08-01 12:11 ` Paul Bolle
2014-08-01 14:46 ` Larry Finger
2014-08-01 16:54   ` Miguel Oliveira
2014-08-02  9:55   ` Jes Sorensen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wrfjwqarfc7d.fsf@ultrasam.lan.trained-monkey.org \
    --to=jes.sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=cmroliv@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox