About enum convert (Old "Re: [PATCH 1/8] btrfs: delayed-ref: Introduce better documented delayed ref structures")

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

 




On 2018/12/10 下午5:48, Nikolay Borisov wrote:
> 
> 
[snip]
> 
> IMO it makes sense in this series to have a patch which converts the
> action defines to an enum and subsequently modify functions/structs to
> actually be of enum type.
> 

I'm completely OK to convert it to enum, for its conflict free nature.

However I'm not sure to which degree we should go.

For current David's enum cleanup, we all go anonymous enum, which just
acts as an auto-increasing #define.
However AFAIK compiler can further compress the size of named enum if
needed, and it provides much better type check to prevent us to do
stupid type convert.

I'm wondering which way should we go. The named enum (which needs to
modify all parameters) or anonymous enum for less code modification?

Thanks,
Qu



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux