From: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 3/4] ath6kl: cleanup diagnose window read and write functions
Date: Tue, 30 Aug 2011 20:30:07 +0530 [thread overview]
Message-ID: <20110830150006.GA32378@vasanth-laptop> (raw)
In-Reply-To: <20110830134450.21543.40524.stgit@localhost6.localdomain6>
On Tue, Aug 30, 2011 at 04:44:50PM +0300, Kalle Valo wrote:
> Just to make them a bit easier to read and unify naming. 32 suffix
> in the function name means that it will be a 32 bit transfer. If there's
> no number a buffer is transfered instead.
>
> Use void pointers to get rid of ugly casts.
>
> Don't provide target address as a pointer, pass it by value. Same for
> the value used in write32().
>
> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath6kl/core.h | 6 +-
> drivers/net/wireless/ath/ath6kl/init.c | 16 ++---
> drivers/net/wireless/ath/ath6kl/main.c | 94 ++++++++++++++++++--------------
> 3 files changed, 61 insertions(+), 55 deletions(-)
<--snip-->
> +int ath6kl_diag_write(struct ath6kl *ar, u32 address, void *data, u32 length)
> +{
> + u32 count, *buf = data;
> + int ret;
> +
> + if (WARN_ON(length % 4))
> + return -EINVAL;
> +
> + for (count = 0; count < length / 4; count++, address += 4) {
> + ret = ath6kl_diag_write32(ar, address, buf[count]);
> + if (ret)
> + return ret;
> }
>
> - return status;
> + return ret;
drivers/net/wireless/ath/ath6kl/main.c: In function ‘ath6kl_diag_write’:
drivers/net/wireless/ath/ath6kl/main.c:297: warning: ‘ret’ may be
used uninitialized in this function
Vasanth
> }
>
> /* FIXME: move to a better place, target.h? */
> @@ -327,7 +337,7 @@ static void ath6kl_reset_device(struct ath6kl *ar, u32 target_type,
> break;
> }
>
> - status = ath6kl_write_reg_diag(ar, &address, &data);
> + status = ath6kl_diag_write32(ar, address, data);
>
> if (status)
> ath6kl_err("failed to reset target\n");
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-08-30 15:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 13:44 [PATCH 1/4] ath6kl: add firmware log support Kalle Valo
2011-08-30 13:44 ` [PATCH 2/4] ath6kl: implement support to set firmware log parameters Kalle Valo
2011-08-30 13:44 ` [PATCH 3/4] ath6kl: cleanup diagnose window read and write functions Kalle Valo
2011-08-30 15:00 ` Vasanthakumar Thiagarajan [this message]
2011-08-31 11:05 ` Kalle Valo
2011-08-30 13:44 ` [PATCH 4/4] ath6kl: read fwlog from firmware ring buffer Kalle Valo
2011-08-31 6:17 ` Vasanthakumar Thiagarajan
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=20110830150006.GA32378@vasanth-laptop \
--to=vthiagar@qca.qualcomm.com \
--cc=kvalo@qca.qualcomm.com \
--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).