[usb:usb-testing 31/85] drivers/usb/gadget/function/f_uac1.c:1087 f_audio_validate_opts() warn: inconsistent indenting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux