linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Cc: kbuild-all@lists.01.org, linux-usb@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Pavel Hofman <pavel.hofman@ivitera.com>
Subject: [usb:usb-testing 31/85] drivers/usb/gadget/function/f_uac1.c:1087 f_audio_validate_opts() warn: inconsistent indenting
Date: Sat, 14 Aug 2021 04:47:43 +0800	[thread overview]
Message-ID: <202108140437.sHc57aQ1-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head:   cea45a3bd2dd4d9c35581328f571afd32b3c9f48
commit: 0356e6283c7177391d144612f4b12986ed5c4f6e [31/85] usb: gadget: f_uac1: add volume and mute support
config: microblaze-randconfig-m031-20210814 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 11.2.0

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

New smatch warnings:
drivers/usb/gadget/function/f_uac1.c:1087 f_audio_validate_opts() warn: inconsistent indenting

Old smatch warnings:
drivers/usb/gadget/function/f_uac1.c:1090 f_audio_validate_opts() warn: inconsistent indenting
drivers/usb/gadget/function/f_uac1.c:1093 f_audio_validate_opts() warn: inconsistent indenting
drivers/usb/gadget/function/f_uac1.c:1096 f_audio_validate_opts() warn: inconsistent indenting
drivers/usb/gadget/function/f_uac1.c:1101 f_audio_validate_opts() warn: inconsistent indenting
drivers/usb/gadget/function/f_uac1.c:1104 f_audio_validate_opts() warn: inconsistent indenting

vim +1087 drivers/usb/gadget/function/f_uac1.c

  1057	
  1058	static int f_audio_validate_opts(struct g_audio *audio, struct device *dev)
  1059	{
  1060		struct f_uac1_opts *opts = g_audio_to_uac1_opts(audio);
  1061	
  1062		if (!opts->p_chmask && !opts->c_chmask) {
  1063			dev_err(dev, "Error: no playback and capture channels\n");
  1064			return -EINVAL;
  1065		} else if (opts->p_chmask & ~UAC1_CHANNEL_MASK) {
  1066			dev_err(dev, "Error: unsupported playback channels mask\n");
  1067			return -EINVAL;
  1068		} else if (opts->c_chmask & ~UAC1_CHANNEL_MASK) {
  1069			dev_err(dev, "Error: unsupported capture channels mask\n");
  1070			return -EINVAL;
  1071		} else if ((opts->p_ssize < 1) || (opts->p_ssize > 4)) {
  1072			dev_err(dev, "Error: incorrect playback sample size\n");
  1073			return -EINVAL;
  1074		} else if ((opts->c_ssize < 1) || (opts->c_ssize > 4)) {
  1075			dev_err(dev, "Error: incorrect capture sample size\n");
  1076			return -EINVAL;
  1077		} else if (!opts->p_srate) {
  1078			dev_err(dev, "Error: incorrect playback sampling rate\n");
  1079			return -EINVAL;
  1080		} else if (!opts->c_srate) {
  1081			dev_err(dev, "Error: incorrect capture sampling rate\n");
  1082			return -EINVAL;
  1083		}
  1084	
  1085		if (opts->p_volume_max <= opts->p_volume_min) {
  1086			dev_err(dev, "Error: incorrect playback volume max/min\n");
> 1087				return -EINVAL;
  1088		} else if (opts->c_volume_max <= opts->c_volume_min) {
  1089			dev_err(dev, "Error: incorrect capture volume max/min\n");
  1090				return -EINVAL;
  1091		} else if (opts->p_volume_res <= 0) {
  1092			dev_err(dev, "Error: negative/zero playback volume resolution\n");
  1093				return -EINVAL;
  1094		} else if (opts->c_volume_res <= 0) {
  1095			dev_err(dev, "Error: negative/zero capture volume resolution\n");
  1096				return -EINVAL;
  1097		}
  1098	
  1099		if ((opts->p_volume_max - opts->p_volume_min) % opts->p_volume_res) {
  1100			dev_err(dev, "Error: incorrect playback volume resolution\n");
  1101				return -EINVAL;
  1102		} else if ((opts->c_volume_max - opts->c_volume_min) % opts->c_volume_res) {
  1103			dev_err(dev, "Error: incorrect capture volume resolution\n");
  1104				return -EINVAL;
  1105		}
  1106	
  1107		return 0;
  1108	}
  1109	

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

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

                 reply	other threads:[~2021-08-13 20:48 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=202108140437.sHc57aQ1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pavel.hofman@ivitera.com \
    --cc=ruslan.bilovol@gmail.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;
as well as URLs for NNTP newsgroup(s).