From: Jiri Slaby <jirislaby@gmail.com>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: linville@tuxdriver.com, devel@linuxdriverproject.org,
ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 3/4] ath5k: define ath_common ops
Date: Mon, 14 Sep 2009 10:46:33 +0200 [thread overview]
Message-ID: <4AAE02E9.2050905@gmail.com> (raw)
In-Reply-To: <1252917123-11559-4-git-send-email-lrodriguez@atheros.com>
On 09/14/2009 10:32 AM, Luis R. Rodriguez wrote:
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -437,6 +437,22 @@ ath5k_chip_name(enum ath5k_srev_type type, u_int16_t val)
>
> return name;
> }
> +static unsigned int ath5k_ioread32(void *hw_priv, u32 reg_offset)
> +{
> + struct ath5k_hw *ah = (struct ath5k_hw *) hw_priv;
> + return ioread32(ah->ah_iobase + reg_offset);
Why not just
return ath5k_hw_reg_read(hw_priv, reg_offset)
as I suggested?
> +static void ath5k_iowrite32(void *hw_priv, u32 val, u32 reg_offset)
> +{
> + struct ath5k_hw *ah = (struct ath5k_hw *) hw_priv;
> + iowrite32(val, ah->ah_iobase + reg_offset);
and ath5k_hw_reg_write(hw_priv, val, reg_offset)
If we ever decide to not use ioread32/iowrite32, it will need a change
on a single place.
> +}
> +
> +const static struct ath_ops ath5k_common_ops = {
C99, 6.11.5 Storage-class specifiers:
1 The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is
an obsolescent feature.
I.e. use static const, please.
next prev parent reply other threads:[~2009-09-14 8:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-14 8:31 [PATCH v2 0/4] atheros: implement common read/write ops Luis R. Rodriguez
2009-09-14 8:32 ` [PATCH v2 1/4] atheros/ath9k: add common read/write ops and port ath9k to use it Luis R. Rodriguez
2009-09-14 8:32 ` [PATCH v2 2/4] ath5k: allocate ath5k_hw prior to initializing hw Luis R. Rodriguez
2009-09-14 8:45 ` Jiri Slaby
2009-09-14 8:50 ` Luis R. Rodriguez
2009-09-14 8:53 ` Luis R. Rodriguez
2009-09-14 8:56 ` Luis R. Rodriguez
2009-09-14 8:59 ` Jiri Slaby
2009-09-14 8:32 ` [PATCH v2 3/4] ath5k: define ath_common ops Luis R. Rodriguez
2009-09-14 8:46 ` Jiri Slaby [this message]
2009-09-14 9:01 ` Luis R. Rodriguez
2009-09-14 8:32 ` [PATCH v2 4/4] atheros: define shared bssidmask setting Luis R. Rodriguez
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=4AAE02E9.2050905@gmail.com \
--to=jirislaby@gmail.com \
--cc=ath9k-devel@lists.ath9k.org \
--cc=devel@linuxdriverproject.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.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).