public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ivan Orlov <ivan.orlov0322@gmail.com>,
	perex@perex.cz, tiwai@suse.com, oswald.buddenhagen@gmx.de,
	axboe@kernel.dk, 42.hyeyoo@gmail.com, surenb@google.com
Cc: oe-kbuild-all@lists.linux.dev,
	Ivan Orlov <ivan.orlov0322@gmail.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	skhan@linuxfoundation.org, himadrispandya@gmail.com,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH] ALSA: PCM: Fix codestyle issues in pcm_native.c
Date: Wed, 10 May 2023 17:42:27 +0800	[thread overview]
Message-ID: <202305101732.PILWtd0A-lkp@intel.com> (raw)
In-Reply-To: <20230510072726.435247-1-ivan.orlov0322@gmail.com>

Hi Ivan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tiwai-sound/for-next]
[also build test WARNING on tiwai-sound/for-linus linus/master v6.4-rc1 next-20230510]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ivan-Orlov/ALSA-PCM-Fix-codestyle-issues-in-pcm_native-c/20230510-152814
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
patch link:    https://lore.kernel.org/r/20230510072726.435247-1-ivan.orlov0322%40gmail.com
patch subject: [PATCH] ALSA: PCM: Fix codestyle issues in pcm_native.c
config: csky-randconfig-r004-20230509 (https://download.01.org/0day-ci/archive/20230510/202305101732.PILWtd0A-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 12.1.0
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://github.com/intel-lab-lkp/linux/commit/6099cbeae29e29487828a858f8b0e866bec90ab1
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Ivan-Orlov/ALSA-PCM-Fix-codestyle-issues-in-pcm_native-c/20230510-152814
        git checkout 6099cbeae29e29487828a858f8b0e866bec90ab1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=csky olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=csky SHELL=/bin/bash sound/core/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305101732.PILWtd0A-lkp@intel.com/

All warnings (new ones prefixed by >>):

   sound/core/pcm_native.c: In function 'snd_pcm_hw_params_choose':
>> sound/core/pcm_native.c:660:94: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
     660 |                         trace_hw_mask_param(pcm, *v, 0, &old_mask, hw_param_mask(params, *v));
         |                                                                                              ^


vim +/if +660 sound/core/pcm_native.c

   607	
   608	/**
   609	 * snd_pcm_hw_params_choose - choose a configuration defined by @params
   610	 * @pcm: PCM instance
   611	 * @params: the hw_params instance
   612	 *
   613	 * Choose one configuration from configuration space defined by @params.
   614	 * The configuration chosen is that obtained fixing in this order:
   615	 * first access, first format, first subformat, min channels,
   616	 * min rate, min period time, max buffer size, min tick time
   617	 *
   618	 * Return: Zero if successful, or a negative error code on failure.
   619	 */
   620	static int snd_pcm_hw_params_choose(struct snd_pcm_substream *pcm,
   621					    struct snd_pcm_hw_params *params)
   622	{
   623		static const int vars[] = {
   624			SNDRV_PCM_HW_PARAM_ACCESS,
   625			SNDRV_PCM_HW_PARAM_FORMAT,
   626			SNDRV_PCM_HW_PARAM_SUBFORMAT,
   627			SNDRV_PCM_HW_PARAM_CHANNELS,
   628			SNDRV_PCM_HW_PARAM_RATE,
   629			SNDRV_PCM_HW_PARAM_PERIOD_TIME,
   630			SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
   631			SNDRV_PCM_HW_PARAM_TICK_TIME,
   632			-1
   633		};
   634		const int *v;
   635		struct snd_mask old_mask __maybe_unused;
   636		struct snd_interval old_interval __maybe_unused;
   637		int changed;
   638	
   639		for (v = vars; *v != -1; v++) {
   640			/* Keep old parameter to trace. */
   641			if (trace_hw_mask_param_enabled()) {
   642				if (hw_is_mask(*v))
   643					old_mask = *hw_param_mask(params, *v);
   644			}
   645			if (trace_hw_interval_param_enabled()) {
   646				if (hw_is_interval(*v))
   647					old_interval = *hw_param_interval(params, *v);
   648			}
   649			if (*v != SNDRV_PCM_HW_PARAM_BUFFER_SIZE)
   650				changed = snd_pcm_hw_param_first(pcm, params, *v, NULL);
   651			else
   652				changed = snd_pcm_hw_param_last(pcm, params, *v, NULL);
   653			if (changed < 0)
   654				return changed;
   655			if (changed == 0)
   656				continue;
   657	
   658			/* Trace the changed parameter. */
   659			if (hw_is_mask(*v))
 > 660				trace_hw_mask_param(pcm, *v, 0, &old_mask, hw_param_mask(params, *v));
   661			if (hw_is_interval(*v)) {
   662				trace_hw_interval_param(pcm, *v, 0, &old_interval,
   663							hw_param_interval(params, *v));
   664			}
   665		}
   666	
   667		return 0;
   668	}
   669	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

      parent reply	other threads:[~2023-05-10  9:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10  7:27 [PATCH] ALSA: PCM: Fix codestyle issues in pcm_native.c Ivan Orlov
2023-05-10  7:48 ` Greg KH
2023-05-10  7:55   ` Ivan Orlov
2023-05-10  8:06     ` Takashi Iwai
2023-05-10  8:21       ` Oswald Buddenhagen
2023-05-10  8:58         ` Takashi Iwai
2023-05-10  9:17         ` Ivan Orlov
2023-05-10  9:42 ` kernel test robot [this message]

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=202305101732.PILWtd0A-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=axboe@kernel.dk \
    --cc=himadrispandya@gmail.com \
    --cc=ivan.orlov0322@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oswald.buddenhagen@gmx.de \
    --cc=perex@perex.cz \
    --cc=skhan@linuxfoundation.org \
    --cc=surenb@google.com \
    --cc=tiwai@suse.com \
    /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