Re: [PATCH v3] checkpatch: extend attributes check to handle more patterns

2020-10-24 Thread Randy Dunlap
On 10/24/20 4:21 PM, Joe Perches wrote: >> +if (exists($attr_list{$curr_attr})) { >> +my $new = $attr_list{$curr_attr}; >> +WARN("PREFER_DEFINED_ATTRIBUTE_MACRO", >> +

Re: [PATCH v3] checkpatch: extend attributes check to handle more patterns

2020-10-24 Thread Joe Perches
On Sat, 2020-10-24 at 14:35 +0530, Dwaipayan Ray wrote: > It is generally preferred that the macros from > include/linux/compiler_attributes.h are used, unless there > is a reason not to. > > checkpatch currently checks __attribute__ for each of > packed, aligned, printf, scanf, and weak. Other

Re: [PATCH v3] checkpatch: extend attributes check to handle more patterns

2020-10-24 Thread Dwaipayan Ray
On Sat, Oct 24, 2020 at 2:36 PM Dwaipayan Ray wrote: > > It is generally preferred that the macros from > include/linux/compiler_attributes.h are used, unless there > is a reason not to. > > checkpatch currently checks __attribute__ for each of > packed, aligned, printf, scanf, and weak. Other

[PATCH v3] checkpatch: extend attributes check to handle more patterns

2020-10-24 Thread Dwaipayan Ray
It is generally preferred that the macros from include/linux/compiler_attributes.h are used, unless there is a reason not to. checkpatch currently checks __attribute__ for each of packed, aligned, printf, scanf, and weak. Other declarations in compiler_attributes.h are not handled. Add a generic