From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Kazior Date: Mon, 29 Apr 2013 07:51:14 +0200 Subject: [ath9k-devel] [PATCH 18/20] ath10k: Move htt_rx_ind_get_mpdu_ranges to htt_rx.c In-Reply-To: <1367163098-22787-18-git-send-email-sujith@msujith.org> References: <1367163098-22787-1-git-send-email-sujith@msujith.org> <1367163098-22787-18-git-send-email-sujith@msujith.org> Message-ID: <517E0A52.80707@tieto.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On 28/04/13 17:31, Sujith Manoharan wrote: > From: Sujith Manoharan > > Signed-off-by: Sujith Manoharan > --- > drivers/net/wireless/ath/ath10k/htt.h | 12 ------------ > drivers/net/wireless/ath/ath10k/htt_rx.c | 12 ++++++++++++ > 2 files changed, 12 insertions(+), 12 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h > index d416a4f..bd3b0b4 100644 > --- a/drivers/net/wireless/ath/ath10k/htt.h > +++ b/drivers/net/wireless/ath/ath10k/htt.h > @@ -478,18 +478,6 @@ struct htt_rx_indication { > struct htt_rx_indication_mpdu_range mpdu_ranges[0]; > } __packed; > > -static inline struct htt_rx_indication_mpdu_range * > - htt_rx_ind_get_mpdu_ranges(struct htt_rx_indication *rx_ind) > -{ > - void *ptr = rx_ind; > - > - ptr += sizeof(rx_ind->hdr) > - + sizeof(rx_ind->ppdu) > - + sizeof(rx_ind->prefix) > - + roundup(__le16_to_cpu(rx_ind->prefix.fw_rx_desc_bytes), 4); > - return ptr; > -} > - I'm not really convinced with this. The idea is the function defines how to access the variadic structure member position so it should stay close to the structure definition. This could as well be a #define but an inline function looks cleaner IMHO. -- Pozdrawiam / Best regards, Michal Kazior.