lkml.org 
[lkml]   [2023]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 4/5] platform/x86/intel/ifs: Implement Array BIST test
From
On 1/31/23 15:43, Jithu Joseph wrote:
> +union ifs_array {
> + u64 data;
> + struct {
> + u32 array_bitmask :32;
> + u32 array_bank :16;
> + u32 rsvd :15;
> + u32 ctrl_result :1;
> + };
> +};

Why bother with a bitfield? Just do:

union ifs_array {
u64 data;
struct {
u32 array_bitmask;
u16 array_bank;
u16 flags;
};
};

Then you only need to mask 'ctrl_result' out of flags. You don't need
any crazy macros.

\
 
 \ /
  Last update: 2023-03-27 00:06    [W:0.854 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site