linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Han Shen <shenhan@google.com>
Cc: linux-wireless@vger.kernel.org, chaoming_li@realsil.com.cn,
	joe@perches.com, zajec5@gmail.com
Subject: Re: [PATCH v2] rtl8192c:dm: Properly initialize local array and set value.
Date: Mon, 22 Apr 2013 16:44:28 -0500	[thread overview]
Message-ID: <5175AF3C.30804@lwfinger.net> (raw)
In-Reply-To: <1366662911-4143-1-git-send-email-shenhan@google.com>

On 04/22/2013 03:35 PM, Han Shen wrote:
> GCC 4.8 is spitting out uninitialized-variable warnings against
> "drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c".  This patch adds
> initialization to the variable and properly sets its value.
>
> Signed-off-by: Han Shen  (shenhan@google.com)
>
> ---
>   drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Thanks,

Larry

>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
> index b793a65..34150de 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
> @@ -669,7 +669,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
>   	u8 thermalvalue, delta, delta_lck, delta_iqk;
>   	long ele_a, ele_d, temp_cck, val_x, value32;
>   	long val_y, ele_c = 0;
> -	u8 ofdm_index[2], ofdm_index_old[2], cck_index_old = 0;
> +	u8 ofdm_index[2], ofdm_index_old[2] = {0, 0}, cck_index_old = 0;
>   	s8 cck_index = 0;
>   	int i;
>   	bool is2t = IS_92C_SERIAL(rtlhal->version);
> @@ -717,7 +717,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
>   			for (i = 0; i < OFDM_TABLE_LENGTH; i++) {
>   				if (ele_d == (ofdmswing_table[i] &
>   				    MASKOFDM_D)) {
> -
> +					ofdm_index_old[1] = (u8) i;
>   					RT_TRACE(rtlpriv, COMP_POWER_TRACKING,
>   						 DBG_LOUD,
>   						 "Initial pathB ele_d reg0x%x = 0x%lx, ofdm_index=0x%x\n",
>


      reply	other threads:[~2013-04-22 21:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 20:35 [PATCH v2] rtl8192c:dm: Properly initialize local array and set value Han Shen
2013-04-22 21:44 ` Larry Finger [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=5175AF3C.30804@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=chaoming_li@realsil.com.cn \
    --cc=joe@perches.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=shenhan@google.com \
    --cc=zajec5@gmail.com \
    /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).