From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [sashal-linux-stable:queue-5.4 99/120] sound/usb/mixer.c:1300:27: error: implicit declaration of function 'mixer_ctrl_intf'
Date: Sun, 21 Mar 2021 00:33:12 +0800 [thread overview]
Message-ID: <202103210009.PnLIN4Ac-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6287 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: 4bd8020d6c753ab56df4d7bd75833fd880e1995a
commit: 7c9ada4789d0d2072ed57bf55ddb679fa63ea393 [99/120] ALSA: usb-audio: Drop bogus dB range in too low level
config: powerpc64-randconfig-r006-20210320 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 436c6c9c20cc522c92a923440a5fc509c342a7db)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=7c9ada4789d0d2072ed57bf55ddb679fa63ea393
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 7c9ada4789d0d2072ed57bf55ddb679fa63ea393
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> sound/usb/mixer.c:1300:27: error: implicit declaration of function 'mixer_ctrl_intf' [-Werror,-Wimplicit-function-declaration]
cval->head.id, mixer_ctrl_intf(cval->head.mixer),
^
1 error generated.
vim +/mixer_ctrl_intf +1300 sound/usb/mixer.c
1186
1187 /*
1188 * retrieve the minimum and maximum values for the specified control
1189 */
1190 static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,
1191 int default_min, struct snd_kcontrol *kctl)
1192 {
1193 /* for failsafe */
1194 cval->min = default_min;
1195 cval->max = cval->min + 1;
1196 cval->res = 1;
1197 cval->dBmin = cval->dBmax = 0;
1198
1199 if (cval->val_type == USB_MIXER_BOOLEAN ||
1200 cval->val_type == USB_MIXER_INV_BOOLEAN) {
1201 cval->initialized = 1;
1202 } else {
1203 int minchn = 0;
1204 if (cval->cmask) {
1205 int i;
1206 for (i = 0; i < MAX_CHANNELS; i++)
1207 if (cval->cmask & (1 << i)) {
1208 minchn = i + 1;
1209 break;
1210 }
1211 }
1212 if (get_ctl_value(cval, UAC_GET_MAX, (cval->control << 8) | minchn, &cval->max) < 0 ||
1213 get_ctl_value(cval, UAC_GET_MIN, (cval->control << 8) | minchn, &cval->min) < 0) {
1214 usb_audio_err(cval->head.mixer->chip,
1215 "%d:%d: cannot get min/max values for control %d (id %d)\n",
1216 cval->head.id, snd_usb_ctrl_intf(cval->head.mixer->chip),
1217 cval->control, cval->head.id);
1218 return -EINVAL;
1219 }
1220 if (get_ctl_value(cval, UAC_GET_RES,
1221 (cval->control << 8) | minchn,
1222 &cval->res) < 0) {
1223 cval->res = 1;
1224 } else {
1225 int last_valid_res = cval->res;
1226
1227 while (cval->res > 1) {
1228 if (snd_usb_mixer_set_ctl_value(cval, UAC_SET_RES,
1229 (cval->control << 8) | minchn,
1230 cval->res / 2) < 0)
1231 break;
1232 cval->res /= 2;
1233 }
1234 if (get_ctl_value(cval, UAC_GET_RES,
1235 (cval->control << 8) | minchn, &cval->res) < 0)
1236 cval->res = last_valid_res;
1237 }
1238 if (cval->res == 0)
1239 cval->res = 1;
1240
1241 /* Additional checks for the proper resolution
1242 *
1243 * Some devices report smaller resolutions than actually
1244 * reacting. They don't return errors but simply clip
1245 * to the lower aligned value.
1246 */
1247 if (cval->min + cval->res < cval->max) {
1248 int last_valid_res = cval->res;
1249 int saved, test, check;
1250 if (get_cur_mix_raw(cval, minchn, &saved) < 0)
1251 goto no_res_check;
1252 for (;;) {
1253 test = saved;
1254 if (test < cval->max)
1255 test += cval->res;
1256 else
1257 test -= cval->res;
1258 if (test < cval->min || test > cval->max ||
1259 snd_usb_set_cur_mix_value(cval, minchn, 0, test) ||
1260 get_cur_mix_raw(cval, minchn, &check)) {
1261 cval->res = last_valid_res;
1262 break;
1263 }
1264 if (test == check)
1265 break;
1266 cval->res *= 2;
1267 }
1268 snd_usb_set_cur_mix_value(cval, minchn, 0, saved);
1269 }
1270
1271 no_res_check:
1272 cval->initialized = 1;
1273 }
1274
1275 if (kctl)
1276 volume_control_quirks(cval, kctl);
1277
1278 /* USB descriptions contain the dB scale in 1/256 dB unit
1279 * while ALSA TLV contains in 1/100 dB unit
1280 */
1281 cval->dBmin = (convert_signed_value(cval, cval->min) * 100) / 256;
1282 cval->dBmax = (convert_signed_value(cval, cval->max) * 100) / 256;
1283 if (cval->dBmin > cval->dBmax) {
1284 /* something is wrong; assume it's either from/to 0dB */
1285 if (cval->dBmin < 0)
1286 cval->dBmax = 0;
1287 else if (cval->dBmin > 0)
1288 cval->dBmin = 0;
1289 if (cval->dBmin > cval->dBmax) {
1290 /* totally crap, return an error */
1291 return -EINVAL;
1292 }
1293 } else {
1294 /* if the max volume is too low, it's likely a bogus range;
1295 * here we use -96dB as the threshold
1296 */
1297 if (cval->dBmax <= -9600) {
1298 usb_audio_info(cval->head.mixer->chip,
1299 "%d:%d: bogus dB values (%d/%d), disabling dB reporting\n",
> 1300 cval->head.id, mixer_ctrl_intf(cval->head.mixer),
1301 cval->dBmin, cval->dBmax);
1302 cval->dBmin = cval->dBmax = 0;
1303 }
1304 }
1305
1306 return 0;
1307 }
1308
---
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: 28347 bytes --]
reply other threads:[~2021-03-20 16:33 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=202103210009.PnLIN4Ac-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 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.