Thread (22 messages) 22 messages, 2 authors, 2012-03-07

Re: [PATCH 00/12] ath6kl: checkpatch fixes

From: Kalle Valo <hidden>
Date: 2012-03-07 17:57:45

On 02/29/2012 08:21 PM, Joe Perches wrote:
On Wed, 2012-02-29 at 19:41 +0200, Kalle Valo wrote:
quoted
On 02/29/2012 07:37 PM, Joe Perches wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help