[PATCH 2/3] bcma: SPROM: add macro for easier extraction

Rafał Miłecki zajec5 at gmail.com
Mon Jan 2 07:39:02 EST 2012


W dniu 2 stycznia 2012 13:20 użytkownik Peter Stuge <peter at stuge.se> napisał:
> Rafał Miłecki wrote:
>> +#define SPEX(_field, _offset, _mask, _shift) \
>> +     bus->sprom._field = ((sprom[SPOFF(_offset)] & (_mask)) >> (_shift))
>
> Maybe this should take at least bus as parameter too?

I don't think we will ever want to extract SPROM info to something
else. Can't imageine such a situation right now.

Of course it may happen some new requirement will appear in the
future. But it's hard to predict it right now. And we never know what
macro will handle that future requirement. Oh, and we always can
modify existing macro or add new one :) Fortunately it's not any kind
of API :)

-- 
Rafał



More information about the b43-dev mailing list