[v6,22/50] pcapng: remove unneeded header includes

Message ID 20220202094802.3618978-23-sean.morrissey@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series introduce IWYU |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Sean Morrissey Feb. 2, 2022, 9:47 a.m. UTC
  These header includes have been flagged by the iwyu_tool
and removed.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
---
 lib/pcapng/rte_pcapng.c | 1 -
 lib/pcapng/rte_pcapng.h | 2 --
 2 files changed, 3 deletions(-)
  

Comments

Stephen Hemminger Feb. 2, 2022, 3:56 p.m. UTC | #1
On Wed,  2 Feb 2022 09:47:34 +0000
Sean Morrissey <sean.morrissey@intel.com> wrote:

> These header includes have been flagged by the iwyu_tool
> and removed.
> 
> Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
> ---
>  lib/pcapng/rte_pcapng.c | 1 -
>  lib/pcapng/rte_pcapng.h | 2 --
>  2 files changed, 3 deletions(-)
> 
> diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
> index 03edabe73e..5ae96a5bc9 100644
> --- a/lib/pcapng/rte_pcapng.c
> +++ b/lib/pcapng/rte_pcapng.c
> @@ -8,7 +8,6 @@
>  #include <stdlib.h>
>  #include <string.h>
>  #include <sys/uio.h>
> -#include <sys/utsname.h>
>  #include <time.h>
>  #include <unistd.h>

yes, remove this. It was leftover from earlier code where
utsname was called here in setup.

> diff --git a/lib/pcapng/rte_pcapng.h b/lib/pcapng/rte_pcapng.h
> index 8d3fbb1941..7d2697c647 100644
> --- a/lib/pcapng/rte_pcapng.h
> +++ b/lib/pcapng/rte_pcapng.h
> @@ -26,9 +26,7 @@
>  #include <stdint.h>
>  #include <sys/types.h>
>  #include <rte_compat.h>
> -#include <rte_common.h>
>  #include <rte_mempool.h>
> -#include <rte_ring.h>
>  
>  #ifdef __cplusplus
>  extern "C" {

Yes, these can go.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  

Patch

diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 03edabe73e..5ae96a5bc9 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -8,7 +8,6 @@ 
 #include <stdlib.h>
 #include <string.h>
 #include <sys/uio.h>
-#include <sys/utsname.h>
 #include <time.h>
 #include <unistd.h>
 
diff --git a/lib/pcapng/rte_pcapng.h b/lib/pcapng/rte_pcapng.h
index 8d3fbb1941..7d2697c647 100644
--- a/lib/pcapng/rte_pcapng.h
+++ b/lib/pcapng/rte_pcapng.h
@@ -26,9 +26,7 @@ 
 #include <stdint.h>
 #include <sys/types.h>
 #include <rte_compat.h>
-#include <rte_common.h>
 #include <rte_mempool.h>
-#include <rte_ring.h>
 
 #ifdef __cplusplus
 extern "C" {