Skip to contentSkip to conversation

mac_pton: Clean up the header inclusions

PATCH Applied Andy Shevchenko 4 participants 5 messages Jun 4, 2023 – Jun 6, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac_pton: Clean up the header inclusions

Since hex_to_bin() is provided by hex.h there is no need to require kernel.h. Replace the latter by the former and add missing export.h.

---
 lib/net_utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/net_utils.c +2 -1
index c17201df3d08..42bb0473fb22 100644
@@ -2,7 +2,8 @@
 #include <linux/string.h>
 #include <linux/if_ether.h>
 #include <linux/ctype.h>
-#include <linux/kernel.h>
+#include <linux/export.h>
+#include <linux/hex.h>
 
 bool mac_pton(const char *s, u8 *mac)
 {
Signature · 1 line
2.40.0.1.gaa8946217a0b
#1 lore raw
Quoted 4 lines · Andy Shevchenko

Since hex_to_bin() is provided by hex.h there is no need to require kernel.h. Replace the latter by the former and add missing export.h.

Hi Andy,

is there a tool that you used to verify this change?

maintainer
#2 lore raw
Quoted 9 lines · Simon Horman
Quoted 4 lines · Andy Shevchenko

Since hex_to_bin() is provided by hex.h there is no need to require kernel.h. Replace the latter by the former and add missing export.h.

Hi Andy,

is there a tool that you used to verify this change?

I guess build testing it should suffice ;)

/P

#3 lore raw
Quoted 4 lines · Paolo Abeni
Quoted 3 lines · Simon Horman
Quoted 2 lines · Andy Shevchenko

Since hex_to_bin() is provided by hex.h there is no need to require kernel.h. Replace the latter by the former and add missing export.h.

...

Quoted 3 lines
Quoted 1 line

is there a tool that you used to verify this change?

I guess build testing it should suffice ;)

Yes, it was my brain work with reading the code + compile test on x86.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#4 lore raw
In reply to Andy Shevchenko
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 7 lines · On Sun, 4 Jun 2023 16:28:58 +0300 you wrote:

Since hex_to_bin() is provided by hex.h there is no need to require kernel.h. Replace the latter by the former and add missing export.h.

---
 lib/net_utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
- [net-next,v1,1/1] mac_pton: Clean up the header inclusions

    https://git.kernel.org/netdev/net-next/c/8d2b2281aea9

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html