lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKXUXMwgqTqjWVsRjSM-RatjjpxMmij+KOHruyhijK0DTzJ_Kw@mail.gmail.com>
Date:   Fri, 3 Feb 2023 09:38:44 +0100
From:   Lukas Bulwahn <lukas.bulwahn@...il.com>
To:     Joe Perches <joe@...ches.com>
Cc:     陶 缘 <taoyuan_eddy@...mail.com>,
        "apw@...onical.com" <apw@...onical.com>,
        "dwaipayanray1@...il.com" <dwaipayanray1@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: 回复: netdev/checkpatch issue

On Fri, Feb 3, 2023 at 8:29 AM Joe Perches <joe@...ches.com> wrote:
>
> On Thu, 2023-02-02 at 23:42 +0000, 陶 缘 wrote:
> > Hi, Joe:
> >       Thanks a lot for your time.
> >       I put it in the attachment, in case you prefer plain text content in email, i also append it at the end
> > by the way, could you let me know if the 'netdev/checkpatch' is calling ./scripts/checkpatch.pl
>
> As I have no idea what netdev/checkpatch is, i have no idea.
>
> The checkpatch script in the kernel does not produce an error
> for this input.

Hi Eddy, Hi Joe,

It seems that the netdev/checkpatch is a checkpatch invocation with
some further configuration setup. Unfortunately, I could not find out
the actual setup, probably hidden somewhere in the patchwork
configuration of that instance. Maybe some netdev patchwork
administrator can share the actual command that is invoked here.

However, I can explain the printed error message. By default,
./scripts/checkpatch.pl uses a max_line_length of 100---see
checkpatch.pl line "my $max_line_length = 100;". The netdev checkpatch
invocation is overriding that and setting it to 80 characters. When,
you run ./scripts/checkpatch.pl --max-line-length=80
net-next-v3-1-1-net-openvswitch-reduce-cpu_used_mask-memory.patch, you
will see the error message that netdev checkpatch shows:

WARNING: line length of 82 exceeds 80 columns
#129: FILE: net/openvswitch/flow.c:110:
+ cpumask_set_cpu(cpu, flow->cpu_used_mask);

total: 0 errors, 1 warnings, 0 checks, 64 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

net-next-v3-1-1-net-openvswitch-reduce-cpu_used_mask-memory.patch has
style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


So, it is clear that this line, net/openvswitch/flow.c:110, is 82
characters long. So, you counted the characters differently. You need
to consider that a tab counts as 8 characters wide, which in my editor
then leads to a line with 82 characters.

It is up to you and netdev maintainers how to proceed. Checkpatch is
not buggy here, but if you have a line with 82 characters (due to the
many tabs) and you run ./scripts/checkpatch.pl --max-line-length=80,
checkpatch rightfully complains to you.

I hope this helps.

Best regards,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ