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: <CABJPP5AsOwPDYrqMAZ5Vdo8kz55Uccq0jPFfzvB4NTWHDhkJ8A@mail.gmail.com>
Date:   Sun, 22 Nov 2020 02:01:23 +0530
From:   Dwaipayan Ray <dwaipayanray1@...il.com>
To:     Joe Perches <joe@...ches.com>
Cc:     linux-kernel-mentees@...ts.linuxfoundation.org,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>
Subject: Re: [PATCH] checkpatch: add --fix option for INCLUDE_LINUX

On Sun, Nov 22, 2020 at 1:35 AM Joe Perches <joe@...ches.com> wrote:
>
> On Sat, 2020-11-21 at 21:47 +0530, Dwaipayan Ray wrote:
> > Provide fix option to INCLUDE_LINUX check to replace asm
> > includes.
> >
> > Macros of type:
> >  #include <asm/percpu.h>
> >
> > are corrected to:
> >  #include <linux/percpu.h>
> []
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
> > @@ -5468,8 +5468,11 @@ sub process {
> >                                               CHK("ARCH_INCLUDE_LINUX",
> >                                                   "Consider using #include <linux/$file> instead of <asm/$file>\n" . $herecurr);
> >                                       } else {
> > -                                             WARN("INCLUDE_LINUX",
> > -                                                  "Use #include <linux/$file> instead of <asm/$file>\n" . $herecurr);
> > +                                             if (WARN("INCLUDE_LINUX",
> > +                                                      "Use #include <linux/$file> instead of <asm/$file>\n" . $herecurr) &&
> > +                                                 $fix) {
> > +                                                     $fixed[$fixlinenr] =~ s/\<asm\/$file\>/\<linux\/$file\>/;
>
> $file can include a slash.
>
> e.g.: arch/arm/kernel/atags_parse.c:#include <asm/mach/arch.h>
>
> Probably simpler to use /Q /E quoting.
>
>
Thanks. I will do that.

Regards,
Dwaipayan.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ