From 4d4193dcefa20c183a5269da10afb4d0c73a2c68 Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Fri, 18 Nov 2022 15:09:05 +0100 Subject: [PATCH] src/soc/mediatek: Remove unnecessary space after casts Change-Id: I871579cc434820294f285298fe43da4cd1da27a3 Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/69809 Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) --- src/soc/mediatek/mt8183/dramc_pi_calibration_api.c | 10 +++++----- src/soc/mediatek/mt8183/spm.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c index ec39049a8a..c7728853a1 100644 --- a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c +++ b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c @@ -985,14 +985,14 @@ static bool dramc_find_gating_window(u32 result_r, u32 result_f, u32 *debug_cnt, u16 debug_cnt_perbyte, current_pass = 0, pass_byte_cnt = 0; for (u8 dqs = 0; dqs < DQS_NUMBER; dqs++) { - u8 dqs_result_r = (u8) ((result_r >> (8 * dqs)) & 0xff); - u8 dqs_result_f = (u8) ((result_f >> (8 * dqs)) & 0xff); + u8 dqs_result_r = (u8)((result_r >> (8 * dqs)) & 0xff); + u8 dqs_result_f = (u8)((result_f >> (8 * dqs)) & 0xff); if (pass_byte_cnt & (1 << dqs)) continue; current_pass = 0; - debug_cnt_perbyte = (u16) debug_cnt[dqs]; + debug_cnt_perbyte = (u16)debug_cnt[dqs]; if (dqs_result_r == 0 && dqs_result_f == 0 && debug_cnt_perbyte == GATING_GOLDEND_DQSCNT) current_pass = 1; @@ -2135,7 +2135,7 @@ static void dramc_window_perbit_cal_partial(u8 chn, u8 rank, dramc_dbg("%d ", dly); for (size_t bit = 0; bit < DQ_DATA_WIDTH; bit++) { - bool bit_fail = (err_value & ((u32) 1 << bit)) != 0; + bool bit_fail = (err_value & ((u32)1 << bit)) != 0; /* pass window bigger than 7, * consider as real pass window. @@ -2401,7 +2401,7 @@ static u8 dramc_rx_datlat_cal(u8 chn, u8 rank, u8 freq_group, SET32_BITFIELDS(&ch[chn].ao.padctrl, PADCTRL_DQIENQKEND, 1, PADCTRL_DQIENLATEBEGIN, 1); - return (u8) best_step; + return (u8)best_step; } static void dramc_dual_rank_rx_datlat_cal(u8 chn, u8 freq_group, u8 datlat0, u8 datlat1) diff --git a/src/soc/mediatek/mt8183/spm.c b/src/soc/mediatek/mt8183/spm.c index 5fba84de65..83e814fa87 100644 --- a/src/soc/mediatek/mt8183/spm.c +++ b/src/soc/mediatek/mt8183/spm.c @@ -156,7 +156,7 @@ static void spm_load_pcm_code(const struct dyna_load_pcm *pcm) write32(&mtk_spm->pcm_im_host_rw_ptr, PCM_IM_HOST_EN_LSB | PCM_IM_HOST_W_EN_LSB | i); write32(&mtk_spm->pcm_im_host_rw_dat, - (u32) *(pcm->buf + i)); + (u32)*(pcm->buf + i)); } write32(&mtk_spm->pcm_im_host_rw_ptr, 0); } @@ -168,7 +168,7 @@ static void spm_check_pcm_code(const struct dyna_load_pcm *pcm) for (i = 0; i < pcm->desc.size; i++) { write32(&mtk_spm->pcm_im_host_rw_ptr, PCM_IM_HOST_EN_LSB | i); if ((read32(&mtk_spm->pcm_im_host_rw_dat)) != - (u32) *(pcm->buf + i)) + (u32)*(pcm->buf + i)) spm_load_pcm_code(pcm); } write32(&mtk_spm->pcm_im_host_rw_ptr, 0);