Search Linux Wireless

Re: [PATCH 1/5] rtlwifi: Move RX/TX macros into common file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/12/2012 02:19 AM, Francois Romieu wrote:
Larry Finger<Larry.Finger@xxxxxxxxxxxx>  :
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


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux