From 7a1342f503f5a68f6d7d58fb36b7f7038166d7f6 Mon Sep 17 00:00:00 2001 From: "Alan C. Assis" Date: Sun, 23 Aug 2020 09:01:23 -0300 Subject: [PATCH] Fix coding style and other small issues --- arch/xtensa/include/xtensa/core_macros.h | 2 +- arch/xtensa/src/esp32/Kconfig | 2 +- arch/xtensa/src/esp32/esp32_rng.c | 4 +++- arch/xtensa/src/esp32/hardware/wdev_reg.h | 17 ----------------- 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/arch/xtensa/include/xtensa/core_macros.h b/arch/xtensa/include/xtensa/core_macros.h index 5a8c2ad3657..7c5b16ef3ff 100644 --- a/arch/xtensa/include/xtensa/core_macros.h +++ b/arch/xtensa/include/xtensa/core_macros.h @@ -33,7 +33,7 @@ ****************************************************************************/ #define XTHAL_GET_CCOUNT() ({ int __ccount; \ - __asm__ __volatile__("rsr.ccount %0" : \ + __asm__ __volatile__("rsr.ccount %0":\ "=a"(__ccount)); __ccount; }) #endif /* __ARCH_XTENSA_INCUDE_XTENSA_CORE_H */ diff --git a/arch/xtensa/src/esp32/Kconfig b/arch/xtensa/src/esp32/Kconfig index 786596c5476..eae987ee0f9 100644 --- a/arch/xtensa/src/esp32/Kconfig +++ b/arch/xtensa/src/esp32/Kconfig @@ -88,7 +88,7 @@ config ESP32_RNG bool "Random Number Generator (RNG)" default n depends on EXPERIMENTAL - select ARCH_HAVE_RNG + select ARCH_HAVE_RNG ---help--- ESP32 supports a RNG that passed on Dieharder test suite. diff --git a/arch/xtensa/src/esp32/esp32_rng.c b/arch/xtensa/src/esp32/esp32_rng.c index f0561a17a86..2af27fd6f6e 100644 --- a/arch/xtensa/src/esp32/esp32_rng.c +++ b/arch/xtensa/src/esp32/esp32_rng.c @@ -144,7 +144,9 @@ static int esp32_rng_initialize(void) static bool first_flag = true; if (false == first_flag) - return OK; + { + return OK; + } first_flag = false; diff --git a/arch/xtensa/src/esp32/hardware/wdev_reg.h b/arch/xtensa/src/esp32/hardware/wdev_reg.h index c6539530244..23934161764 100644 --- a/arch/xtensa/src/esp32/hardware/wdev_reg.h +++ b/arch/xtensa/src/esp32/hardware/wdev_reg.h @@ -18,23 +18,6 @@ * ****************************************************************************/ -/**************************************************************************** - * Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ****************************************************************************/ - #ifndef __ARCH_XTENSA_SRC_ESP32_HARDWARE_WDEV_REG_H #define __ARCH_XTENSA_SRC_ESP32_HARDWARE_WDEV_REG_H