Re: [RFC net-next 1/6] tools: ynl: fix render-max for flags definition

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

 



On Thu, 23 Feb 2023 13:11:33 +0100 Lorenzo Bianconi wrote:
> +                if const['type'] == 'flags':
> +                    max_name = c_upper(name_pfx + 'mask')
> +                    max_val = f' = {(entry.user_value() << 1) - 1},'
> +                    cw.p(max_name + max_val)

Could you use EnumSet::get_mask instead() ?

I think it also needs to be fixed to actually walk the elements 
and combine the user_value()s rather than count them and assume
there are no gaps.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux