From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Aleh Suprunovich <br@ahlamon.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Larry Finger <Larry.Finger@lwfinger.net>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723au: fix sparse warning
Date: Wed, 19 Nov 2014 10:06:52 -0500 [thread overview]
Message-ID: <wrfj4mtvp6ur.fsf@redhat.com> (raw)
In-Reply-To: <1416219761-1938-1-git-send-email-br@ahlamon.org> (Aleh Suprunovich's message of "Mon, 17 Nov 2014 13:22:41 +0300")
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;
next prev parent reply other threads:[~2014-11-19 15:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 10:22 [PATCH] staging: rtl8723au: fix sparse warning Aleh Suprunovich
2014-11-19 15:06 ` Jes Sorensen [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-05-23 5:03 Juston Li
2015-05-26 14:10 ` Jes Sorensen
2014-12-22 16:32 Alexey Tulia
2014-06-24 20:57 Clement Calmels
2014-06-24 22:07 ` Jes Sorensen
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=wrfj4mtvp6ur.fsf@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=br@ahlamon.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.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;
as well as URLs for NNTP newsgroup(s).