Port-amd64 archive

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

Re: x86 pcitag_t change proposal/patch

On Tue, Dec 04, 2012 at 08:59:43PM -0600, Jonathan A. Kollasch wrote:
> I'd like feedback on the attached patch.
> Commit message would be approximately as follows:
> +struct x86_pcitag {
> +     uint32_t f:3;
> +     uint32_t d:5;
> +     uint32_t b:8;
>  };

Longer member names and not bitfields - they are very unportable
(which order the bits are allocated in is not defined anywhere,
so there are at least 4 obvious options + endianness changes).

Given that much of the code used explicit shifts on the bitfield
values all you've done is added loads of code to save a couple
of data bytes.


David Laight: david%l8s.co.uk@localhost

Home | Main Index | Thread Index | Old Index