All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 11/16] ath9k: Remove "OS_" prefixes in macros.
Date: Wed, 30 Jul 2008 21:44:49 -0400	[thread overview]
Message-ID: <1217468689.17029.7.camel@dv> (raw)
In-Reply-To: <43e72e890807301823w3b800ebcwa12317e0a45d0dcb@mail.gmail.com>

On Wed, 2008-07-30 at 18:23 -0700, Luis R. Rodriguez wrote:
> On Wed, Jul 30, 2008 at 6:16 PM, Pavel Roskin <proski@gnu.org> wrote:
> > On Mon, 2008-07-28 at 22:47 -0700, lrodriguez at atheros.com wrote:
> >> From: Sujith Manoharan <smanoharan@atheros.com>
> >>
> >> diff --git a/drivers/net/wireless/ath9k/ath9k.h b/drivers/net/wireless/ath9k/ath9k.h
> >> index 6fa1eb6..c3294c0 100644
> >> --- a/drivers/net/wireless/ath9k/ath9k.h
> >> +++ b/drivers/net/wireless/ath9k/ath9k.h
> >> @@ -622,17 +622,15 @@ struct hal_country_entry {
> >>
> >>  #define SM(_v, _f)  (((_v) << _f##_S) & _f)
> >>  #define MS(_v, _f)  (((_v) & _f) >> _f##_S)
> >> -#define OS_REG_RMW(_a, _r, _set, _clr)    \
> >> +#define REG_RMW(_a, _r, _set, _clr)    \
> >>       REG_WRITE(_a, _r, (REG_READ(_a, _r) & ~(_clr)) | (_set))
> >
> > I think these are pretty good candidates for inline functions.  I'm not
> > sure removing "OS_" is a useful intermediate step.  It's better to keep
> > such massive changes to the minimum to avoid potential conflicts with
> > other patches.
> 
> This was done in response to Johannes comments. This can be moved to
> inline though.

It would be really nice.  Explicit return types tend to unmask some
issues in the calling code, if there are any.

I don't care if you are going to change the macros/functions themselves
in many steps, but let's avoid the need to rename all callers again.

-- 
Regards,
Pavel Roskin

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Roskin <proski@gnu.org>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	ath9k-devel@lists.ath9k.org, Jouni.Malinen@atheros.com,
	Sujith Manoharan <smanoharan@atheros.com>
Subject: Re: [PATCH 11/16] ath9k: Remove "OS_" prefixes in macros.
Date: Wed, 30 Jul 2008 21:44:49 -0400	[thread overview]
Message-ID: <1217468689.17029.7.camel@dv> (raw)
In-Reply-To: <43e72e890807301823w3b800ebcwa12317e0a45d0dcb@mail.gmail.com>

On Wed, 2008-07-30 at 18:23 -0700, Luis R. Rodriguez wrote:
> On Wed, Jul 30, 2008 at 6:16 PM, Pavel Roskin <proski@gnu.org> wrote:
> > On Mon, 2008-07-28 at 22:47 -0700, lrodriguez@atheros.com wrote:
> >> From: Sujith Manoharan <smanoharan@atheros.com>
> >>
> >> diff --git a/drivers/net/wireless/ath9k/ath9k.h b/drivers/net/wireless/ath9k/ath9k.h
> >> index 6fa1eb6..c3294c0 100644
> >> --- a/drivers/net/wireless/ath9k/ath9k.h
> >> +++ b/drivers/net/wireless/ath9k/ath9k.h
> >> @@ -622,17 +622,15 @@ struct hal_country_entry {
> >>
> >>  #define SM(_v, _f)  (((_v) << _f##_S) & _f)
> >>  #define MS(_v, _f)  (((_v) & _f) >> _f##_S)
> >> -#define OS_REG_RMW(_a, _r, _set, _clr)    \
> >> +#define REG_RMW(_a, _r, _set, _clr)    \
> >>       REG_WRITE(_a, _r, (REG_READ(_a, _r) & ~(_clr)) | (_set))
> >
> > I think these are pretty good candidates for inline functions.  I'm not
> > sure removing "OS_" is a useful intermediate step.  It's better to keep
> > such massive changes to the minimum to avoid potential conflicts with
> > other patches.
> 
> This was done in response to Johannes comments. This can be moved to
> inline though.

It would be really nice.  Explicit return types tend to unmask some
issues in the calling code, if there are any.

I don't care if you are going to change the macros/functions themselves
in many steps, but let's avoid the need to rename all callers again.

-- 
Regards,
Pavel Roskin

  reply	other threads:[~2008-07-31  1:44 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-29  5:47 [PATCH 00/16] ath9k: some cleanups, and a few small fixes lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 01/16] ath9k: Replace KASSERT() with BUG_ON() lrodriguez at atheros.com
2008-07-29  5:47 ` [ath9k-devel] [PATCH 02/16] ath9k: Remove ineffective multirate retry stuff lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 03/16] ath9k: Clean up in antenna diversity handling. Get rid of sc_needmib lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 04/16] ath9k: Use struct ath_softc directly instead of a void pointer lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 05/16] ath9k: Use 'ATH9K' as a prefix instead of 'HAL' for a lot of macros lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 06/16] ath9k: Fix missing brace in branch on ath_chainmask_sel_logic() lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-31  1:11   ` [ath9k-devel] " Pavel Roskin
2008-07-31  1:11     ` Pavel Roskin
2008-07-31  1:21     ` [ath9k-devel] " Luis R. Rodriguez
2008-07-31  1:21       ` Luis R. Rodriguez
2008-07-31  1:41       ` [ath9k-devel] " Pavel Roskin
2008-07-31  1:41         ` Pavel Roskin
2008-07-29  5:47 ` [ath9k-devel] [PATCH 07/16] ath9k: Replace enum hal_bool with bool lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 08/16] ath9k: Revamp debugging lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 09/16] ath9k: Use standard ISR return values, merge ath_intr and ath_isr lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 10/16] ath9k: Don't pass opmode twice to ath_vap_attach, return standard error values from add_interface lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 11/16] ath9k: Remove "OS_" prefixes in macros lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-31  1:16   ` [ath9k-devel] " Pavel Roskin
2008-07-31  1:16     ` Pavel Roskin
2008-07-31  1:23     ` [ath9k-devel] " Luis R. Rodriguez
2008-07-31  1:23       ` Luis R. Rodriguez
2008-07-31  1:44       ` Pavel Roskin [this message]
2008-07-31  1:44         ` Pavel Roskin
2008-07-31  2:06         ` [ath9k-devel] " Luis R. Rodriguez
2008-07-31  2:06           ` Luis R. Rodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 12/16] ath9k: Dont maintain some of h/w caps in ath_softc, access them directly from ah_caps instead lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 13/16] ath9k: Break down ath9k_regd_init_channels and use helper functions lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 14/16] ath9k: Remove AH_DEBUG_COUNTRY lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 15/16] ath9k: Don't set the channel in ath_rate_init() lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:47 ` [ath9k-devel] [PATCH 16/16] ath9k: Remove some unused macros lrodriguez at atheros.com
2008-07-29  5:47   ` lrodriguez
2008-07-29  5:50 ` [ath9k-devel] [PATCH 00/16] ath9k: some cleanups, and a few small fixes Luis R. Rodriguez
2008-07-29  5:50   ` Luis R. Rodriguez
2008-07-29  5:52   ` [ath9k-devel] " Luis R. Rodriguez
2008-07-29  5:52     ` Luis R. Rodriguez

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=1217468689.17029.7.camel@dv \
    --to=proski@gnu.org \
    --cc=ath9k-devel@lists.ath9k.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.