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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZC2/Pi+M4rWw89x2@casper.infradead.org>
Date:   Wed, 5 Apr 2023 19:34:38 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Sean Anderson <seanga2@...il.com>
Cc:     Simon Horman <horms@...nel.org>, Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        kernel test robot <lkp@...el.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Linux Memory Management List <linux-mm@...ck.org>,
        linux-m68k@...ts.linux-m68k.org
Subject: Re: [PATCH net-next] net: sunhme: move asm includes to below linux
 includes

On Wed, Apr 05, 2023 at 02:09:55PM -0400, Sean Anderson wrote:
> On 4/5/23 14:07, Matthew Wilcox wrote:
> > We always include linux/* headers before asm/*.  The "sorting" of
> > headers in this way was inappropriate.
> 
> Is this written down anywhere? I couldn't find it in Documentation/process...

Feel free to send a patch.  Generally, it should be:

#include <linux/foo.h>
#include <linux/bar.h>

#include <asm/baz.h>
#include <asm/quux.h>

#include "local.h"

Some drivers do this a different way with a single local.h that includes
all necessary includes.

Also if <linux/foo.h> and <asm/foo.h> both exist, you should include
<linux/foo.h> (which almost certainly includes <asm/foo.h>)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ