All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: netdev/checkpatch issue
       [not found] <OS3P286MB22950EB574F05C341DEEF554F5D69@OS3P286MB2295.JPNP286.PROD.OUTLOOK.COM>
@ 2023-02-02 18:02 ` Joe Perches
       [not found]   ` <OS3P286MB22958BF0734E62B7661D06E0F5D69@OS3P286MB2295.JPNP286.PROD.OUTLOOK.COM>
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2023-02-02 18:02 UTC (permalink / raw)
  To: 陶 缘, apw, dwaipayanray1, lukas.bulwahn, netdev

On Thu, 2023-02-02 at 13:55 +0000, 陶 缘 wrote:
> Hi, Dear checkpatch experts:
> 
>       I may encountered a false-postive issue on checkpatch function.

I think not.
Perhaps send me as an attachment the specific patch file where
you get this error.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 回复: netdev/checkpatch issue
       [not found]   ` <OS3P286MB22958BF0734E62B7661D06E0F5D69@OS3P286MB2295.JPNP286.PROD.OUTLOOK.COM>
@ 2023-02-03  7:29     ` Joe Perches
  2023-02-03  8:38       ` Lukas Bulwahn
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2023-02-03  7:29 UTC (permalink / raw)
  To: 陶 缘, apw, dwaipayanray1, lukas.bulwahn, netdev

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 回复: netdev/checkpatch issue
  2023-02-03  7:29     ` 回复: " Joe Perches
@ 2023-02-03  8:38       ` Lukas Bulwahn
       [not found]         ` <OS3P286MB2295DAC1609FDB8844C0494EF5D79@OS3P286MB2295.JPNP286.PROD.OUTLOOK.COM>
  0 siblings, 1 reply; 4+ messages in thread
From: Lukas Bulwahn @ 2023-02-03  8:38 UTC (permalink / raw)
  To: Joe Perches; +Cc: 陶 缘, apw, dwaipayanray1, netdev

On Fri, Feb 3, 2023 at 8:29 AM Joe Perches <joe@perches.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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 回复: netdev/checkpatch issue
       [not found]         ` <OS3P286MB2295DAC1609FDB8844C0494EF5D79@OS3P286MB2295.JPNP286.PROD.OUTLOOK.COM>
@ 2023-02-03  8:51           ` Lukas Bulwahn
  0 siblings, 0 replies; 4+ messages in thread
From: Lukas Bulwahn @ 2023-02-03  8:51 UTC (permalink / raw)
  To: 陶 缘; +Cc: Joe Perches, apw, dwaipayanray1, netdev

On Fri, Feb 3, 2023 at 9:44 AM 陶 缘 <taoyuan_eddy@hotmail.com> wrote:
>
> Hi, Lukas:
>       Such a co-incidence, i just shot out the v4 submission:)
>
> Your analysis is convincing, the only thing is that i count the width in the specific line, it is 60+ characters, way below 80.
>
> let me check the script see if i can find anything
>

We assume a tabsize of eight characters, see "my $tabsize = 8;". That
is defined in the kernel coding guidelines.

Lukas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-03  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <OS3P286MB22950EB574F05C341DEEF554F5D69@OS3P286MB2295.JPNP286.PROD.OUTLOOK.COM>
2023-02-02 18:02 ` netdev/checkpatch issue Joe Perches
     [not found]   ` <OS3P286MB22958BF0734E62B7661D06E0F5D69@OS3P286MB2295.JPNP286.PROD.OUTLOOK.COM>
2023-02-03  7:29     ` 回复: " Joe Perches
2023-02-03  8:38       ` Lukas Bulwahn
     [not found]         ` <OS3P286MB2295DAC1609FDB8844C0494EF5D79@OS3P286MB2295.JPNP286.PROD.OUTLOOK.COM>
2023-02-03  8:51           ` Lukas Bulwahn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.