tree:
git://git.lwn.net/linux-2.6 docs-next
head: f9bbc12ccb35ac8b3fa01cec1a19cb523a7707c7
commit: f9bbc12ccb35ac8b3fa01cec1a19cb523a7707c7 [127/127] scripts: kernel-doc: improve
parsing for kernel-doc comments syntax
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.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
git remote add lwn
git://git.lwn.net/linux-2.6
git fetch --no-tags lwn docs-next
git checkout f9bbc12ccb35ac8b3fa01cec1a19cb523a7707c7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
sound/soc/codecs/nau8825.c:298: warning: This comment starts with '/**', but
isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Ramp up the headphone volume change gradually to target level.
> sound/soc/codecs/nau8825.c:358: warning: expecting prototype for
Computes log10 of a value; the result is round off to 3 decimal. This func(). Prototype
was for nau8825_intlog10_dec3() instead
sound/soc/codecs/nau8825.c:411: warning:
This comment starts with '/**', but isn't a kernel-doc comment. Refer
Documentation/doc-guide/kernel-doc.rst
* computes cross talk suppression sidetone gain.
vim +358 sound/soc/codecs/nau8825.c
b50455fab459b0b John Hsu 2016-06-07 296
b50455fab459b0b John Hsu 2016-06-07 297 /**
b50455fab459b0b John Hsu 2016-06-07 @298 * Ramp up the headphone volume
change gradually to target level.
b50455fab459b0b John Hsu 2016-06-07 299 *
b50455fab459b0b John Hsu 2016-06-07 300 * @nau8825: component to register
the codec private data with
b50455fab459b0b John Hsu 2016-06-07 301 * @vol_from: the volume to start
up
b50455fab459b0b John Hsu 2016-06-07 302 * @vol_to: the target volume
b50455fab459b0b John Hsu 2016-06-07 303 * @step: the volume span to move
on
b50455fab459b0b John Hsu 2016-06-07 304 *
b50455fab459b0b John Hsu 2016-06-07 305 * The headphone volume is from 0dB
to minimum -54dB and -1dB per step.
b50455fab459b0b John Hsu 2016-06-07 306 * If the volume changes sharp,
there is a pop noise heard in headphone. We
b50455fab459b0b John Hsu 2016-06-07 307 * provide the function to ramp up
the volume up or down by delaying 10ms
b50455fab459b0b John Hsu 2016-06-07 308 * per step.
b50455fab459b0b John Hsu 2016-06-07 309 */
b50455fab459b0b John Hsu 2016-06-07 310 static void
nau8825_hpvol_ramp(struct nau8825 *nau8825,
b50455fab459b0b John Hsu 2016-06-07 311 unsigned int vol_from, unsigned int
vol_to, unsigned int step)
b50455fab459b0b John Hsu 2016-06-07 312 {
b50455fab459b0b John Hsu 2016-06-07 313 unsigned int value, volume,
ramp_up, from, to;
b50455fab459b0b John Hsu 2016-06-07 314
b50455fab459b0b John Hsu 2016-06-07 315 if (vol_from == vol_to || step ==
0) {
b50455fab459b0b John Hsu 2016-06-07 316 return;
b50455fab459b0b John Hsu 2016-06-07 317 } else if (vol_from < vol_to) {
b50455fab459b0b John Hsu 2016-06-07 318 ramp_up = true;
b50455fab459b0b John Hsu 2016-06-07 319 from = vol_from;
b50455fab459b0b John Hsu 2016-06-07 320 to = vol_to;
b50455fab459b0b John Hsu 2016-06-07 321 } else {
b50455fab459b0b John Hsu 2016-06-07 322 ramp_up = false;
b50455fab459b0b John Hsu 2016-06-07 323 from = vol_to;
b50455fab459b0b John Hsu 2016-06-07 324 to = vol_from;
b50455fab459b0b John Hsu 2016-06-07 325 }
b50455fab459b0b John Hsu 2016-06-07 326 /* only handle volume from 0dB to
minimum -54dB */
b50455fab459b0b John Hsu 2016-06-07 327 if (to > NAU8825_HP_VOL_MIN)
b50455fab459b0b John Hsu 2016-06-07 328 to = NAU8825_HP_VOL_MIN;
b50455fab459b0b John Hsu 2016-06-07 329
b50455fab459b0b John Hsu 2016-06-07 330 for (volume = from; volume < to;
volume += step) {
b50455fab459b0b John Hsu 2016-06-07 331 if (ramp_up)
b50455fab459b0b John Hsu 2016-06-07 332 value = volume;
b50455fab459b0b John Hsu 2016-06-07 333 else
b50455fab459b0b John Hsu 2016-06-07 334 value = to - volume + from;
b50455fab459b0b John Hsu 2016-06-07 335
regmap_update_bits(nau8825->regmap, NAU8825_REG_HSVOL_CTRL,
b50455fab459b0b John Hsu 2016-06-07 336 NAU8825_HPL_VOL_MASK |
NAU8825_HPR_VOL_MASK,
b50455fab459b0b John Hsu 2016-06-07 337 (value <<
NAU8825_HPL_VOL_SFT) | value);
b50455fab459b0b John Hsu 2016-06-07 338 usleep_range(10000, 10500);
b50455fab459b0b John Hsu 2016-06-07 339 }
b50455fab459b0b John Hsu 2016-06-07 340 if (ramp_up)
b50455fab459b0b John Hsu 2016-06-07 341 value = to;
b50455fab459b0b John Hsu 2016-06-07 342 else
b50455fab459b0b John Hsu 2016-06-07 343 value = from;
b50455fab459b0b John Hsu 2016-06-07 344
regmap_update_bits(nau8825->regmap, NAU8825_REG_HSVOL_CTRL,
b50455fab459b0b John Hsu 2016-06-07 345 NAU8825_HPL_VOL_MASK |
NAU8825_HPR_VOL_MASK,
b50455fab459b0b John Hsu 2016-06-07 346 (value <<
NAU8825_HPL_VOL_SFT) | value);
b50455fab459b0b John Hsu 2016-06-07 347 }
b50455fab459b0b John Hsu 2016-06-07 348
b50455fab459b0b John Hsu 2016-06-07 349 /**
b50455fab459b0b John Hsu 2016-06-07 350 * Computes log10 of a value; the
result is round off to 3 decimal. This func-
b50455fab459b0b John Hsu 2016-06-07 351 * tion takes reference to dvb-math.
The source code locates as the following.
b50455fab459b0b John Hsu 2016-06-07 352 *
Linux/drivers/media/dvb-core/dvb_math.c
dc22a4093f5d297 Pierre-Louis Bossart 2019-01-04 353 * @value: input for log10
b50455fab459b0b John Hsu 2016-06-07 354 *
b50455fab459b0b John Hsu 2016-06-07 355 * return log10(value) * 1000
b50455fab459b0b John Hsu 2016-06-07 356 */
b50455fab459b0b John Hsu 2016-06-07 357 static u32 nau8825_intlog10_dec3(u32
value)
b50455fab459b0b John Hsu 2016-06-07 @358 {
b50455fab459b0b John Hsu 2016-06-07 359 u32 msb, logentry, significand,
interpolation, log10val;
b50455fab459b0b John Hsu 2016-06-07 360 u64 log2val;
b50455fab459b0b John Hsu 2016-06-07 361
b50455fab459b0b John Hsu 2016-06-07 362 /* first detect the msb (count
begins at 0) */
b50455fab459b0b John Hsu 2016-06-07 363 msb = fls(value) - 1;
b50455fab459b0b John Hsu 2016-06-07 364 /**
b50455fab459b0b John Hsu 2016-06-07 365 * now we use a logtable after
the following method:
b50455fab459b0b John Hsu 2016-06-07 366 *
b50455fab459b0b John Hsu 2016-06-07 367 * log2(2^x * y) * 2^24 = x *
2^24 + log2(y) * 2^24
b50455fab459b0b John Hsu 2016-06-07 368 * where x = msb and therefore
1 <= y < 2
b50455fab459b0b John Hsu 2016-06-07 369 * first y is determined by
shifting the value left
b50455fab459b0b John Hsu 2016-06-07 370 * so that msb is bit 31
b50455fab459b0b John Hsu 2016-06-07 371 * 0x00231f56 ->
0x8C7D5800
b50455fab459b0b John Hsu 2016-06-07 372 * the result is y * 2^31
-> "significand"
b50455fab459b0b John Hsu 2016-06-07 373 * then the highest 9 bits are
used for a table lookup
b50455fab459b0b John Hsu 2016-06-07 374 * the highest bit is
discarded because it's always set
b50455fab459b0b John Hsu 2016-06-07 375 * the highest nine bits in
our example are 100011000
b50455fab459b0b John Hsu 2016-06-07 376 * so we would use the entry
0x18
b50455fab459b0b John Hsu 2016-06-07 377 */
b50455fab459b0b John Hsu 2016-06-07 378 significand = value << (31 -
msb);
b50455fab459b0b John Hsu 2016-06-07 379 logentry = (significand >>
23) & 0xff;
b50455fab459b0b John Hsu 2016-06-07 380 /**
b50455fab459b0b John Hsu 2016-06-07 381 * last step we do is
interpolation because of the
b50455fab459b0b John Hsu 2016-06-07 382 * limitations of the log
table the error is that part of
b50455fab459b0b John Hsu 2016-06-07 383 * the significand which
isn't used for lookup then we
b50455fab459b0b John Hsu 2016-06-07 384 * compute the ratio between
the error and the next table entry
b50455fab459b0b John Hsu 2016-06-07 385 * and interpolate it between
the log table entry used and the
b50455fab459b0b John Hsu 2016-06-07 386 * next one the biggest error
possible is 0x7fffff
b50455fab459b0b John Hsu 2016-06-07 387 * (in our example it's
0x7D5800)
b50455fab459b0b John Hsu 2016-06-07 388 * needed value for next table
entry is 0x800000
b50455fab459b0b John Hsu 2016-06-07 389 * so the interpolation is
b50455fab459b0b John Hsu 2016-06-07 390 * (error / 0x800000) *
(logtable_next - logtable_current)
b50455fab459b0b John Hsu 2016-06-07 391 * in the implementation the
division is moved to the end for
b50455fab459b0b John Hsu 2016-06-07 392 * better accuracy there is
also an overflow correction if
b50455fab459b0b John Hsu 2016-06-07 393 * logtable_next is 256
b50455fab459b0b John Hsu 2016-06-07 394 */
b50455fab459b0b John Hsu 2016-06-07 395 interpolation = ((significand &
0x7fffff) *
b50455fab459b0b John Hsu 2016-06-07 396 ((logtable[(logentry + 1) &
0xff] -
b50455fab459b0b John Hsu 2016-06-07 397 logtable[logentry]) & 0xffff))
>> 15;
b50455fab459b0b John Hsu 2016-06-07 398
b50455fab459b0b John Hsu 2016-06-07 399 log2val = ((msb << 24) +
(logtable[logentry] << 8) + interpolation);
b50455fab459b0b John Hsu 2016-06-07 400 /**
b50455fab459b0b John Hsu 2016-06-07 401 * log10(x) = log2(x) *
log10(2)
b50455fab459b0b John Hsu 2016-06-07 402 */
b50455fab459b0b John Hsu 2016-06-07 403 log10val = (log2val * LOG10_MAGIC)
>> 31;
b50455fab459b0b John Hsu 2016-06-07 404 /**
b50455fab459b0b John Hsu 2016-06-07 405 * the result is round off to
3 decimal
b50455fab459b0b John Hsu 2016-06-07 406 */
b50455fab459b0b John Hsu 2016-06-07 407 return log10val / ((1 << 24)
/ 1000);
b50455fab459b0b John Hsu 2016-06-07 408 }
b50455fab459b0b John Hsu 2016-06-07 409
:::::: The code at line 358 was first introduced by commit
:::::: b50455fab459b0ba17f6129203f77c6acce946ce ASoC: nau8825: cross talk suppression
measurement function
:::::: TO: John Hsu <KCHSU0(a)nuvoton.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org