diff mbox series

[RFC,net-next,4/7] net: sunhme: Alphabetize includes

Message ID 20230222210355.2741485-5-seanga2@gmail.com (mailing list archive)
State RFC
Delegated to: Netdev Maintainers
Headers show
Series net: sunhme: Probe/IRQ cleanups | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next, async
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 63 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sean Anderson Feb. 22, 2023, 9:03 p.m. UTC
Alphabetize includes to make it clearer where to add new ones.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 drivers/net/ethernet/sun/sunhme.c | 45 +++++++++++++++----------------
 1 file changed, 22 insertions(+), 23 deletions(-)

Comments

Simon Horman Feb. 25, 2023, 9:07 p.m. UTC | #1
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@gmail.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"
diff mbox series

Patch

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>
 #endif
 #include <linux/uaccess.h>