Skip to content

Commit

Permalink
build: fix unused tag string
Browse files Browse the repository at this point in the history
Closes #8250
  • Loading branch information
suda-morris committed Jan 18, 2022
1 parent d089003 commit e51474e
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 24 deletions.
4 changes: 2 additions & 2 deletions components/driver/dac_common.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -19,7 +19,7 @@

extern portMUX_TYPE rtc_spinlock; //TODO: Will be placed in the appropriate position after the rtc module is finished.

static const char *TAG = "DAC";
static __attribute__((unused)) const char *TAG = "DAC";

/*---------------------------------------------------------------
DAC
Expand Down
4 changes: 2 additions & 2 deletions components/driver/esp32/touch_sensor.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -49,7 +49,7 @@ static SemaphoreHandle_t rtc_touch_mux = NULL;
#define TOUCH_PAD_SHIFT_DEFAULT (4) // Increase computing accuracy.
#define TOUCH_PAD_SHIFT_ROUND_DEFAULT (8) // ROUND = 2^(n-1); rounding off for fractional.

static const char *TOUCH_TAG = "TOUCH_SENSOR";
static __attribute__((unused)) const char *TOUCH_TAG = "TOUCH_SENSOR";

#define TOUCH_CHANNEL_CHECK(channel) ESP_RETURN_ON_FALSE(channel < SOC_TOUCH_SENSOR_NUM, ESP_ERR_INVALID_ARG, TOUCH_TAG, "Touch channel error");
#define TOUCH_NULL_POINTER_CHECK(p, name) ESP_RETURN_ON_FALSE((p), ESP_ERR_INVALID_ARG, TOUCH_TAG, "input param '"name"' is NULL")
Expand Down
4 changes: 2 additions & 2 deletions components/driver/esp32s2/dac.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -18,7 +18,7 @@
#include "soc/dac_periph.h"
#include "hal/dac_hal.h"

static const char *TAG = "DAC";
static __attribute__((unused)) const char *TAG = "DAC";

extern portMUX_TYPE rtc_spinlock; //TODO: Will be placed in the appropriate position after the rtc module is finished.
#define DAC_ENTER_CRITICAL() portENTER_CRITICAL(&rtc_spinlock)
Expand Down
4 changes: 2 additions & 2 deletions components/driver/esp32s2/touch_sensor.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -36,7 +36,7 @@
#define TOUCH_PAD_SHIFT_ROUND_DEFAULT (8) // ROUND = 2^(n-1); rounding off for fractional.
#define TOUCH_PAD_MEASURE_WAIT_DEFAULT (0xFF) // The timer frequency is 8Mhz, the max value is 0xff

static const char *TOUCH_TAG = "TOUCH_SENSOR";
static __attribute__((unused)) const char *TOUCH_TAG = "TOUCH_SENSOR";

#define TOUCH_CHANNEL_CHECK(channel) do { \
ESP_RETURN_ON_FALSE(channel < SOC_TOUCH_SENSOR_NUM && channel >= 0, ESP_ERR_INVALID_ARG, TOUCH_TAG, "Touch channel error"); \
Expand Down
4 changes: 2 additions & 2 deletions components/driver/esp32s3/touch_sensor.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -36,7 +36,7 @@
#define TOUCH_PAD_SHIFT_ROUND_DEFAULT (8) // ROUND = 2^(n-1); rounding off for fractional.
#define TOUCH_PAD_MEASURE_WAIT_DEFAULT (0xFF) // The timer frequency is 8Mhz, the max value is 0xff

static const char *TOUCH_TAG = "TOUCH_SENSOR";
static __attribute__((unused)) const char *TOUCH_TAG = "TOUCH_SENSOR";

#define TOUCH_CHANNEL_CHECK(channel) do { \
ESP_RETURN_ON_FALSE(channel < SOC_TOUCH_SENSOR_NUM && channel >= 0, ESP_ERR_INVALID_ARG, TOUCH_TAG, "Touch channel error"); \
Expand Down
8 changes: 4 additions & 4 deletions components/driver/ledc.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "soc/clk_ctrl_os.h"
#include "esp_private/periph_ctrl.h"

static const char *LEDC_TAG = "ledc";
static __attribute__((unused)) const char *LEDC_TAG = "ledc";

#define LEDC_CHECK(a, str, ret_val) ESP_RETURN_ON_FALSE(a, ret_val, LEDC_TAG, "%s", str)
#define LEDC_ARG_CHECK(a, param) ESP_RETURN_ON_FALSE(a, ESP_ERR_INVALID_ARG, LEDC_TAG, param " argument is invalid")
Expand Down Expand Up @@ -66,9 +66,9 @@ static portMUX_TYPE ledc_spinlock = portMUX_INITIALIZER_UNLOCKED;
#define DIM(array) (sizeof(array)/sizeof(*array))
#define LEDC_IS_DIV_INVALID(div) ((div) <= LEDC_LL_FRACTIONAL_MAX || (div) > LEDC_TIMER_DIV_NUM_MAX)

static const char *LEDC_NOT_INIT = "LEDC is not initialized";
static const char *LEDC_FADE_SERVICE_ERR_STR = "LEDC fade service not installed";
static const char *LEDC_FADE_INIT_ERROR_STR = "LEDC fade channel init error, not enough memory or service not installed";
static __attribute__((unused)) const char *LEDC_NOT_INIT = "LEDC is not initialized";
static __attribute__((unused)) const char *LEDC_FADE_SERVICE_ERR_STR = "LEDC fade service not installed";
static __attribute__((unused)) const char *LEDC_FADE_INIT_ERROR_STR = "LEDC fade channel init error, not enough memory or service not installed";

//This value will be calibrated when in use.
static uint32_t s_ledc_slow_clk_8M = 0;
Expand Down
2 changes: 1 addition & 1 deletion components/driver/test_apps/gptimer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(gptimer_test)

if(CONFIG_GPTIMER_ISR_IRAM_SAFE)
if(CONFIG_COMPILER_DUMP_RTL_FILES)
add_custom_target(check_test_app_sections ALL
COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py
--rtl-dir ${CMAKE_BINARY_DIR}/esp-idf/driver/
Expand Down
4 changes: 2 additions & 2 deletions components/driver/test_apps/gptimer/sdkconfig.ci.iram_safe
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CONFIG_COMPILER_DUMP_RTL_FILES=y
CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM=y
CONFIG_GPTIMER_ISR_IRAM_SAFE=y
# disable log as most of log access rodata string on error, causing RTL check failure
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
# silent the error check, as the error string are stored in rodata, causing RTL check failure
CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y
4 changes: 2 additions & 2 deletions components/esp_adc_cal/esp_adc_cal_common.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -14,7 +14,7 @@
#include "hal/adc_types.h"
#include "esp_adc_cal.h"

const static char *TAG = "ADC_CALI";
const __attribute__((unused)) static char *TAG = "ADC_CALI";

esp_err_t esp_adc_cal_get_voltage(adc_channel_t channel,
const esp_adc_cal_characteristics_t *chars,
Expand Down
4 changes: 3 additions & 1 deletion components/esp_hw_support/esp_async_memcpy.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -88,6 +88,8 @@ esp_err_t esp_async_memcpy_install(const async_memcpy_config_t *config, async_me
ret = async_memcpy_impl_init(&mcp_hdl->mcp_impl);
ESP_GOTO_ON_ERROR(ret, err, TAG, "DMA M2M init failed");

ESP_LOGD(TAG, "installed memory to memory copy channel at %p", mcp_hdl);

*asmcp = mcp_hdl;

async_memcpy_impl_start(&mcp_hdl->mcp_impl, (intptr_t)&mcp_hdl->out_streams[0].desc, (intptr_t)&mcp_hdl->in_streams[0].desc);
Expand Down
4 changes: 2 additions & 2 deletions components/esp_lcd/src/esp_lcd_panel_io.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -8,7 +8,7 @@
#include "esp_lcd_panel_io.h"
#include "esp_lcd_panel_io_interface.h"

static const char *TAG = "lcd_panel.io";
static __attribute__((unused)) const char *TAG = "lcd_panel.io";

esp_err_t esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, const void *param, size_t param_size)
{
Expand Down
4 changes: 2 additions & 2 deletions components/esp_lcd/src/esp_lcd_panel_ops.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -8,7 +8,7 @@
#include "esp_lcd_panel_ops.h"
#include "esp_lcd_panel_interface.h"

static const char *TAG = "lcd_panel";
static __attribute__((unused)) const char *TAG = "lcd_panel";

esp_err_t esp_lcd_panel_reset(esp_lcd_panel_handle_t panel)
{
Expand Down

0 comments on commit e51474e

Please sign in to comment.