All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-4.14 14/14] sound/soc/codecs/cs42l42.c:936:5: warning: no previous prototype for function 'cs42l42_trigger'
@ 2021-05-11  2:18 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-11  2:18 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4016 bytes --]

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.14
head:   972c48e87ad66b0893810f0b2d839fcd77e5e31e
commit: 972c48e87ad66b0893810f0b2d839fcd77e5e31e [14/14] CHROMIUM: ASoC: cs42l42: Switch to SCLK in IRQ
config: x86_64-randconfig-a012-20210510 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
        git fetch --no-tags chrome-os chromeos-4.14
        git checkout 972c48e87ad66b0893810f0b2d839fcd77e5e31e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> sound/soc/codecs/cs42l42.c:936:5: warning: no previous prototype for function 'cs42l42_trigger' [-Wmissing-prototypes]
   int cs42l42_trigger(struct snd_pcm_substream * substream, int cmd, struct snd_soc_dai *dai)
       ^
   sound/soc/codecs/cs42l42.c:936:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int cs42l42_trigger(struct snd_pcm_substream * substream, int cmd, struct snd_soc_dai *dai)
   ^
   static 
   1 warning generated.


vim +/cs42l42_trigger +936 sound/soc/codecs/cs42l42.c

   935	
 > 936	int cs42l42_trigger(struct snd_pcm_substream * substream, int cmd, struct snd_soc_dai *dai)
   937	{
   938		struct snd_soc_component *component = dai->component;
   939		struct cs42l42_private *cs42l42 = snd_soc_component_get_drvdata(component);
   940		unsigned int regval;
   941		int ret;
   942		unsigned int count = 0;
   943		int streams = cs42l42->stream_use;
   944	
   945		/* Count currently active streams */
   946		while (streams) {
   947			if(streams & 1)
   948				++count;
   949			streams >>= 1;
   950		}
   951	
   952		dev_dbg(component->dev, "%s() cs42l42->stream_use=%08x, active streams=%d\n",
   953			__func__, cs42l42->stream_use, count);
   954	
   955		regmap_read(cs42l42->regmap, CS42L42_PLL_LOCK_STATUS, &regval);
   956	
   957		switch (cmd) {
   958			case SNDRV_PCM_TRIGGER_START:
   959				if (!regval)
   960					snd_soc_component_update_bits(component, CS42L42_PLL_CTL1,
   961								      CS42L42_PLL_START_MASK, 1);
   962				break;
   963	
   964			case SNDRV_PCM_TRIGGER_STOP:
   965				/* Last active stream, switching to SCO */
   966				if (count ==  1) {
   967					dev_dbg(component->dev, "%s() Switching to SCO\n", __func__);
   968	
   969					regmap_multi_reg_write(cs42l42->regmap, cs42l42_to_osc_seq,
   970							       ARRAY_SIZE(cs42l42_to_osc_seq));
   971	
   972					snd_soc_component_update_bits(component, CS42L42_MCLK_SRC_SEL,
   973								CS42L42_MCLK_SRC_SEL_MASK |
   974								CS42L42_MCLKDIV_MASK,
   975								(0 << CS42L42_MCLK_SRC_SEL_SHIFT) |
   976								(0 << CS42L42_MCLKDIV_SHIFT));
   977	
   978					ret = snd_soc_component_update_bits(component, CS42L42_PLL_CTL1,
   979									    CS42L42_PLL_START_MASK, 0);
   980	
   981					/* PLL unlock delay 10ms*/
   982					usleep_range(10000,12000);
   983	
   984					regmap_read(cs42l42->regmap, CS42L42_PLL_LOCK_STATUS, &regval);
   985				}
   986				break;
   987	
   988			default:
   989				break;
   990		}
   991	
   992		cs42l42->pll_lock = regval;
   993	
   994		return 0;
   995	}
   996	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30484 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-11  2:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11  2:18 [chrome-os:chromeos-4.14 14/14] sound/soc/codecs/cs42l42.c:936:5: warning: no previous prototype for function 'cs42l42_trigger' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.