lkml.org 
[lkml]   [2022]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/4] rtw88: Add packed attribute to the eFuse structs
Hi Ping-Ke,

On Thu, Dec 29, 2022 at 10:25 AM Ping-Ke Shih <pkshih@realtek.com> wrote:
[...]
>
> > @@ -43,13 +43,13 @@ struct rtw8821ce_efuse {
> > u8 link_cap[4];
> > u8 link_control[2];
> > u8 serial_number[8];
> > - u8 res0:2; /* 0xf4 */
> > - u8 ltr_en:1;
> > - u8 res1:2;
> > - u8 obff:2;
> > - u8 res2:3;
> > - u8 obff_cap:2;
> > - u8 res3:4;
> > + u16 res0:2; /* 0xf4 */
> > + u16 ltr_en:1;
> > + u16 res1:2;
> > + u16 obff:2;
> > + u16 res2:3;
> > + u16 obff_cap:2;
> > + u16 res3:4;
>
> These should be __le16. Though bit fields are suitable to efuse layout,
> we don't access these fields for now. It would be well.
My understanding is that it should look like this (replacing all of res0..res3):
__le16 some_field_name; /* 0xf4 */
How to call that single __le16 field then?

I also tried using bit-fields for an __le16 (so basically the same as
my patch but using __le16 instead of u16) but that makes sparse
complain:
error: invalid bitfield specifier for type restricted __le16


Best regards,
Martin

\
 
 \ /
  Last update: 2023-03-26 23:22    [W:0.125 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site