[PATCH v5][next] integrity: Avoid -Wflex-array-member-not-at-end warnings

Mimi Zohar zohar at linux.ibm.com
Fri Apr 5 14:17:09 UTC 2024


On Thu, 2024-04-04 at 18:56 -0600, Gustavo A. R. Silva wrote:
> > "checkpatch.pl --strict" complains "CHECK: Alignment should match open
> > parenthesis".  I'll queue the patch, but how about teaching checkpatch.pl to
> > ignore __struct_group()?
> 
> I think this would do it:
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 9c4c4a61bc83..e229b97f17f6 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3958,7 +3958,7 @@ sub process {
>                          my $rest = $2;
> 
>                          my $pos = pos_last_openparen($rest);
> -                       if ($pos >= 0) {
> +                       if ($pos >= 0 && $rest !~
> /(__)?struct_group(_(tagged|attr))?(\()/) {
>                                  $line =~ /^(\+| )([ \t]*)/;
>                                  my $newindent = $2;
> 
> I'll send a proper patch. Thanks for the suggestion, Mimi.

Thanks, it works.

Mimi




More information about the Linux-security-module-archive mailing list