Skip to content

Commit

Permalink
all: Removes unnecessary newline character in logs
Browse files Browse the repository at this point in the history
Closes #11465
  • Loading branch information
KonstantinKondrashov committed Jun 8, 2023
1 parent f875978 commit e720616
Show file tree
Hide file tree
Showing 145 changed files with 754 additions and 763 deletions.
4 changes: 2 additions & 2 deletions components/app_trace/sys_view/esp/SEGGER_RTT_esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ void SEGGER_RTT_ESP_FlushNoLock(unsigned long min_sz, unsigned long tmo)
if (s_events_buf_filled > 0) {
res = esp_apptrace_write(ESP_APPTRACE_DEST_SYSVIEW, s_events_buf, s_events_buf_filled, tmo);
if (res != ESP_OK) {
ESP_LOGE(TAG, "Failed to flush buffered events (%d)!\n", res);
ESP_LOGE(TAG, "Failed to flush buffered events (%d)!", res);
}
}
// flush even if we failed to write buffered events, because no new events will be sent after STOP
res = esp_apptrace_flush_nolock(ESP_APPTRACE_DEST_SYSVIEW, min_sz, tmo);
if (res != ESP_OK) {
ESP_LOGE(TAG, "Failed to flush apptrace data (%d)!\n", res);
ESP_LOGE(TAG, "Failed to flush apptrace data (%d)!", res);
}
s_events_buf_filled = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void wdt_reset_info_dump(int cpu)
lsaddr = REG_READ(ASSIST_DEBUG_CORE_1_RCD_PDEBUGLS0ADDR_REG);
lsdata = REG_READ(ASSIST_DEBUG_CORE_1_RCD_PDEBUGLS0DATA_REG);
#else
ESP_LOGE(TAG, "WDT reset info: %s CPU not support!\n", cpu_name);
ESP_LOGE(TAG, "WDT reset info: %s CPU not support!", cpu_name);
return;
#endif
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -41,7 +41,7 @@ esp_err_t verify_rsa_signature_block(const ets_secure_boot_signature_t *sig_bloc
mbedtls_ctr_drbg_init(&ctr_drbg);
ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, NULL, 0);
if (ret != 0) {
ESP_LOGE(TAG, "mbedtls_ctr_drbg_seed returned -0x%04x\n", ret);
ESP_LOGE(TAG, "mbedtls_ctr_drbg_seed returned -0x%04x", ret);
goto exit_outer;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void esp_blufi_gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *a
char buf[BLE_UUID_STR_LEN];
switch (ctxt->op) {
case BLE_GATT_REGISTER_OP_SVC:
ESP_LOGI(TAG, "registered service %s with handle=%d\n",
ESP_LOGI(TAG, "registered service %s with handle=%d",
ble_uuid_to_str(ctxt->svc.svc_def->uuid, buf),
ctxt->svc.handle);
break;
Expand All @@ -96,7 +96,7 @@ void esp_blufi_gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *a
break;

case BLE_GATT_REGISTER_OP_DSC:
ESP_LOGI(TAG, "registering descriptor %s with handle=%d\n",
ESP_LOGI(TAG, "registering descriptor %s with handle=%d",
ble_uuid_to_str(ctxt->dsc.dsc_def->uuid, buf),
ctxt->dsc.handle);
break;
Expand Down Expand Up @@ -245,7 +245,7 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
switch (event->type) {
case BLE_GAP_EVENT_CONNECT:
/* A new connection was established or a connection attempt failed. */
ESP_LOGI(TAG, "connection %s; status=%d\n",
ESP_LOGI(TAG, "connection %s; status=%d",
event->connect.status == 0 ? "established" : "failed",
event->connect.status);
if (event->connect.status == 0) {
Expand Down Expand Up @@ -273,7 +273,7 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
}
return 0;
case BLE_GAP_EVENT_DISCONNECT:
ESP_LOGI(TAG, "disconnect; reason=%d\n", event->disconnect.reason);
ESP_LOGI(TAG, "disconnect; reason=%d", event->disconnect.reason);
memcpy(blufi_env.remote_bda, event->disconnect.conn.peer_id_addr.val, ESP_BLUFI_BD_ADDR_LEN);
blufi_env.is_connected = false;
blufi_env.recv_seq = blufi_env.send_seq = 0;
Expand All @@ -297,7 +297,7 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
return 0;
case BLE_GAP_EVENT_CONN_UPDATE:
/* The central has updated the connection parameters. */
ESP_LOGI(TAG, "connection updated; status=%d\n",
ESP_LOGI(TAG, "connection updated; status=%d",
event->conn_update.status);
return 0;

Expand All @@ -320,7 +320,7 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
return 0;

case BLE_GAP_EVENT_MTU:
ESP_LOGI(TAG, "mtu update event; conn_handle=%d cid=%d mtu=%d\n",
ESP_LOGI(TAG, "mtu update event; conn_handle=%d cid=%d mtu=%d",
event->mtu.conn_handle,
event->mtu.channel_id,
event->mtu.value);
Expand Down Expand Up @@ -390,7 +390,7 @@ void esp_blufi_adv_start(void)
fields.uuids16_is_complete = 1;
rc = ble_gap_adv_set_fields(&fields);
if (rc != 0) {
ESP_LOGE(TAG, "error setting advertisement data; rc=%d\n", rc);
ESP_LOGE(TAG, "error setting advertisement data; rc=%d", rc);
return;
}

Expand All @@ -401,7 +401,7 @@ void esp_blufi_adv_start(void)
rc = ble_gap_adv_start(own_addr_type, NULL, BLE_HS_FOREVER,
&adv_params, esp_blufi_gap_event, NULL);
if (rc != 0) {
ESP_LOGE(TAG, "error enabling advertisement; rc=%d\n", rc);
ESP_LOGE(TAG, "error enabling advertisement; rc=%d", rc);
return;
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/bt/controller/esp32c2/bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
}
esp_err_t err = esp_timer_start_once(s_ble_sleep_timer, us_to_sleep - BTDM_MIN_TIMER_UNCERTAINTY_US);
if (err != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ESP timer start failed\n");
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ESP timer start failed");
return;
}
}
Expand Down Expand Up @@ -501,7 +501,7 @@ esp_err_t controller_sleep_init(void)
{
esp_err_t rc = 0;
#ifdef CONFIG_BT_LE_SLEEP_ENABLE
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled\n");
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled");
r_ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0, 500 + BLE_RTC_DELAY_US);

#ifdef CONFIG_PM_ENABLE
Expand Down
2 changes: 1 addition & 1 deletion components/bt/controller/esp32c3/bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ static void *malloc_internal_wrapper(size_t size)
static int IRAM_ATTR read_mac_wrapper(uint8_t mac[6])
{
int ret = esp_read_mac(mac, ESP_MAC_BT);
ESP_LOGI(BT_LOG_TAG, "Bluetooth MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
ESP_LOGI(BT_LOG_TAG, "Bluetooth MAC: %02x:%02x:%02x:%02x:%02x:%02x",
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);

return ret;
Expand Down
4 changes: 2 additions & 2 deletions components/bt/controller/esp32c6/bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
esp_err_t err = esp_timer_start_once(s_ble_sleep_timer,
us_to_sleep - BTDM_MIN_TIMER_UNCERTAINTY_US);
if (err != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ESP timer start failed\n");
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ESP timer start failed");
return;
}
}
Expand Down Expand Up @@ -495,7 +495,7 @@ esp_err_t controller_sleep_init(void)
esp_err_t rc = 0;

#ifdef CONFIG_BT_LE_SLEEP_ENABLE
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled\n");
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled");
ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
500 + BLE_RTC_DELAY_US);

Expand Down
4 changes: 2 additions & 2 deletions components/bt/controller/esp32h2/bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
esp_err_t err = esp_timer_start_once(s_ble_sleep_timer,
us_to_sleep - BTDM_MIN_TIMER_UNCERTAINTY_US);
if (err != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ESP timer start failed\n");
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ESP timer start failed");
return;
}
}
Expand Down Expand Up @@ -495,7 +495,7 @@ esp_err_t controller_sleep_init(void)
esp_err_t rc = 0;

#ifdef CONFIG_BT_LE_SLEEP_ENABLE
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled\n");
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled");
ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
500 + BLE_RTC_DELAY_US);

Expand Down
2 changes: 1 addition & 1 deletion components/bt/host/nimble/esp-hci/src/esp_nimble_hci.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static void ble_hci_rx_acl(uint8_t *data, uint16_t len)
m = ble_transport_alloc_acl_from_ll();

if (!m) {
ESP_LOGD(TAG,"Failed to allocate buffer, retrying \n");
ESP_LOGD(TAG,"Failed to allocate buffer, retrying ");
/* Give some time to free buffer and try again */
vTaskDelay(1);
}
Expand Down
8 changes: 4 additions & 4 deletions components/cxx/test_apps/general/main/test_cxx_general.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ class SlowInit
{
public:
SlowInit(int arg) {
ESP_LOGD(TAG, "init obj=%d start, arg=%d\n", obj, arg);
ESP_LOGD(TAG, "init obj=%d start, arg=%d", obj, arg);
vTaskDelay(300/portTICK_PERIOD_MS);
TEST_ASSERT_EQUAL(-1, mInitBy);
TEST_ASSERT_EQUAL(0, mInitCount);
mInitBy = arg;
++mInitCount;
ESP_LOGD(TAG, "init obj=%d done\n", obj);
ESP_LOGD(TAG, "init obj=%d done", obj);
}

static void task(void* arg) {
int taskId = reinterpret_cast<int>(arg);
ESP_LOGD(TAG, "obj=%d before static init, task=%d\n", obj, taskId);
ESP_LOGD(TAG, "obj=%d before static init, task=%d", obj, taskId);
static SlowInit slowinit(taskId);
ESP_LOGD(TAG, "obj=%d after static init, task=%d\n", obj, taskId);
ESP_LOGD(TAG, "obj=%d after static init, task=%d", obj, taskId);
xSemaphoreGive(s_slow_init_sem);
vTaskDelete(NULL);
}
Expand Down
2 changes: 1 addition & 1 deletion components/driver/dac/dac_continuous.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static esp_err_t s_dac_alloc_dma_desc(dac_continuous_handle_t handle)
/* Allocate DMA descriptor */
handle->desc[cnt] = &descs[cnt];
ESP_GOTO_ON_FALSE(handle->desc[cnt], ESP_ERR_NO_MEM, err, TAG, "failed to allocate dma descriptor");
ESP_LOGD(TAG, "desc[%d] %p\n", cnt, handle->desc[cnt]);
ESP_LOGD(TAG, "desc[%d] %p", cnt, handle->desc[cnt]);
/* Allocate DMA buffer */
handle->bufs[cnt] = (uint8_t *) heap_caps_calloc(1, handle->cfg.buf_size, DAC_DMA_ALLOC_CAPS);
ESP_GOTO_ON_FALSE(handle->bufs[cnt], ESP_ERR_NO_MEM, err, TAG, "failed to allocate dma buffer");
Expand Down
2 changes: 1 addition & 1 deletion components/driver/deprecated/adc_i2s_deprecated.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static __attribute__((unused)) const char *ADC_TAG = "ADC";

#define ADC_CHECK_RET(fun_ret) ({ \
if (fun_ret != ESP_OK) { \
ESP_LOGE(ADC_TAG,"%s:%d\n",__FUNCTION__,__LINE__); \
ESP_LOGE(ADC_TAG,"%s:%d",__FUNCTION__,__LINE__); \
return ESP_FAIL; \
} \
})
Expand Down
4 changes: 2 additions & 2 deletions components/driver/ledc/ledc.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ static inline uint32_t ledc_auto_global_clk_divisor(int freq_hz, uint32_t precis
/* Before calculating the divisor, we need to have the RC_FAST frequency.
* If it hasn't been measured yet, try calibrating it now. */
if (s_glb_clks[i] == LEDC_SLOW_CLK_RC_FAST && s_ledc_slow_clk_rc_fast_freq == 0 && !ledc_slow_clk_calibrate()) {
ESP_LOGD(LEDC_TAG, "Unable to retrieve RC_FAST clock frequency, skipping it\n");
ESP_LOGD(LEDC_TAG, "Unable to retrieve RC_FAST clock frequency, skipping it");
continue;
}

Expand Down Expand Up @@ -1069,7 +1069,7 @@ static esp_err_t _ledc_set_fade_with_step(ledc_mode_t speed_mode, ledc_channel_t
portENTER_CRITICAL(&ledc_spinlock);
ledc_duty_config(speed_mode, channel, LEDC_VAL_NO_CHANGE, duty_cur, dir, step_num, cycle_num, scale);
portEXIT_CRITICAL(&ledc_spinlock);
ESP_LOGD(LEDC_TAG, "cur duty: %"PRIu32"; target: %"PRIu32", step: %d, cycle: %d; scale: %d; dir: %d\n",
ESP_LOGD(LEDC_TAG, "cur duty: %"PRIu32"; target: %"PRIu32", step: %d, cycle: %d; scale: %d; dir: %d",
duty_cur, target_duty, step_num, cycle_num, scale, dir);
} else {
portENTER_CRITICAL(&ledc_spinlock);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static void test_i2s_tdm_master(uint32_t sample_rate, i2s_data_bit_width_t bit_w
is_start = true;
}
} else if (is_start) {
ESP_LOGE(TAG, "Failed at index: %d real: %"PRIu32" expect: %"PRIu32"\n", i, rx_buffer[i], count);
ESP_LOGE(TAG, "Failed at index: %d real: %" PRIu32 " expect: %" PRIu32, i, rx_buffer[i], count);
is_start = false;
count = 1;
fail_cnt++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,23 @@ TEST_CASE("Legacy ADC oneshot high/low test", "[legacy_adc_oneshot]")

test_adc_set_io_level(ADC_UNIT_1, (adc1_channel_t)ADC1_TEST_CHAN0, 0);
adc_raw = adc1_get_raw(ADC1_TEST_CHAN0);
ESP_LOGI(TAG, "ADC%d Channel %d raw: %d\n", ADC_UNIT_1, ADC1_TEST_CHAN0, adc_raw);
ESP_LOGI(TAG, "ADC%d Channel %d raw: %d", ADC_UNIT_1, ADC1_TEST_CHAN0, adc_raw);
TEST_ASSERT_INT_WITHIN(ADC_TEST_LOW_THRESH, ADC_TEST_LOW_VAL, adc_raw);

test_adc_set_io_level(ADC_UNIT_1, (adc1_channel_t)ADC1_TEST_CHAN0, 1);
adc_raw = adc1_get_raw(ADC1_TEST_CHAN0);
ESP_LOGI(TAG, "ADC%d Channel %d raw: %d\n", ADC_UNIT_1, ADC1_TEST_CHAN0, adc_raw);
ESP_LOGI(TAG, "ADC%d Channel %d raw: %d", ADC_UNIT_1, ADC1_TEST_CHAN0, adc_raw);
TEST_ASSERT_INT_WITHIN(ADC_TEST_HIGH_THRESH, ADC_TEST_HIGH_VAL, adc_raw);

#if ADC_TEST_ADC2
test_adc_set_io_level(ADC_UNIT_2, (adc2_channel_t)ADC2_TEST_CHAN0, 0);
TEST_ESP_OK(adc2_get_raw(ADC2_TEST_CHAN0, ADC_WIDTH_BIT_DEFAULT, &adc_raw));
ESP_LOGI(TAG, "ADC%d Channel %d raw: %d\n", ADC_UNIT_2, ADC2_TEST_CHAN0, adc_raw);
ESP_LOGI(TAG, "ADC%d Channel %d raw: %d", ADC_UNIT_2, ADC2_TEST_CHAN0, adc_raw);
TEST_ASSERT_INT_WITHIN(ADC_TEST_LOW_THRESH, ADC_TEST_LOW_VAL, adc_raw);

test_adc_set_io_level(ADC_UNIT_2, (adc2_channel_t)ADC2_TEST_CHAN0, 1);
TEST_ESP_OK(adc2_get_raw(ADC2_TEST_CHAN0, ADC_WIDTH_BIT_DEFAULT, &adc_raw));
ESP_LOGI(TAG, "ADC%d Channel %d raw: %d\n", ADC_UNIT_2, ADC2_TEST_CHAN0, adc_raw);
ESP_LOGI(TAG, "ADC%d Channel %d raw: %d", ADC_UNIT_2, ADC2_TEST_CHAN0, adc_raw);
TEST_ASSERT_INT_WITHIN(ADC_TEST_HIGH_THRESH, ADC_TEST_HIGH_VAL, adc_raw);
#endif
}
6 changes: 3 additions & 3 deletions components/driver/test_apps/sdio/main/test_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ static void init_essl(essl_handle_t *out_handle, const sdio_test_config_t *conf)

switch (conf->sdio_mode) {
case SDIO_4BIT:
ESP_LOGI(MASTER_TAG, "Probe using SD 4-bit...\n");
ESP_LOGI(MASTER_TAG, "Probe using SD 4-bit...");
config = (sdmmc_host_t)SDMMC_HOST_DEFAULT();
config.flags = SDMMC_HOST_FLAG_4BIT;
config.max_freq_khz = conf->freq;
init_sdmmc_host();
break;
case SDIO_1BIT:
ESP_LOGI(MASTER_TAG, "Probe using SD 1-bit...\n");
ESP_LOGI(MASTER_TAG, "Probe using SD 1-bit...");
config = (sdmmc_host_t)SDMMC_HOST_DEFAULT();
config.flags = SDMMC_HOST_FLAG_1BIT;
config.max_freq_khz = conf->freq;
Expand Down Expand Up @@ -199,7 +199,7 @@ static void init_essl(essl_handle_t *out_handle, const sdio_test_config_t *conf)
err = sdspi_host_init_device(&device_config, &sdspi_handle);
TEST_ESP_OK(err);

ESP_LOGI(MASTER_TAG, "Probe using SPI...\n");
ESP_LOGI(MASTER_TAG, "Probe using SPI...");

config = (sdmmc_host_t)SDSPI_HOST_DEFAULT();
config.slot = sdspi_handle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void test_wrdma(testhd_context_t* ctx, const spitest_param_set_t *cfg, spi_devic
if (pos+len > TEST_DMA_MAX_SIZE) len = TEST_DMA_MAX_SIZE - pos;

int test_seg_size = len;//TEST_SEG_SIZE;
ESP_LOGW("test_wrdma", "len: %d, seg_size: %d\n", len, test_seg_size);
ESP_LOGW("test_wrdma", "len: %d, seg_size: %d", len, test_seg_size);
TEST_ESP_OK(essl_spi_wrdma(spi, &ctx->master_wrdma_buf[pos], len, test_seg_size, get_hd_flags()));

spi_slave_hd_data_t* ret_trans;
Expand Down Expand Up @@ -284,7 +284,7 @@ void test_rddma(testhd_context_t* ctx, const spitest_param_set_t* cfg, spi_devic
len = ctx->tx_data.len;
test_seg_size = TEST_SEG_SIZE;

ESP_LOGW("test_rddma", "pos: %d, len: %d, slave_tx: %d, seg_size: %d\n", data_expected - ctx->slave_rddma_buf, len, ctx->tx_data.len, test_seg_size);
ESP_LOGW("test_rddma", "pos: %d, len: %d, slave_tx: %d, seg_size: %d", data_expected - ctx->slave_rddma_buf, len, ctx->tx_data.len, test_seg_size);

TEST_ESP_OK(essl_spi_rddma(spi, ctx->master_rddma_buf, len, test_seg_size, get_hd_flags()));

Expand Down
Loading

0 comments on commit e720616

Please sign in to comment.