[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y/p4oiP8cb+M4j9X@corigine.com>
Date: Sat, 25 Feb 2023 22:07:46 +0100
From: Simon Horman <simon.horman@...igine.com>
To: Sean Anderson <seanga2@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH net-next 4/7] net: sunhme: Alphabetize includes
On Wed, Feb 22, 2023 at 04:03:52PM -0500, Sean Anderson wrote:
> Alphabetize includes to make it clearer where to add new ones.
>
> Signed-off-by: Sean Anderson <seanga2@...il.com>
> ---
>
> drivers/net/ethernet/sun/sunhme.c | 45 +++++++++++++++----------------
> 1 file changed, 22 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
> index 127253c67c59..ab39b555d9f7 100644
> --- a/drivers/net/ethernet/sun/sunhme.c
> +++ b/drivers/net/ethernet/sun/sunhme.c
> @@ -14,41 +14,40 @@
> * argument : macaddr=0x00,0x10,0x20,0x30,0x40,0x50
> */
>
> -#include <linux/module.h>
> -#include <linux/kernel.h>
> -#include <linux/types.h>
> +#include <asm/byteorder.h>
> +#include <asm/dma.h>
> +#include <linux/bitops.h>
> +#include <linux/crc32.h>
> +#include <linux/delay.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/errno.h>
> +#include <linux/etherdevice.h>
> +#include <linux/ethtool.h>
> #include <linux/fcntl.h>
> -#include <linux/interrupt.h>
> -#include <linux/ioport.h>
> #include <linux/in.h>
> -#include <linux/slab.h>
> -#include <linux/string.h>
> -#include <linux/delay.h>
> #include <linux/init.h>
> -#include <linux/ethtool.h>
> +#include <linux/interrupt.h>
> +#include <linux/io.h>
> +#include <linux/ioport.h>
> +#include <linux/kernel.h>
> #include <linux/mii.h>
> -#include <linux/crc32.h>
> -#include <linux/random.h>
> -#include <linux/errno.h>
> +#include <linux/mm.h>
> +#include <linux/module.h>
> #include <linux/netdevice.h>
> -#include <linux/etherdevice.h>
> +#include <linux/random.h>
> #include <linux/skbuff.h>
> -#include <linux/mm.h>
> -#include <linux/bitops.h>
> -#include <linux/dma-mapping.h>
> -
> -#include <asm/io.h>
> -#include <asm/dma.h>
> -#include <asm/byteorder.h>
> +#include <linux/slab.h>
> +#include <linux/string.h>
> +#include <linux/types.h>
>
> #ifdef CONFIG_SPARC
> -#include <linux/of.h>
> -#include <linux/of_device.h>
> +#include <asm/auxio.h>
> #include <asm/idprom.h>
> #include <asm/openprom.h>
> #include <asm/oplib.h>
> #include <asm/prom.h>
> -#include <asm/auxio.h>
> +#include <linux/of_device.h>
> +#include <linux/of.h>
A nice cleanup, IMHO.
But can linux/ includes also moved out of the ifdefs.
> #endif
> #include <linux/uaccess.h>
And, perhaps it would be nice to further move things around so there are
three groups of includes:
* <asm/*.h>
- non #ifdef CONFIG_SPARC; and
- #ifdef CONFIG_SPARC
* <linux/*>
* "*.h"
Powered by blists - more mailing lists