From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from wolverine02.qualcomm.com ([199.106.114.251]:59724 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757048Ab2CGR5p (ORCPT ); Wed, 7 Mar 2012 12:57:45 -0500 Message-ID: <4F57A193.3030406@qca.qualcomm.com> (sfid-20120307_185749_296335_93FFFBC4) Date: Wed, 7 Mar 2012 19:57:39 +0200 From: Kalle Valo MIME-Version: 1.0 To: Joe Perches CC: , Subject: Re: [PATCH 00/12] ath6kl: checkpatch fixes References: <20120229171525.24264.22062.stgit@localhost6.localdomain6> <1330537026.13689.1.camel@joe2Laptop> <4F4E635A.3060003@qca.qualcomm.com> <1330539665.13689.9.camel@joe2Laptop> In-Reply-To: <1330539665.13689.9.camel@joe2Laptop> Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org List-ID: 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)) I tried this but actually this ends to a header file dependency hell. I don't want to deal with that right now so I have to use the original macros. Kalle