All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Joe Perches <joe@perches.com>
Cc: <ath6kl-devel@qualcomm.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 00/12] ath6kl: checkpatch fixes
Date: Mon, 5 Mar 2012 18:33:40 +0200	[thread overview]
Message-ID: <4F54EAE4.3040105@qca.qualcomm.com> (raw)
In-Reply-To: <1330539665.13689.9.camel@joe2Laptop>

On 02/29/2012 08:21 PM, Joe Perches wrote:
> On Wed, 2012-02-29 at 19:41 +0200, Kalle Valo wrote:
>> On 02/29/2012 07:37 PM, Joe Perches wrote:
>>
>>> Why not just make these functions?
>>
>> Because of the HI_ITEM() macro I can't pass the item parameter to a
>> function:
>>
>> #define HI_ITEM(item)  offsetof(struct host_interest, item)
> 
> Perhaps something like:
> void _ath6kl_bmi_write_hi32(struct ath6kl ar, size_t offset, u32 *val)
> {
> 	u32 addr;
> 	__le32 v;
> 
> 	addr = ath6kl_get_hi_item_addr(ar, offset);
> 	v = cpu_to_le32(*val);
> 	ath6kl_bmi_write(ar, addr, (u8 *)&v, sizeof(v));
> }
> 
> #define ath6kl_bmi_write_hi32(ar, item, val)		\
> 	_ath6kl_bmi_write_hi32(ar, HI_ITEM(item), &(val))
> 
> etc...

This is much better, I use this style. Thanks.

Kalle

  reply	other threads:[~2012-03-05 16:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29 17:18 [PATCH 00/12] ath6kl: checkpatch fixes Kalle Valo
2012-02-29 17:18 ` [PATCH 01/12] ath6kl: fix pointer style Kalle Valo
2012-02-29 17:18 ` [PATCH 02/12] ath6kl: fix checkpatch error with EPSTAT() macro Kalle Valo
2012-02-29 17:18 ` [PATCH 03/12] ath6kl: alignment should match open parenthesis Kalle Valo
2012-03-07 19:26   ` Joe Perches
2012-03-07 20:18     ` Kalle Valo
2012-02-29 17:19 ` [PATCH 04/12] ath6kl: logical continuations should be on the previous line Kalle Valo
2012-02-29 17:19 ` [PATCH 05/12] ath6kl: remove multiple assignments Kalle Valo
2012-02-29 17:19 ` [PATCH 06/12] ath6kl: add ath6kl_bmi_write_hi32() Kalle Valo
2012-02-29 17:19 ` [PATCH 07/12] ath6kl: add ath6kl_bmi_read_hi32() Kalle Valo
2012-02-29 17:19 ` [PATCH 08/12] ath6kl: fix error handling ath6kl_target_config_wlan_params() Kalle Valo
2012-02-29 17:19 ` [PATCH 09/12] ath6kl: fix open paranthesis alignment in ath6kl_cfg80211_connect() Kalle Valo
2012-02-29 17:19 ` [PATCH 10/12] ath6kl: document all spinlocks Kalle Valo
2012-02-29 17:20 ` [PATCH 11/12] ath6kl: fix too long lines Kalle Valo
2012-02-29 17:20 ` [PATCH 12/12] ath6kl: make ath6kl_bmi_[read|write]_hi32() endian safe Kalle Valo
2012-02-29 17:37 ` [PATCH 00/12] ath6kl: checkpatch fixes Joe Perches
2012-02-29 17:41   ` Kalle Valo
2012-02-29 18:21     ` Joe Perches
2012-03-05 16:33       ` Kalle Valo [this message]
2012-03-07 17:57       ` Kalle Valo
2012-03-07 18:37         ` Joe Perches
2012-03-07 19:01 ` 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=4F54EAE4.3040105@qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath6kl-devel@qualcomm.com \
    --cc=joe@perches.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 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.