public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [broonie-misc:for-kernelci 6/7] sound/soc/codecs/wm8731.c:394:31: warning: format specifies type 'int' but the argument has type 'unsigned long'
Date: Fri, 25 Mar 2022 14:11:23 +0800	[thread overview]
Message-ID: <202203251449.v2pavIsV-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git for-kernelci
head:   0265b10883453897a0ddcdbc21af5031ad5b4a7e
commit: 94c6c005fd4c9113c44acb727292f0acd1434a11 [6/7] TEST - MCLK SETTING
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220325/202203251449.v2pavIsV-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0f6d9501cf49ce02937099350d08f20c4af86f3d)
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git/commit/?id=94c6c005fd4c9113c44acb727292f0acd1434a11
        git remote add broonie-misc https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git
        git fetch --no-tags broonie-misc for-kernelci
        git checkout 94c6c005fd4c9113c44acb727292f0acd1434a11
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash sound/soc/codecs/

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/wm8731.c:394:31: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                           pr_crit("SET SYSCLK %d\n", clk_get_rate(wm8731->mclk));
                                               ~~     ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                               %lu
   include/linux/printk.h:479:34: note: expanded from macro 'pr_crit'
           printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
                                   ~~~     ^~~~~~~~~~~
   include/linux/printk.h:446:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
   sound/soc/codecs/wm8731.c:751:34: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                   pr_crit("WM8731 MCLK IS %d\n", clk_get_rate(wm8731->mclk));
                                           ~~     ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                           %lu
   include/linux/printk.h:479:34: note: expanded from macro 'pr_crit'
           printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
                                   ~~~     ^~~~~~~~~~~
   include/linux/printk.h:446:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
   2 warnings generated.


vim +394 sound/soc/codecs/wm8731.c

   380	
   381	static int wm8731_set_dai_sysclk(struct snd_soc_dai *codec_dai,
   382			int clk_id, unsigned int freq, int dir)
   383	{
   384		struct snd_soc_component *component = codec_dai->component;
   385		struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
   386		struct wm8731_priv *wm8731 = snd_soc_component_get_drvdata(component);
   387	
   388		switch (clk_id) {
   389		case WM8731_SYSCLK_XTAL:
   390		case WM8731_SYSCLK_MCLK:
   391			if (wm8731->mclk && clk_set_rate(wm8731->mclk, freq))
   392				return -EINVAL;
   393			if (wm8731->mclk)
 > 394				pr_crit("SET SYSCLK %d\n", clk_get_rate(wm8731->mclk));
   395			wm8731->sysclk_type = clk_id;
   396			break;
   397		default:
   398			return -EINVAL;
   399		}
   400	
   401		switch (freq) {
   402		case 0:
   403			wm8731->constraints = NULL;
   404			break;
   405		case 12000000:
   406			wm8731->constraints = &wm8731_constraints_12000000;
   407			break;
   408		case 12288000:
   409		case 18432000:
   410			wm8731->constraints = &wm8731_constraints_12288000_18432000;
   411			break;
   412		case 16934400:
   413		case 11289600:
   414			wm8731->constraints = &wm8731_constraints_11289600_16934400;
   415			break;
   416		default:
   417			return -EINVAL;
   418		}
   419	
   420		wm8731->sysclk = freq;
   421	
   422		snd_soc_dapm_sync(dapm);
   423	
   424		return 0;
   425	}
   426	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-03-25  6:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202203251449.v2pavIsV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox