[v1,18/19] timer: remove unneeded header includes
Checks
Commit Message
These header includes have been flagged by the iwyu_tool
and removed.
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
---
lib/timer/rte_timer.c | 3 ---
lib/timer/rte_timer.h | 2 --
2 files changed, 5 deletions(-)
Comments
On Thu, 21 Apr 2022 19:08:58 +0000
Sean Morrissey <sean.morrissey@intel.com> wrote:
> diff --git a/lib/timer/rte_timer.c b/lib/timer/rte_timer.c
> index c51a393e5c..f52ccc33ed 100644
> --- a/lib/timer/rte_timer.c
> +++ b/lib/timer/rte_timer.c
> @@ -5,12 +5,9 @@
> #include <stdio.h>
> #include <stdint.h>
> #include <stdbool.h>
> -#include <inttypes.h>
> #include <assert.h>
> -#include <sys/queue.h>
>
> #include <rte_common.h>
> -#include <rte_cycles.h>
> #include <rte_eal_memconfig.h>
> #include <rte_memory.h>
> #include <rte_lcore.h>
This doesn't look right.
rte_timer.c relies on rte_get_timer_cycles() which is defined in
rte_cycles.h
Perhaps iwyu is getting confused, or thinking that is already covered
by another include file?
On 21/04/2022 21:08, Stephen Hemminger wrote:
> On Thu, 21 Apr 2022 19:08:58 +0000
> Sean Morrissey <sean.morrissey@intel.com> wrote:
>
>> diff --git a/lib/timer/rte_timer.c b/lib/timer/rte_timer.c
>> index c51a393e5c..f52ccc33ed 100644
>> --- a/lib/timer/rte_timer.c
>> +++ b/lib/timer/rte_timer.c
>> @@ -5,12 +5,9 @@
>> #include <stdio.h>
>> #include <stdint.h>
>> #include <stdbool.h>
>> -#include <inttypes.h>
>> #include <assert.h>
>> -#include <sys/queue.h>
>>
>> #include <rte_common.h>
>> -#include <rte_cycles.h>
>> #include <rte_eal_memconfig.h>
>> #include <rte_memory.h>
>> #include <rte_lcore.h>
> This doesn't look right.
>
> rte_timer.c relies on rte_get_timer_cycles() which is defined in
> rte_cycles.h
>
> Perhaps iwyu is getting confused, or thinking that is already covered
> by another include file?
IWYU can throw false positives.
Please let me fix all build issues with this patchset and get back to
you. It could re-introduce the header in question. If not I will
investigate where IWYU believes the include is coming from.
Typically the headers removed by this tool are usually already included
from a daisy chain of includes from another header.
@@ -5,12 +5,9 @@
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
-#include <inttypes.h>
#include <assert.h>
-#include <sys/queue.h>
#include <rte_common.h>
-#include <rte_cycles.h>
#include <rte_eal_memconfig.h>
#include <rte_memory.h>
#include <rte_lcore.h>
@@ -36,9 +36,7 @@
#include <stdio.h>
#include <stdint.h>
-#include <stddef.h>
#include <rte_common.h>
-#include <rte_config.h>
#include <rte_spinlock.h>
#ifdef __cplusplus