diff mbox series

[net-next,v1,1/1] mac_pton: Clean up the header inclusions

Message ID 20230604132858.6650-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Commit 8d2b2281aea90ab265733c3cda83b73a01ca352f
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v1,1/1] mac_pton: Clean up the header inclusions | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 10 this patch: 10
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
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: 10 this patch: 10
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Andy Shevchenko June 4, 2023, 1:28 p.m. UTC
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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 lib/net_utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Simon Horman June 6, 2023, 8:42 a.m. UTC | #1
On Sun, Jun 04, 2023 at 04:28:58PM +0300, Andy Shevchenko 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.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Hi Andy,

is there a tool that you used to verify this change?
Paolo Abeni June 6, 2023, 11:20 a.m. UTC | #2
On Tue, 2023-06-06 at 10:42 +0200, Simon Horman wrote:
> On Sun, Jun 04, 2023 at 04:28:58PM +0300, Andy Shevchenko 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.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Hi Andy,
> 
> is there a tool that you used to verify this change?

I guess build testing it should suffice ;)

/P
patchwork-bot+netdevbpf@kernel.org June 6, 2023, 11:30 a.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

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.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  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!
Andy Shevchenko June 6, 2023, 1:04 p.m. UTC | #4
On Tue, Jun 06, 2023 at 01:20:57PM +0200, Paolo Abeni wrote:
> On Tue, 2023-06-06 at 10:42 +0200, Simon Horman wrote:
> > On Sun, Jun 04, 2023 at 04:28:58PM +0300, Andy Shevchenko 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.

...

> > 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.
diff mbox series

Patch

diff --git a/lib/net_utils.c b/lib/net_utils.c
index c17201df3d08..42bb0473fb22 100644
--- a/lib/net_utils.c
+++ b/lib/net_utils.c
@@ -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)
 {