@@ -76,11 +76,13 @@ static int32_t exp_fixed(int32_t x)
7676 int i ;
7777 int n = 0 ;
7878
79- if (x < Q_CONVERT_FLOAT (-11.5 , 27 ))
79+ if (x < Q_CONVERT_FLOAT (-11.5 , 27 )) {
8080 return 0 ;
81+ }
8182
82- if (x > Q_CONVERT_FLOAT (7.6245 , 27 ))
83+ if (x > Q_CONVERT_FLOAT (7.6245 , 27 )) {
8384 return INT32_MAX ;
85+ }
8486
8587 /* x is Q5.27 */
8688 xs = x ;
@@ -94,8 +96,9 @@ static int32_t exp_fixed(int32_t x)
9496 */
9597 z = Q_SHIFT_RND (exp_small_fixed (Q_SHIFT_LEFT (xs , 27 , 29 )), 23 , 20 );
9698 y = ONE_Q20 ;
97- for (i = 0 ; i < (1 << n ); i ++ )
99+ for (i = 0 ; i < (1 << n ); i ++ ) {
98100 y = (int32_t )Q_MULTSR_32X32 ((int64_t )y , z , 20 , 20 , 20 );
101+ }
99102
100103 return y ;
101104}
@@ -104,8 +107,9 @@ static int32_t db2lin_fixed(int32_t db)
104107{
105108 int32_t arg ;
106109
107- if (db < Q_CONVERT_FLOAT (-100.0 , 24 ))
110+ if (db < Q_CONVERT_FLOAT (-100.0 , 24 )) {
108111 return 0 ;
112+ }
109113
110114 /* Q8.24 x Q5.27, result needs to be Q5.27 */
111115 arg = (int32_t )Q_MULTSR_32X32 ((int64_t )db , LOG10_DIV20_Q27 , 24 , 27 , 27 );
@@ -383,8 +387,9 @@ static int dai_dmic_remove(struct dai_intel_dmic *dmic)
383387 * Note: dai_put() function that calls remove() applies the spinlock
384388 * so it is not needed here to protect access to mask bits.
385389 */
386- if (active_fifos_mask || pause_mask )
390+ if (active_fifos_mask || pause_mask ) {
387391 return 0 ;
392+ }
388393
389394 /* Disable DMIC clock and power */
390395 dai_dmic_en_clk_gating (dmic );
@@ -442,8 +447,9 @@ static int dai_timestamp_dmic_get(const struct device *dev, struct dai_ts_cfg *c
442447
443448 /* Read SSP timestamp registers */
444449 ntk = sys_read32 (tsctrl ) & TS_LOCAL_TSCTRL_NTK ;
445- if (!ntk )
450+ if (!ntk ) {
446451 goto out ;
452+ }
447453
448454 /* NTK was set, get wall clock */
449455 tsd -> walclk = sys_read64 (TS_DMIC_LOCAL_WALCLK );
@@ -456,8 +462,9 @@ static int dai_timestamp_dmic_get(const struct device *dev, struct dai_ts_cfg *c
456462
457463out :
458464 tsd -> walclk_rate = cfg -> walclk_rate ;
459- if (!ntk )
465+ if (!ntk ) {
460466 return - ENODATA ;
467+ }
461468
462469 return 0 ;
463470}
@@ -484,8 +491,9 @@ static void dai_dmic_gain_ramp(struct dai_intel_dmic *dmic)
484491 * task associated with each DAI, so we don't need to hold the lock to
485492 * read the value here.
486493 */
487- if (dmic -> gain == DMIC_HW_FIR_GAIN_MAX << 11 )
494+ if (dmic -> gain == DMIC_HW_FIR_GAIN_MAX << 11 ) {
488495 return ;
496+ }
489497
490498 key = k_spin_lock (& dmic -> lock );
491499
@@ -659,10 +667,11 @@ static void dai_dmic_stop(struct dai_intel_dmic *dmic, bool stop_is_pause)
659667 * If stop is not for pausing, it is safe to clear the pause bit.
660668 */
661669 dai_dmic_global .active_fifos_mask &= ~BIT (dmic -> dai_config_params .dai_index );
662- if (stop_is_pause )
670+ if (stop_is_pause ) {
663671 dai_dmic_global .pause_mask |= BIT (dmic -> dai_config_params .dai_index );
664- else
672+ } else {
665673 dai_dmic_global .pause_mask &= ~BIT (dmic -> dai_config_params .dai_index );
674+ }
666675
667676 for (i = 0 ; i < CONFIG_DAI_DMIC_HW_CONTROLLERS ; i ++ ) {
668677 /* Don't stop CIC yet if one FIFO remains active */
0 commit comments