Fix Error: chip/s32k1xx_lpspi.c:804:12: error: variable 'best_delay' set but not used [-Werror,-Wunused-but-set-variable]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-11-13 10:03:27 +08:00 committed by Xiang Xiao
parent 2670229cb9
commit e221cf6f5e
3 changed files with 0 additions and 60 deletions

View File

@ -717,7 +717,6 @@ static inline void imxrt_lpspi_master_set_delays(
uint32_t pll_freq;
uint32_t src_freq;
uint64_t real_delay;
uint64_t best_delay;
uint32_t scaler;
uint32_t best_scaler;
uint32_t diff;
@ -773,15 +772,6 @@ static inline void imxrt_lpspi_master_set_delays(
initial_delay_ns *= 2;
initial_delay_ns /= clock_div_prescaler;
/* Calculate the maximum delay */
best_delay = 1000000000U;
/* based on DBT+2, or 255 + 2 */
best_delay *= 257;
best_delay /= clock_div_prescaler;
additional_scaler = 1U;
}
else
@ -795,15 +785,6 @@ static inline void imxrt_lpspi_master_set_delays(
initial_delay_ns = 1000000000U;
initial_delay_ns /= clock_div_prescaler;
/* Calculate the maximum delay */
best_delay = 1000000000U;
/* Based on SCKPCS+1 or PCSSCK+1, or 255 + 1 */
best_delay *= 256;
best_delay /= clock_div_prescaler;
additional_scaler = 0;
}
@ -846,7 +827,6 @@ static inline void imxrt_lpspi_master_set_delays(
min_diff = diff;
best_scaler = scaler;
best_delay = real_delay;
}
}
}

View File

@ -801,7 +801,6 @@ void s32k1xx_lpspi_set_delays(struct s32k1xx_lpspidev_s *priv,
{
uint32_t inclock;
uint64_t real_delay;
uint64_t best_delay;
uint32_t scaler;
uint32_t best_scaler;
uint32_t diff;
@ -840,15 +839,6 @@ void s32k1xx_lpspi_set_delays(struct s32k1xx_lpspidev_s *priv,
initial_delay_ns *= 2;
initial_delay_ns /= clock_div_prescaler;
/* Calculate the maximum delay */
best_delay = 1000000000U;
/* based on DBT+2, or 255 + 2 */
best_delay *= 257;
best_delay /= clock_div_prescaler;
additional_scaler = 1U;
}
else
@ -862,15 +852,6 @@ void s32k1xx_lpspi_set_delays(struct s32k1xx_lpspidev_s *priv,
initial_delay_ns = 1000000000U;
initial_delay_ns /= clock_div_prescaler;
/* Calculate the maximum delay */
best_delay = 1000000000U;
/* Based on SCKPCS+1 or PCSSCK+1, or 255 + 1 */
best_delay *= 256;
best_delay /= clock_div_prescaler;
additional_scaler = 0;
}
@ -913,7 +894,6 @@ void s32k1xx_lpspi_set_delays(struct s32k1xx_lpspidev_s *priv,
min_diff = diff;
best_scaler = scaler;
best_delay = real_delay;
}
}
}

View File

@ -904,7 +904,6 @@ static inline uint32_t
{
uint32_t inclock;
uint64_t real_delay;
uint64_t best_delay;
uint32_t scaler;
uint32_t best_scaler;
uint32_t diff;
@ -943,15 +942,6 @@ static inline uint32_t
initial_delay_ns *= 2;
initial_delay_ns /= clock_div_prescaler;
/* Calculate the maximum delay */
best_delay = 1000000000U;
/* based on DBT+2, or 255 + 2 */
best_delay *= 257;
best_delay /= clock_div_prescaler;
additional_scaler = 1U;
}
else
@ -965,15 +955,6 @@ static inline uint32_t
initial_delay_ns = 1000000000U;
initial_delay_ns /= clock_div_prescaler;
/* Calculate the maximum delay */
best_delay = 1000000000U;
/* Based on SCKPCS+1 or PCSSCK+1, or 255 + 1 */
best_delay *= 256;
best_delay /= clock_div_prescaler;
additional_scaler = 0;
}
@ -1016,7 +997,6 @@ static inline uint32_t
min_diff = diff;
best_scaler = scaler;
best_delay = real_delay;
}
}
}