You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/10 14:31:47 UTC

[incubator-nuttx] 04/04: arch/sim: Remove the unnecessary file guard

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch pr241
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b37d02c13276b2db9f5bf426515de6b585526941
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Feb 10 13:02:39 2020 +0800

    arch/sim: Remove the unnecessary file guard
    
    since the same protection is already done in Makefile
    
    Change-Id: Id95ace08272302a0a50c9e8632753c7b447e7257
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/sim/src/sim/up_ajoystick.c    | 4 ----
 arch/sim/src/sim/up_checkstack.c   | 4 ----
 arch/sim/src/sim/up_cpuidlestack.c | 4 ----
 arch/sim/src/sim/up_ioexpander.c   | 4 ----
 arch/sim/src/sim/up_netdriver.c    | 4 ----
 arch/sim/src/sim/up_qspiflash.c    | 4 ----
 arch/sim/src/sim/up_romgetc.c      | 3 ---
 arch/sim/src/sim/up_schednote.c    | 5 -----
 arch/sim/src/sim/up_smpsignal.c    | 4 ----
 arch/sim/src/sim/up_spiflash.c     | 4 ----
 arch/sim/src/sim/up_tapdev.c       | 4 ----
 arch/sim/src/sim/up_wpcap.c        | 4 ----
 12 files changed, 48 deletions(-)

diff --git a/arch/sim/src/sim/up_ajoystick.c b/arch/sim/src/sim/up_ajoystick.c
index 017c98c..1e17438 100644
--- a/arch/sim/src/sim/up_ajoystick.c
+++ b/arch/sim/src/sim/up_ajoystick.c
@@ -50,8 +50,6 @@
 
 #include "up_internal.h"
 
-#ifdef CONFIG_AJOYSTICK
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
@@ -253,5 +251,3 @@ int up_buttonevent(int x, int y, int buttons)
 
   return OK;
 }
-
-#endif /* CONFIG_AJOYSTICK */
diff --git a/arch/sim/src/sim/up_checkstack.c b/arch/sim/src/sim/up_checkstack.c
index 160d0a4..f8be93f 100644
--- a/arch/sim/src/sim/up_checkstack.c
+++ b/arch/sim/src/sim/up_checkstack.c
@@ -52,8 +52,6 @@
 #include "sched/sched.h"
 #include "up_internal.h"
 
-#ifdef CONFIG_STACK_COLORATION
-
 /****************************************************************************
  * Private Function Prototypes
  ****************************************************************************/
@@ -207,5 +205,3 @@ ssize_t up_check_stack_remain(void)
 {
   return up_check_tcbstack_remain(this_task());
 }
-
-#endif /* CONFIG_STACK_COLORATION */
diff --git a/arch/sim/src/sim/up_cpuidlestack.c b/arch/sim/src/sim/up_cpuidlestack.c
index d7e3746..7179808 100644
--- a/arch/sim/src/sim/up_cpuidlestack.c
+++ b/arch/sim/src/sim/up_cpuidlestack.c
@@ -46,8 +46,6 @@
 
 #include "up_internal.h"
 
-#ifdef CONFIG_SMP
-
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -104,5 +102,3 @@ int up_cpu_idlestack(int cpu, FAR struct tcb_s *tcb, size_t stack_size)
   tcb->adj_stack_ptr   = NULL;
   return OK;
 }
-
-#endif /* CONFIG_SMP */
diff --git a/arch/sim/src/sim/up_ioexpander.c b/arch/sim/src/sim/up_ioexpander.c
index 7f9180b..36e1d4a 100644
--- a/arch/sim/src/sim/up_ioexpander.c
+++ b/arch/sim/src/sim/up_ioexpander.c
@@ -50,8 +50,6 @@
 
 #include "up_internal.h"
 
-#ifdef CONFIG_SIM_IOEXPANDER
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
@@ -861,5 +859,3 @@ FAR struct ioexpander_dev_s *sim_ioexpander_initialize(void)
 
   return &priv->dev;
 }
-
-#endif /* CONFIG_SIM_IOEXPANDER */
diff --git a/arch/sim/src/sim/up_netdriver.c b/arch/sim/src/sim/up_netdriver.c
index b7b9b8d..488f56b 100644
--- a/arch/sim/src/sim/up_netdriver.c
+++ b/arch/sim/src/sim/up_netdriver.c
@@ -44,8 +44,6 @@
 
 #include <nuttx/config.h>
 
-#ifdef CONFIG_NET_ETHERNET
-
 #include <stdint.h>
 #include <stdbool.h>
 #include <string.h>
@@ -377,5 +375,3 @@ int netdriver_setmacaddr(unsigned char *macaddr)
   memcpy(g_sim_dev.d_mac.ether.ether_addr_octet, macaddr, IFHWADDRLEN);
   return 0;
 }
-
-#endif /* CONFIG_NET_ETHERNET */
diff --git a/arch/sim/src/sim/up_qspiflash.c b/arch/sim/src/sim/up_qspiflash.c
index bffc36e..359e3c1 100644
--- a/arch/sim/src/sim/up_qspiflash.c
+++ b/arch/sim/src/sim/up_qspiflash.c
@@ -53,8 +53,6 @@
 
 #include "up_internal.h"
 
-#if defined(CONFIG_SIM_QSPIFLASH)
-
 /************************************************************************************
  * Pre-processor Definitions
  ************************************************************************************/
@@ -602,5 +600,3 @@ FAR struct qspi_dev_s *up_qspiflashinitialize()
   leave_critical_section(flags);
   return (FAR struct qspi_dev_s *)priv;
 }
-
-#endif /* CONFIG_SIM_QSPIFLASH */
diff --git a/arch/sim/src/sim/up_romgetc.c b/arch/sim/src/sim/up_romgetc.c
index 955674d..3e0a759 100644
--- a/arch/sim/src/sim/up_romgetc.c
+++ b/arch/sim/src/sim/up_romgetc.c
@@ -41,8 +41,6 @@
 
 #include <nuttx/arch.h>
 
-#ifdef CONFIG_ARCH_ROMGETC
-
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -86,4 +84,3 @@ char up_romgetc(FAR const char *ptr)
 
   return *ptr;
 }
-#endif
diff --git a/arch/sim/src/sim/up_schednote.c b/arch/sim/src/sim/up_schednote.c
index ece96e9..225eaf9 100644
--- a/arch/sim/src/sim/up_schednote.c
+++ b/arch/sim/src/sim/up_schednote.c
@@ -42,9 +42,6 @@
 #include <syslog.h>
 #include <nuttx/sched.h>
 
-#if defined(CONFIG_SCHED_INSTRUMENTATION) && \
-   !defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER)
-
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -207,5 +204,3 @@ void sched_note_csection(FAR struct tcb_s *tcb, bool enter)
 #endif
 }
 #endif
-
-#endif /* CONFIG_SCHED_INSTRUMENTATION && !CONFIG_SCHED_INSTRUMENTATION_BUFFER */
diff --git a/arch/sim/src/sim/up_smpsignal.c b/arch/sim/src/sim/up_smpsignal.c
index 126269c..a2d953d 100644
--- a/arch/sim/src/sim/up_smpsignal.c
+++ b/arch/sim/src/sim/up_smpsignal.c
@@ -46,8 +46,6 @@
 #include "sched/sched.h"
 #include "up_internal.h"
 
-#ifdef CONFIG_SMP
-
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -177,5 +175,3 @@ void up_cpu_started(void)
   sched_note_start(tcb);
 #endif
 }
-
-#endif /* CONFIG_SMP */
diff --git a/arch/sim/src/sim/up_spiflash.c b/arch/sim/src/sim/up_spiflash.c
index e97e088..1308bc7 100644
--- a/arch/sim/src/sim/up_spiflash.c
+++ b/arch/sim/src/sim/up_spiflash.c
@@ -52,8 +52,6 @@
 
 #include "up_internal.h"
 
-#if defined(CONFIG_SIM_SPIFLASH)
-
 /************************************************************************************
  * Pre-processor Definitions
  ************************************************************************************/
@@ -953,5 +951,3 @@ FAR struct spi_dev_s *up_spiflashinitialize(FAR const char *name)
   leave_critical_section(flags);
   return (FAR struct spi_dev_s *)priv;
 }
-
-#endif /* CONFIG_SIM_SPIFLASH */
diff --git a/arch/sim/src/sim/up_tapdev.c b/arch/sim/src/sim/up_tapdev.c
index fc38d4c..aa9c4a4 100644
--- a/arch/sim/src/sim/up_tapdev.c
+++ b/arch/sim/src/sim/up_tapdev.c
@@ -38,8 +38,6 @@
  *
  ****************************************************************************/
 
-#ifndef __CYGWIN__
-
 /****************************************************************************
  * Included Files
  ****************************************************************************/
@@ -394,5 +392,3 @@ void tapdev_ifdown(void)
     }
 #endif
 }
-
-#endif /* !__CYGWIN__ */
diff --git a/arch/sim/src/sim/up_wpcap.c b/arch/sim/src/sim/up_wpcap.c
index 5c754f4..d430526 100644
--- a/arch/sim/src/sim/up_wpcap.c
+++ b/arch/sim/src/sim/up_wpcap.c
@@ -38,8 +38,6 @@
  *
  ****************************************************************************/
 
-#ifdef __CYGWIN__
-
 /****************************************************************************
  * Included Files
  ****************************************************************************/
@@ -310,5 +308,3 @@ void wpcap_send(unsigned char *buf, unsigned int buflen)
       error_exit("error on send\n");
     }
 }
-
-#endif /* __CYGWIN__ */