Re: [PATCH v4 1/4] fpga: dfl: change data type of feature id to u16
From: Xu Yilun
Date: Thu Aug 13 2020 - 04:02:26 EST
On Wed, Aug 12, 2020 at 08:52:39AM +0000, David Laight wrote:
> From: Moritz Fischer
> > Sent: 12 August 2020 04:56
> >
> > On Mon, Aug 10, 2020 at 10:41:10AM +0800, Xu Yilun wrote:
> > > The feature id is stored in a 12 bit field in DFH. So a u16 variable is
> > > enough for feature id.
> > >
> > > This patch changes all feature id related places to fit u16.
>
> How much bigger does it make the kernel?
The patch changes the definition of feature id from u64 to u16, and will
make the kernel slightly smaller.
Actually it is not the main purpose of this change. In the following
patches we will put the feature_id definiton in mod_devicetable.h in
order to support MODULE_DEVICE_TABLE(). The modpost will also use the
definitions in mod_devicetable.h but seems it doesn't support u64 now.
So we reduced the unnecessary bits definition in feature_id to fit
modpost.
Thanks,
Yilun
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)