From: Michal Kazior <michal.kazior@tieto.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH] ath10k: add bmi_read32/bmi_write32 function
Date: Thu, 18 Apr 2013 10:16:45 +0200 [thread overview]
Message-ID: <516FABED.6050606@tieto.com> (raw)
In-Reply-To: <1366272512-20489-1-git-send-email-janusz.dziedzic@tieto.com>
On 18/04/13 10:08, Janusz Dziedzic wrote:
> Add ath10k_bmi_read32/ath10k_bmi_write32 functions
> and use them in core layer when read32/write32.
>
> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
> ---
> drivers/net/wireless/ath/ath10k/bmi.h | 10 ++++++++++
> drivers/net/wireless/ath/ath10k/core.c | 24 ++++++++++++------------
> 2 files changed, 22 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/bmi.h b/drivers/net/wireless/ath/ath10k/bmi.h
> index e2bd70b..2035d5d 100644
> --- a/drivers/net/wireless/ath/ath10k/bmi.h
> +++ b/drivers/net/wireless/ath/ath10k/bmi.h
> @@ -191,6 +191,16 @@ int ath10k_bmi_read_memory(struct ath10k *ar, u32 address,
> void *buffer, u32 length);
> int ath10k_bmi_write_memory(struct ath10k *ar, u32 address,
> const void *buffer, u32 length);
> +static inline int ath10k_bmi_read32(struct ath10k *ar, u32 address,
> + void *buffer)
> +{
> + return ath10k_bmi_read_memory(ar, address, buffer, sizeof(u32));
> +}
> +static inline int ath10k_bmi_write32(struct ath10k *ar, u32 address,
> + void *buffer)
> +{
> + return ath10k_bmi_write_memory(ar, address, buffer, sizeof(u32));
> +}
I think these functions should do endianess converions so it is not
necessary at call sites anymore.
Also the buffer could be a u32* instead of a void* implicitly stating
what the functions are meant to do.
-- Pozdrawiam / Best regards, Michal Kazior.
next prev parent reply other threads:[~2013-04-18 8:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-18 8:08 [ath9k-devel] [PATCH] ath10k: add bmi_read32/bmi_write32 function Janusz Dziedzic
2013-04-18 8:16 ` Michal Kazior [this message]
2013-04-18 8:23 ` Janusz.Dziedzic at tieto.com
2013-04-18 10:53 ` Kalle Valo
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=516FABED.6050606@tieto.com \
--to=michal.kazior@tieto.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.