From: Luis R. Rodriguez <lrodriguez@atheros.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 1/2] ath: Fix ath_dbg uses missing newlines and access beyond array bound
Date: Thu, 2 Dec 2010 11:02:39 -0800 [thread overview]
Message-ID: <20101202190239.GE7399@tux> (raw)
In-Reply-To: <276469c602c402565b49f99521ea19757429e81e.1291266731.git.joe@perches.com>
On Wed, Dec 01, 2010 at 09:13:32PM -0800, Joe Perches wrote:
> Add missing newlines to ath_dbg uses
> ar9300RateSize is not a power of 4, fix to print array line by line.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 29 ++---------------------
> drivers/net/wireless/ath/ath9k/calib.c | 4 +-
> drivers/net/wireless/ath/ath9k/gpio.c | 6 ++--
> drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 7 ++---
> drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +-
> 5 files changed, 12 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> index e6ae62b..beb3e87 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> @@ -3342,7 +3342,7 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
> goto fail;
>
> found:
> - ath_dbg(common, ATH_DBG_EEPROM, "Found valid EEPROM data");
> + ath_dbg(common, ATH_DBG_EEPROM, "Found valid EEPROM data\n");
>
> for (it = 0; it < MSTATE; it++) {
> if (!read(ah, cptr, word, COMP_HDR_LEN))
> @@ -4084,22 +4084,9 @@ static void ar9003_hw_set_target_power_eeprom(struct ath_hw *ah, u16 freq,
> ar9003_hw_eeprom_get_ht40_tgt_pwr(ah, HT_TARGET_RATE_23, freq,
> is2GHz) + ht40PowerIncForPdadc;
>
> - while (i < ar9300RateSize) {
> - ath_dbg(common, ATH_DBG_EEPROM,
> - "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]);
> - i++;
> -
> - ath_dbg(common, ATH_DBG_EEPROM,
> - "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]);
> - i++;
> -
> - ath_dbg(common, ATH_DBG_EEPROM,
> - "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]);
> - i++;
> -
> + for (i = 0; i < ar9300RateSize; i++) {
> ath_dbg(common, ATH_DBG_EEPROM,
> "TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]);
> - i++;
> }
> }
Please send this hunk on a separate patch.
Luis
WARNING: multiple messages have this Message-ID (diff)
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Joe Perches <joe@perches.com>
Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
Jouni Malinen <Jouni.Malinen@Atheros.com>,
Vasanth Thiagarajan <Vasanth.Thiagarajan@Atheros.com>,
Senthilkumar Balasubramanian
<Senthilkumar.Balasubramanian@Atheros.com>,
"John W. Linville" <linville@tuxdriver.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"ath9k-devel@lists.ath9k.org" <ath9k-devel@lists.ath9k.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] ath: Fix ath_dbg uses missing newlines and access beyond array bound
Date: Thu, 2 Dec 2010 11:02:39 -0800 [thread overview]
Message-ID: <20101202190239.GE7399@tux> (raw)
In-Reply-To: <276469c602c402565b49f99521ea19757429e81e.1291266731.git.joe@perches.com>
On Wed, Dec 01, 2010 at 09:13:32PM -0800, Joe Perches wrote:
> Add missing newlines to ath_dbg uses
> ar9300RateSize is not a power of 4, fix to print array line by line.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 29 ++---------------------
> drivers/net/wireless/ath/ath9k/calib.c | 4 +-
> drivers/net/wireless/ath/ath9k/gpio.c | 6 ++--
> drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 7 ++---
> drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +-
> 5 files changed, 12 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> index e6ae62b..beb3e87 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> @@ -3342,7 +3342,7 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
> goto fail;
>
> found:
> - ath_dbg(common, ATH_DBG_EEPROM, "Found valid EEPROM data");
> + ath_dbg(common, ATH_DBG_EEPROM, "Found valid EEPROM data\n");
>
> for (it = 0; it < MSTATE; it++) {
> if (!read(ah, cptr, word, COMP_HDR_LEN))
> @@ -4084,22 +4084,9 @@ static void ar9003_hw_set_target_power_eeprom(struct ath_hw *ah, u16 freq,
> ar9003_hw_eeprom_get_ht40_tgt_pwr(ah, HT_TARGET_RATE_23, freq,
> is2GHz) + ht40PowerIncForPdadc;
>
> - while (i < ar9300RateSize) {
> - ath_dbg(common, ATH_DBG_EEPROM,
> - "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]);
> - i++;
> -
> - ath_dbg(common, ATH_DBG_EEPROM,
> - "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]);
> - i++;
> -
> - ath_dbg(common, ATH_DBG_EEPROM,
> - "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]);
> - i++;
> -
> + for (i = 0; i < ar9300RateSize; i++) {
> ath_dbg(common, ATH_DBG_EEPROM,
> "TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]);
> - i++;
> }
> }
Please send this hunk on a separate patch.
Luis
WARNING: multiple messages have this Message-ID (diff)
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Joe Perches <joe@perches.com>
Cc: Luis Rodriguez <Luis.Rodriguez@atheros.com>,
Jouni Malinen <Jouni.Malinen@atheros.com>,
Vasanth Thiagarajan <Vasanth.Thiagarajan@atheros.com>,
Senthilkumar Balasubramanian
<Senthilkumar.Balasubramanian@atheros.com>,
"John W. Linville" <linville@tuxdriver.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"ath9k-devel@lists.ath9k.org" <ath9k-devel@venema.h4ckr.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] ath: Fix ath_dbg uses missing newlines and access beyond array bound
Date: Thu, 2 Dec 2010 11:02:39 -0800 [thread overview]
Message-ID: <20101202190239.GE7399@tux> (raw)
In-Reply-To: <276469c602c402565b49f99521ea19757429e81e.1291266731.git.joe@perches.com>
On Wed, Dec 01, 2010 at 09:13:32PM -0800, Joe Perches wrote:
> Add missing newlines to ath_dbg uses
> ar9300RateSize is not a power of 4, fix to print array line by line.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 29 ++---------------------
> drivers/net/wireless/ath/ath9k/calib.c | 4 +-
> drivers/net/wireless/ath/ath9k/gpio.c | 6 ++--
> drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 7 ++---
> drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +-
> 5 files changed, 12 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> index e6ae62b..beb3e87 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
> @@ -3342,7 +3342,7 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
> goto fail;
>
> found:
> - ath_dbg(common, ATH_DBG_EEPROM, "Found valid EEPROM data");
> + ath_dbg(common, ATH_DBG_EEPROM, "Found valid EEPROM data\n");
>
> for (it = 0; it < MSTATE; it++) {
> if (!read(ah, cptr, word, COMP_HDR_LEN))
> @@ -4084,22 +4084,9 @@ static void ar9003_hw_set_target_power_eeprom(struct ath_hw *ah, u16 freq,
> ar9003_hw_eeprom_get_ht40_tgt_pwr(ah, HT_TARGET_RATE_23, freq,
> is2GHz) + ht40PowerIncForPdadc;
>
> - while (i < ar9300RateSize) {
> - ath_dbg(common, ATH_DBG_EEPROM,
> - "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]);
> - i++;
> -
> - ath_dbg(common, ATH_DBG_EEPROM,
> - "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]);
> - i++;
> -
> - ath_dbg(common, ATH_DBG_EEPROM,
> - "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]);
> - i++;
> -
> + for (i = 0; i < ar9300RateSize; i++) {
> ath_dbg(common, ATH_DBG_EEPROM,
> "TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]);
> - i++;
> }
> }
Please send this hunk on a separate patch.
Luis
next prev parent reply other threads:[~2010-12-02 19:02 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 5:13 [ath9k-devel] [PATCH 1/2] ath: Fix ath_dbg uses missing newlines and access beyond array bound Joe Perches
2010-12-02 5:13 ` Joe Perches
2010-12-02 5:13 ` Joe Perches
2010-12-02 5:13 ` [ath9k-devel] [PATCH 2/2] ath: Fix logging message typos Joe Perches
2010-12-02 5:13 ` Joe Perches
2010-12-02 5:13 ` Joe Perches
2010-12-02 5:13 ` Joe Perches
2010-12-02 5:30 ` [ath9k-devel] " Peter Stuge
2010-12-02 5:30 ` Peter Stuge
2010-12-02 5:30 ` [ath9k-devel] " Peter Stuge
2010-12-02 5:30 ` Peter Stuge
2010-12-02 5:34 ` Joe Perches
2010-12-02 5:34 ` Joe Perches
2010-12-02 5:34 ` Joe Perches
2010-12-02 5:34 ` Joe Perches
2010-12-02 6:01 ` Nick Kossifidis
2010-12-02 6:01 ` Nick Kossifidis
2010-12-02 6:01 ` [ath9k-devel] " Nick Kossifidis
2010-12-02 6:01 ` Nick Kossifidis
2010-12-02 5:35 ` [ath9k-devel] [PATCH 2/2 V2] " Joe Perches
2010-12-02 5:35 ` Joe Perches
2010-12-02 5:35 ` Joe Perches
2010-12-02 5:35 ` Joe Perches
2010-12-02 19:02 ` Luis R. Rodriguez [this message]
2010-12-02 19:02 ` [PATCH 1/2] ath: Fix ath_dbg uses missing newlines and access beyond array bound Luis R. Rodriguez
2010-12-02 19:02 ` Luis R. Rodriguez
2010-12-03 3:12 ` [ath9k-devel] [PATCH 0/4] ath: logging message conversion Joe Perches
2010-12-03 3:12 ` Joe Perches
2010-12-03 3:12 ` Joe Perches
2010-12-03 3:12 ` [PATCH 1/4] ath: Add and use ath_printk and ath_<level> Joe Perches
2010-12-07 21:38 ` John W. Linville
2010-12-07 19:05 ` [ath9k-devel] [PATCH 0/4] ath: logging message conversion John W. Linville
2010-12-07 19:05 ` John W. Linville
2010-12-07 19:05 ` John W. Linville
2010-12-07 19:26 ` [ath9k-devel] " Luis R. Rodriguez
2010-12-07 19:26 ` Luis R. Rodriguez
2010-12-03 3:12 ` [ath9k-devel] [PATCH 2/4] ath: Convert ath_print(.., ATH_DBG_FATAL to ath_err Joe Perches
2010-12-03 3:12 ` Joe Perches
2010-12-03 3:12 ` Joe Perches
2010-12-03 3:12 ` Joe Perches
2010-12-03 3:12 ` [ath9k-devel] [PATCH 3/4] ath: Convert ath_print to ath_dbg Joe Perches
2010-12-03 3:12 ` Joe Perches
2010-12-03 3:12 ` Joe Perches
2010-12-03 3:12 ` Joe Perches
2010-12-03 3:12 ` [ath9k-devel] [PATCH 4/4] ath: Fix ath_dbg access beyond array bound Joe Perches
2010-12-03 3:12 ` Joe Perches
2010-12-03 3:12 ` Joe Perches
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=20101202190239.GE7399@tux \
--to=lrodriguez@atheros.com \
--cc=ath9k-devel@lists.ath9k.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.