From: "Arend van Spriel" <arend@broadcom.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>,
"linville@tuxdriver.com" <linville@tuxdriver.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 05/23] bcma: add set/mask macros for 16-bit register access
Date: Sat, 10 Dec 2011 21:18:03 +0100 [thread overview]
Message-ID: <4EE3BE7B.5030606@broadcom.com> (raw)
In-Reply-To: <CACna6rwVVEYf0F6HZoMKrJg2NT3c4SPb6OH34LsTm8NR+BtsRA@mail.gmail.com>
On 12/10/2011 12:45 PM, Rafał Miłecki wrote:
> 2011/12/9 Franky Lin <frankyl@broadcom.com>:
>> From: Arend van Spriel <arend@broadcom.com>
>>
>> The BCMA header only had definitions for 32-bit register access. Used
>> those as a template for the 16-bit flavour. Also changed them to inline
>> functions to be on the safe side. As offset parameter is used twice there
>> would be a problem when used like this: bcma_set32(core, offset++, val);
>>
>
> What is an advantage of static inline over define?
>
Hi Rafał,
Apart from the example given in the commit message the CodingStyle
documentation states a preference for inline functions. One advantage I
can come up with is type checking by the compiler.
Gr. AvS
next prev parent reply other threads:[~2011-12-10 20:18 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-08 23:06 [PATCH 00/23] brcm80211: fullmac 4430 support and softmac switch to bcma Franky Lin
2011-12-08 23:06 ` [PATCH 01/23] brcm80211: fmac: save bus interface structure in function 2 device Franky Lin
2011-12-08 23:06 ` [PATCH 02/23] brcm80211: fmac: fix firmware shared structures version Franky Lin
2011-12-08 23:06 ` [PATCH 03/23] brcm80211: fmac: add bcm4330 support Franky Lin
2011-12-08 23:06 ` [PATCH 04/23] brcm80211: fmac: remove drive strength code for unsupported chips Franky Lin
2011-12-08 23:06 ` [PATCH 05/23] bcma: add set/mask macros for 16-bit register access Franky Lin
2011-12-10 11:45 ` Rafał Miłecki
2011-12-10 20:18 ` Arend van Spriel [this message]
2011-12-11 22:50 ` Rafał Miłecki
2011-12-11 19:51 ` Kalle Valo
2011-12-08 23:06 ` [PATCH 06/23] bcma: use static keyword for inline function declaration in bcma.h Franky Lin
2011-12-08 23:06 ` [PATCH 07/23] brcm80211: smac: remove unused fields from struct si_pub definition Franky Lin
2011-12-08 23:06 ` [PATCH 08/23] brcm80211: smac: move fields from struct si_pub to struct si_info Franky Lin
2011-12-08 23:06 ` [PATCH 09/23] brcm80211: smac: use inline access functions for struct si_pub fields Franky Lin
2011-12-08 23:06 ` [PATCH 10/23] brcm80211: smac: change from pci device driver to bcma device driver Franky Lin
2011-12-08 23:06 ` [PATCH 11/23] brcm80211: smac: change attach interfaces in main.c for bcma support Franky Lin
2011-12-08 23:06 ` [PATCH 12/23] brcm80211: smac: rename struct si_info field pbus to pcibus Franky Lin
2011-12-08 23:06 ` [PATCH 13/23] brcm80211: smac: change ai_attach interface taking a bcma_bus object Franky Lin
2011-12-08 23:06 ` [PATCH 14/23] brcm80211: smac: remove enumeration rom parsing function Franky Lin
2011-12-08 23:06 ` [PATCH 15/23] brcm80211: smac: use bcma core register access functions for 802.11 core Franky Lin
2011-12-08 23:06 ` [PATCH 16/23] brcm80211: smac: use DMA-API calls for descriptor allocations Franky Lin
2011-12-08 23:06 ` [PATCH 17/23] brcm80211: smac: use bcma function for register access in dma.c Franky Lin
2011-12-08 23:06 ` [PATCH 18/23] brcm80211: smac: use bcma functions for register access in phy code Franky Lin
2011-12-10 21:04 ` Hauke Mehrtens
2011-12-08 23:06 ` [PATCH 19/23] brcm80211: smac: remove SI_FAST() macro usage Franky Lin
2011-12-08 23:06 ` [PATCH 20/23] brcm80211: smac: replace ai_corereg() function with ai_cc_reg() Franky Lin
2011-12-08 23:06 ` [PATCH 21/23] brcm80211: smac: remove unused functions and/or prototypes Franky Lin
2011-12-08 23:06 ` [PATCH 22/23] brcm80211: smac: use bcma core control functions Franky Lin
2011-12-08 23:06 ` [PATCH 23/23] brcm80211: smac: use bcma core access functions in nicpci.c Franky Lin
2011-12-10 22:12 ` [PATCH 00/23] brcm80211: fullmac 4430 support and softmac switch to bcma Hauke Mehrtens
2011-12-11 19:54 ` Arend van Spriel
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=4EE3BE7B.5030606@broadcom.com \
--to=arend@broadcom.com \
--cc=frankyl@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=zajec5@gmail.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).