All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: linville@tuxdriver.com
Cc: Francois Romieu <romieu@fr.zoreil.com>,
	Joe Perches <joe@perches.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/5] rtlwifi: Move RX/TX macros into common file
Date: Thu, 12 Jan 2012 09:43:36 -0600	[thread overview]
Message-ID: <4F0EFFA8.1060405@lwfinger.net> (raw)
In-Reply-To: <20120112081935.GA10347@electric-eye.fr.zoreil.com>

On 01/12/2012 02:19 AM, Francois Romieu wrote:
> Larry Finger<Larry.Finger@lwfinger.net>  :
>> On 01/11/2012 06:27 PM, Joe Perches wrote:
> [...]
>>> static inline u32 le32p_to_cpu_shift_and_mask(__le32 *desc, int shift, u32 mask)
>>> {
>>> 	return (le32_to_cpu(*desc)>>   shift)&   BIT_LEN_MASK_32(mask);
>>> }
>>
>> I need to think about this one some more.
>
> Joe only told a part of the story here : this change should eventually go
> along a definition of the descriptors as a __leXY struct and a specific
> registers / bits definition. It will be a bit tedious.
>
> [...]
>>> I don't see how centralizing these non-shared
>>> macro names helps.
>>>
>>> Maybe if the code is actually common, have a
>>> separate #include for each card with common
>>> named #defines as appropriate.
>>
>> The idea of centralizing the non-shared names was to have all these
>> macros in one place. If any need to be changes, that one file will
>> have all of them.
>
> It is paid at the price of the giant #include file and some irrelevant
> code pollution in chipset-dedicated parts of the driver. As the main
> driver maintainer, you may not win much -if anything- in return.
>
> Joe's suggestion can help with factoring out the code while exhibiting
> the differences in the data layout (i.e hardware registers). It is not
> automatic though.

John,

Please drop this set of patches. I'll decide how much of the refactoring I want 
to do later.

Larry



  reply	other threads:[~2012-01-12 15:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 23:07 [PATCH 0/5] rtlwifi: Cleanup the macros that read/write the RX/TX descriptors Larry Finger
2012-01-11 23:07 ` [PATCH 1/5] rtlwifi: Move RX/TX macros into common file Larry Finger
2012-01-12  0:27   ` Joe Perches
2012-01-12  1:11     ` Larry Finger
2012-01-12  8:19       ` Francois Romieu
2012-01-12 15:43         ` Larry Finger [this message]
2012-01-11 23:07 ` [PATCH 2/5] rtl8192ce: Switch to use the combined macros file Larry Finger
2012-01-11 23:07 ` [PATCH 3/5] rtl8192cu: Convert driver to use the new " Larry Finger
2012-01-11 23:07 ` [PATCH 4/5] rtl8192de: Change driver to use " Larry Finger
2012-01-11 23:07 ` [PATCH 5/5] rtl8192se: Convert driver to use the new macro file Larry Finger

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=4F0EFFA8.1060405@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=joe@perches.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=romieu@fr.zoreil.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 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.