Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove duplicate includes #22825

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion arch/x86/core/ia32/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <toolchain.h>
#include <cache.h>
#include <stdbool.h>
#include <cache.h>

/*
* these functions are defined in cache_s.S
Expand Down
2 changes: 0 additions & 2 deletions arch/x86/include/ia32/kernel_arch_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@

#ifndef _ASMLANGUAGE

#include <sys/util.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we getting <sys/util.h> pulled in from another header? don't see the duplicate here.


#ifdef __cplusplus
extern "C" {
#endif
Expand Down
1 change: 0 additions & 1 deletion boards/posix/nrf52_bsim/trace_hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdio.h>
#include <init.h>
#include "bs_tracing.h"
#include "posix_board_if.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/bluetooth/hci/userchan.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <stddef.h>
#include <stdlib.h>
#include <poll.h>
#include <errno.h>
#include <sys/socket.h>
#include <string.h>
#include <unistd.h>
Expand Down
2 changes: 0 additions & 2 deletions drivers/dma/dma_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#include <logging/log.h>
LOG_MODULE_REGISTER(dma_stm32, CONFIG_DMA_LOG_LEVEL);

#include <drivers/clock_control/stm32_clock_control.h>

static void dma_stm32_dump_stream_irq(struct device *dev, u32_t id)
{
const struct dma_stm32_config *config = dev->config->config_info;
Expand Down
1 change: 0 additions & 1 deletion drivers/sensor/si7006/si7006.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <sys/__assert.h>
#include <logging/log.h>
#include <drivers/i2c.h>
#include <logging/log.h>
#include <stdio.h>
#include <stdlib.h>
#include "si7006.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/device/usb_dc_mcux_ehci.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <soc.h>
#include <string.h>
#include <drivers/usb/usb_dc.h>
#include <soc.h>
#include <device.h>
#include "usb_dc_mcux.h"
#include "usb_device_ehci.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/wifi/eswifi/eswifi_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ LOG_MODULE_REGISTER(wifi_eswifi_core);
#include <net/ethernet.h>
#include <net_private.h>
#include <net/net_core.h>
#include <net/net_pkt.h>

#include <stdio.h>
#include <stdlib.h>
Expand Down
3 changes: 0 additions & 3 deletions drivers/wifi/winc1500/wifi_winc1500.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ typedef struct {
struct sockaddr_in strRemoteAddr;
} tstrSocketRecvMsg;

#include <driver/include/m2m_wifi.h>
#include <socket/include/m2m_socket_host_if.h>

#if defined(CONFIG_WIFI_WINC1500_REGION_NORTH_AMERICA)
#define WINC1500_REGION NORTH_AMERICA
#elif defined(CONFIG_WIFI_WINC1500_REGION_EUROPE)
Expand Down
1 change: 0 additions & 1 deletion ext/hal/altera/altera_hal/HAL/inc/sys/alt_sys_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/times.h>

extern int ALT_CLOSE (int __fd);
extern int ALT_EXECVE (const char *__path,
Expand Down
1 change: 0 additions & 1 deletion include/drivers/timer/system_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include <stdbool.h>
#include <device.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 0 additions & 1 deletion kernel/compiler_stack_protect.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <toolchain.h> /* compiler specific configurations */

#include <kernel_structs.h>
#include <toolchain.h>
#include <linker/sections.h>
#include <kernel.h>
#include <app_memory/app_memdomain.h>
Expand Down
1 change: 0 additions & 1 deletion soc/arm/xilinx_zynqmp/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#ifndef _ASMLANGUAGE

#include <device.h>
#include <sys/util.h>
stephanosio marked this conversation as resolved.
Show resolved Hide resolved

#endif /* !_ASMLANGUAGE */

Expand Down
1 change: 0 additions & 1 deletion subsys/bluetooth/shell/bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <bluetooth/conn.h>
#include <bluetooth/rfcomm.h>
#include <bluetooth/sdp.h>
#include <bluetooth/hci.h>

#include <shell/shell.h>

Expand Down
1 change: 0 additions & 1 deletion subsys/fs/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <shell/shell.h>
#include <init.h>
#include <fs/fs.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <limits.h>
Expand Down
1 change: 0 additions & 1 deletion subsys/net/ip/net_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ LOG_MODULE_REGISTER(net_shell, LOG_LEVEL_DBG);
#endif

#if defined(CONFIG_NET_L2_PPP)
#include <net/ppp.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, wondering if we should remove the one above, and leave this one with ifdef protection. @jukkar ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, better to remove the one above which is without ifdef protection.

#include "ppp/ppp_internal.h"
#endif

Expand Down
1 change: 0 additions & 1 deletion subsys/net/l2/canbus/6locan.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ LOG_MODULE_REGISTER(net_l2_canbus, CONFIG_NET_L2_CANBUS_LOG_LEVEL);
#include <sys/byteorder.h>
#include <net/ethernet.h>
#include <net/net_ip.h>
#include <string.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using memmove.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the point is that <string.h> is included twice on lines 19 & 22.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't unfold.


#define NET_CAN_WFTMAX 2
#define NET_CAN_ALLOC_TIMEOUT K_MSEC(100)
Expand Down