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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c3dc1171-a625-a84a-e2be-a71e5cbbe97a@acm.org>
Date:   Wed, 7 Sep 2022 16:12:55 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Arun Easi <aeasi@...vell.com>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Martin Petersen <martin.petersen@...cle.com>,
        Sudip Mukherjee <sudipm.mukherjee@...il.com>,
        James Bottomley <jejb@...ux.ibm.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-next@...r.kernel.org, GR-QLogic-Storage-Upstream@...vell.com
Subject: Re: [EXT] Re: [PATCH v2 1/1] tracing: Fix compile error in
 trace_array calls when TRACING is disabled

On 9/7/22 15:52, Arun Easi wrote:
> On Wed, 7 Sep 2022, 12:27pm, Bart Van Assche wrote:
>>> +static inline int
>>> +trace_array_printk(struct trace_array *tr, unsigned long ip,
>>> +		       const char *fmt, ...)
>>
>> This is not the recommended way to format a function definition.
> 
> That was mostly a Y&P from the prototype earlier in the file. Is it the
> linebreak after "int" you are referring to, or are there more?

In allmost all kernel code I have seen the function name is on the same 
line as the return type. Additionally, a common style is to align the 
second line with arguments with the opening parenthesis. From 
Documentation/process/coding-style.rst: "A very commonly used style
is to align descendants to a function open parenthesis."

>> Consider running git clang-format HEAD^.
> 
> It is a bit cryptic to me what it is complaining about (sorry
> clang-format newbie here):
> 
> # git clang-format -v HEAD^
> Running clang-format on the following files:
>      include/linux/trace.h
> YAML:671:20: error: unknown enumerated scalar
> SpaceBeforeParens: ControlStatementsExceptForEachMacros
>                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Error reading /root/aeasi/src/mkp.git/.clang-format: Invalid argument
> error: `clang-format -lines=29:30 -lines=51:84 include/linux/trace.h` failed
> 
> Perhaps my clang-tools are not recent enough.
> 
> # clang-format --version
> clang-format version 10.0.1 (Red Hat 10.0.1-1.module+el8.3.0+7459+90c24896)
> 
> Still digging..

git clang-format HEAD^ reformats the topmost commit according to the 
rules in the .clang-format file in the top-level directory. Please 
review any changes made by that command before amending these to the 
original commit.

I think the error messages above indicate that your version of 
clang-format is too old.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ