linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Prarit Bhargava <prarit@redhat.com>,
	linux-wireless@vger.kernel.org, ath9k-devel@atheros.com
Subject: Re: [PATCH]: ath: Fix uninitialized variable warnings
Date: Fri, 28 May 2010 16:44:36 -0400	[thread overview]
Message-ID: <1275079476.18152.18.camel@mj> (raw)
In-Reply-To: <20100528173431.GB2405@tuxdriver.com>

On Fri, 2010-05-28 at 13:34 -0400, John W. Linville wrote:
> On Thu, May 27, 2010 at 02:14:54PM -0400, Prarit Bhargava wrote:
> > Fixes 'make -j24 CONFIG_DEBUG_SECTION_MISMATCH=y' warning:
> > 
> > drivers/net/wireless/ath/ath9k/eeprom_4k.c: In function ‘ath9k_hw_get_4k_gain_boundaries_pdadcs.clone.1’:
> > drivers/net/wireless/ath/ath9k/eeprom_4k.c:311: error: ‘minPwrT4’ may be used uninitialized in this function
> > drivers/net/wireless/ath/ath9k/eeprom_9287.c: In function ‘ath9k_hw_get_AR9287_gain_boundaries_pdadcs’:
> > drivers/net/wireless/ath/ath9k/eeprom_9287.c:302: error: ‘minPwrT4’ may be used uninitialized in this function
> > drivers/net/wireless/ath/ath9k/eeprom_def.c: In function ‘ath9k_hw_get_def_gain_boundaries_pdadcs.clone.0’:
> > drivers/net/wireless/ath/ath9k/eeprom_def.c:679: error: ‘minPwrT4’ may be used uninitialized in this function
> > 
> > Signed-off-by: Prarit Bhargava <prarit@redhat.com>
> 
> It looks to me like minPwrT4 will get initialized as long as
> numXpdGains is non-zero in all cases.  Anyone know if this is true?

It's calculated based on a value from EEPROM (xpdMask).  If xpdMask is
0, numXpdGain would be 0.  So bogus EEPROM can lead to bogus
tMinCalPower.  But the good thing is that tMinCalPower is never used.

So let's just eliminate tMinCalPower in all three files, as well as the
corresponding function arguments.

-- 
Regards,
Pavel Roskin

  reply	other threads:[~2010-05-28 20:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100527181052.23905.67123.sendpatchset@prarit.bos.redhat.com>
2010-05-28 17:34 ` [PATCH]: ath: Fix uninitialized variable warnings John W. Linville
2010-05-28 20:44   ` Pavel Roskin [this message]
2010-06-17 22:41     ` Prarit Bhargava
2010-06-19 17:33       ` Pavel Roskin
2010-05-27 18:15 Prarit Bhargava

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=1275079476.18152.18.camel@mj \
    --to=proski@gnu.org \
    --cc=ath9k-devel@atheros.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=prarit@redhat.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).