[android-common:android16-6.12-2026-06 6/6] sound/soc/codecs/nau8325.c:425 nau8325_clksrc_choose() warn: inconsistent indenting

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
Hi Jaroslav,

First bad commit (maybe != root cause):

tree:   https://android.googlesource.com/kernel/common android16-6.12-2026-06
head:   4f69fc7b210c4319e69b69cd861e6efa5b096e2a
commit: ceb8ee5ed4507c9de966b4ce8c76450c0051230a [6/6] ASoC: nau8325: add missing build config
config: x86_64-randconfig-161-20260826 (https://download.01.org/0day-ci/archive/20260826/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9187-g5189e3fb

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

smatch warnings:
sound/soc/codecs/nau8325.c:425 nau8325_clksrc_choose() warn: inconsistent indenting

vim +425 sound/soc/codecs/nau8325.c

c0a3873b9938bf Seven Lee 2024-03-27  384  
c0a3873b9938bf Seven Lee 2024-03-27  385  static int nau8325_clksrc_choose(struct nau8325 *nau8325,
c0a3873b9938bf Seven Lee 2024-03-27  386  				 const struct nau8325_srate_attr **srate_table,
c0a3873b9938bf Seven Lee 2024-03-27  387  				 int *n1_sel, int *mult_sel, int *n2_sel)
c0a3873b9938bf Seven Lee 2024-03-27  388  {
c0a3873b9938bf Seven Lee 2024-03-27  389  	int i, j, mclk, mclk_max, ratio, ratio_sel, n2_max;
c0a3873b9938bf Seven Lee 2024-03-27  390  
c0a3873b9938bf Seven Lee 2024-03-27  391  	if (!nau8325->mclk || !nau8325->fs)
c0a3873b9938bf Seven Lee 2024-03-27  392  		goto proc_err;
c0a3873b9938bf Seven Lee 2024-03-27  393  
c0a3873b9938bf Seven Lee 2024-03-27  394  	/* select sampling rate and MCLK_SRC */
c0a3873b9938bf Seven Lee 2024-03-27  395  	*srate_table = target_srate_attribute(nau8325->fs);
c0a3873b9938bf Seven Lee 2024-03-27  396  	if (!*srate_table)
c0a3873b9938bf Seven Lee 2024-03-27  397  		goto proc_err;
c0a3873b9938bf Seven Lee 2024-03-27  398  
c0a3873b9938bf Seven Lee 2024-03-27  399  	/* First check clock from MCLK directly, decide N2 for MCLK_SRC.
c0a3873b9938bf Seven Lee 2024-03-27  400  	 * If not good, consider 1/N1 and Multiplier.
c0a3873b9938bf Seven Lee 2024-03-27  401  	 */
c0a3873b9938bf Seven Lee 2024-03-27  402  	ratio = nau8325_clksrc_n2(nau8325, *srate_table, nau8325->mclk, n2_sel);
c0a3873b9938bf Seven Lee 2024-03-27  403  	if (ratio != NAU8325_MCLK_FS_RATIO_NUM) {
c0a3873b9938bf Seven Lee 2024-03-27  404  		*n1_sel = 0;
c0a3873b9938bf Seven Lee 2024-03-27  405  		*mult_sel = CLK_PROC_BYPASS;
c0a3873b9938bf Seven Lee 2024-03-27  406  		*n2_sel = MCLK_SRC;
c0a3873b9938bf Seven Lee 2024-03-27  407  		goto proc_done;
c0a3873b9938bf Seven Lee 2024-03-27  408  	}
c0a3873b9938bf Seven Lee 2024-03-27  409  
c0a3873b9938bf Seven Lee 2024-03-27  410  	/* Get MCLK_SRC through 1/N, Multiplier, and then 1/N2. */
c0a3873b9938bf Seven Lee 2024-03-27  411  	mclk_max = 0;
c0a3873b9938bf Seven Lee 2024-03-27  412  	for (i = 0; i < ARRAY_SIZE(mclk_n1_div); i++) {
c0a3873b9938bf Seven Lee 2024-03-27  413  		for (j = 0; j < ARRAY_SIZE(mclk_n3_mult); j++) {
c0a3873b9938bf Seven Lee 2024-03-27  414  			mclk = nau8325->mclk << mclk_n3_mult[j].param;
c0a3873b9938bf Seven Lee 2024-03-27  415  			mclk = mclk / mclk_n1_div[i].param;
c0a3873b9938bf Seven Lee 2024-03-27  416  			ratio = nau8325_clksrc_n2(nau8325,
c0a3873b9938bf Seven Lee 2024-03-27  417  						  *srate_table, mclk, n2_sel);
c0a3873b9938bf Seven Lee 2024-03-27  418  			if (ratio != NAU8325_MCLK_FS_RATIO_NUM &&
c0a3873b9938bf Seven Lee 2024-03-27  419  			    (mclk_max < mclk || i > *n1_sel)) {
c0a3873b9938bf Seven Lee 2024-03-27  420  				mclk_max = mclk;
c0a3873b9938bf Seven Lee 2024-03-27  421  				n2_max = *n2_sel;
c0a3873b9938bf Seven Lee 2024-03-27  422  				*n1_sel = i;
c0a3873b9938bf Seven Lee 2024-03-27  423  				*mult_sel = j;
c0a3873b9938bf Seven Lee 2024-03-27  424  				ratio_sel = ratio;
c0a3873b9938bf Seven Lee 2024-03-27 @425  					goto proc_done;
c0a3873b9938bf Seven Lee 2024-03-27  426  			}
c0a3873b9938bf Seven Lee 2024-03-27  427  		}
c0a3873b9938bf Seven Lee 2024-03-27  428  	}
c0a3873b9938bf Seven Lee 2024-03-27  429  	if (mclk_max) {
c0a3873b9938bf Seven Lee 2024-03-27  430  		*n2_sel = n2_max;
c0a3873b9938bf Seven Lee 2024-03-27  431  		ratio = ratio_sel;
c0a3873b9938bf Seven Lee 2024-03-27  432  		goto proc_done;
c0a3873b9938bf Seven Lee 2024-03-27  433  	}
c0a3873b9938bf Seven Lee 2024-03-27  434  
c0a3873b9938bf Seven Lee 2024-03-27  435  proc_err:
c0a3873b9938bf Seven Lee 2024-03-27  436  	dev_dbg(nau8325->dev, "The MCLK %d is invalid. It can't get MCLK_SRC of 256/400/500 FS (%d)",
c0a3873b9938bf Seven Lee 2024-03-27  437  		nau8325->mclk, nau8325->fs);
c0a3873b9938bf Seven Lee 2024-03-27  438  	return -EINVAL;
c0a3873b9938bf Seven Lee 2024-03-27  439  proc_done:
c0a3873b9938bf Seven Lee 2024-03-27  440  	dev_dbg(nau8325->dev, "nau8325->fs=%d,range=0x%x, %s, (n1,mu,n2,dmu):(%d,%d,%d), MCLK_SRC=%uHz (%d)",
c0a3873b9938bf Seven Lee 2024-03-27  441  		nau8325->fs, (*srate_table)->range,
c0a3873b9938bf Seven Lee 2024-03-27  442  		(*srate_table)->max ? "MAX" : "MIN",
c0a3873b9938bf Seven Lee 2024-03-27  443  		*n1_sel == CLK_PROC_BYPASS ?
c0a3873b9938bf Seven Lee 2024-03-27  444  		CLK_PROC_BYPASS : mclk_n1_div[*n1_sel].param,
c0a3873b9938bf Seven Lee 2024-03-27  445  		*mult_sel == CLK_PROC_BYPASS ?
c0a3873b9938bf Seven Lee 2024-03-27  446  		CLK_PROC_BYPASS : 1 << mclk_n3_mult[*mult_sel].param,
c0a3873b9938bf Seven Lee 2024-03-27  447  		1 << mclk_n2_div[*n2_sel].param,
c0a3873b9938bf Seven Lee 2024-03-27  448  		(*srate_table)->mclk_src[ratio],
c0a3873b9938bf Seven Lee 2024-03-27  449  		(*srate_table)->mclk_src[ratio] / nau8325->fs);
c0a3873b9938bf Seven Lee 2024-03-27  450  
c0a3873b9938bf Seven Lee 2024-03-27  451  	return 0;
c0a3873b9938bf Seven Lee 2024-03-27  452  }
c0a3873b9938bf Seven Lee 2024-03-27  453  

:::::: The code at line 425 was first introduced by commit
:::::: c0a3873b9938bfaa77bd337cad33266a50a6583f ASoC: nau8325: new driver

:::::: TO: Seven Lee <[email protected]>
:::::: CC: Mark Brown <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.