Re: [PATCH] KVM: fix overflow of zero page refcount ksm use_zero_pages
by kbuild test robot
Hi Zhuang,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kvm/linux-next]
[cannot apply to v5.4-rc3 next-20191011]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Zhuang-Yanying/KVM-fix-overflow-...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: x86_64-lkp (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_is_reserved_pfn':
>> arch/x86/kvm/../../../virt/kvm/kvm_main.c:155:23: error: 'page' undeclared (first use in this function)
return PageReserved(page) && !is_zero_pfn(pfn);
^~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:155:23: note: each undeclared identifier is reported only once for each function it appears in
vim +/page +155 arch/x86/kvm/../../../virt/kvm/kvm_main.c
151
152 bool kvm_is_reserved_pfn(kvm_pfn_t pfn)
153 {
154 if (pfn_valid(pfn))
> 155 return PageReserved(page) && !is_zero_pfn(pfn);
156
157 return true;
158 }
159
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 11 months
Re: [alsa-devel] [PATCH v2 07/10] ASoC: cros_ec_codec: support WoV
by kbuild test robot
Hi Tzung-Bi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[cannot apply to v5.4-rc1 next-20191004]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Tzung-Bi-Shih/ASoC-mediatek-mt81...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-42-g38eda53-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> sound/soc/codecs/cros_ec_codec.c:430:39: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] <asvoid * @@
>> sound/soc/codecs/cros_ec_codec.c:430:39: sparse: expected void *
>> sound/soc/codecs/cros_ec_codec.c:430:39: sparse: got void [noderef] <asn:2> *
>> sound/soc/codecs/cros_ec_codec.c:549:69: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] <asn:2> * @@ got latile [noderef] <asn:2> * @@
>> sound/soc/codecs/cros_ec_codec.c:549:69: sparse: expected void const volatile [noderef] <asn:2> *
>> sound/soc/codecs/cros_ec_codec.c:549:69: sparse: got unsigned char [usertype] *addr
>> sound/soc/codecs/cros_ec_codec.c:698:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] <asn:2> * @@ got latile [noderef] <asn:2> * @@
>> sound/soc/codecs/cros_ec_codec.c:698:33: sparse: expected void volatile [noderef] <asn:2> *
>> sound/soc/codecs/cros_ec_codec.c:698:33: sparse: got unsigned char [usertype] *wov_lang_shm_p
sound/soc/codecs/cros_ec_codec.c:699:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] <asn:2> * @@ got latile [noderef] <asn:2> * @@
sound/soc/codecs/cros_ec_codec.c:699:48: sparse: expected void volatile [noderef] <asn:2> *
>> sound/soc/codecs/cros_ec_codec.c:699:48: sparse: got unsigned char [usertype] *
vim +430 sound/soc/codecs/cros_ec_codec.c
406
407 static void *wov_map_shm(struct cros_ec_codec_priv *priv,
408 uint8_t shm_id, uint32_t *len, uint8_t *type)
409 {
410 struct ec_param_ec_codec p;
411 struct ec_response_ec_codec_get_shm_addr r;
412 uint32_t req, offset;
413
414 p.cmd = EC_CODEC_GET_SHM_ADDR;
415 p.get_shm_addr_param.shm_id = shm_id;
416 if (send_ec_host_command(priv->ec_device, EC_CMD_EC_CODEC,
417 (uint8_t *)&p, sizeof(p),
418 (uint8_t *)&r, sizeof(r)) < 0) {
419 dev_err(priv->dev, "failed to EC_CODEC_GET_SHM_ADDR\n");
420 return NULL;
421 }
422
423 dev_dbg(priv->dev, "phys_addr=%#llx, len=%#x\n", r.phys_addr, r.len);
424
425 *len = r.len;
426 *type = r.type;
427
428 switch (r.type) {
429 case EC_CODEC_SHM_TYPE_EC_RAM:
> 430 return devm_ioremap_wc(priv->dev,
431 r.phys_addr + priv->ec_shm_addr, r.len);
432 case EC_CODEC_SHM_TYPE_SYSTEM_RAM:
433 if (r.phys_addr) {
434 dev_err(priv->dev, "unknown status\n");
435 return NULL;
436 }
437
438 req = round_up(r.len, PAGE_SIZE);
439 dev_dbg(priv->dev, "round up from %u to %u\n", r.len, req);
440
441 if (priv->ap_shm_last_alloc + req >
442 priv->ap_shm_phys_addr + priv->ap_shm_len) {
443 dev_err(priv->dev, "insufficient space for AP SHM\n");
444 return NULL;
445 }
446
447 dev_dbg(priv->dev, "alloc AP SHM addr=%#llx, len=%#x\n",
448 priv->ap_shm_last_alloc, req);
449
450 p.cmd = EC_CODEC_SET_SHM_ADDR;
451 p.set_shm_addr_param.phys_addr = priv->ap_shm_last_alloc;
452 p.set_shm_addr_param.len = req;
453 p.set_shm_addr_param.shm_id = shm_id;
454 if (send_ec_host_command(priv->ec_device, EC_CMD_EC_CODEC,
455 (uint8_t *)&p, sizeof(p),
456 NULL, 0) < 0) {
457 dev_err(priv->dev, "failed to EC_CODEC_SET_SHM_ADDR\n");
458 return NULL;
459 }
460
461 /*
462 * Note: EC codec only requests for `r.len' but we allocate
463 * round up PAGE_SIZE `req'.
464 */
465 offset = priv->ap_shm_last_alloc - priv->ap_shm_phys_addr;
466 priv->ap_shm_last_alloc += req;
467
468 return (void *)(uintptr_t)(priv->ap_shm_addr + offset);
469 default:
470 return NULL;
471 }
472 }
473
474 static bool wov_queue_full(struct cros_ec_codec_priv *priv)
475 {
476 return ((priv->wov_wp + 1) % sizeof(priv->wov_buf)) == priv->wov_rp;
477 }
478
479 static size_t wov_queue_size(struct cros_ec_codec_priv *priv)
480 {
481 if (priv->wov_wp >= priv->wov_rp)
482 return priv->wov_wp - priv->wov_rp;
483 else
484 return sizeof(priv->wov_buf) - priv->wov_rp + priv->wov_wp;
485 }
486
487 static void wov_queue_dequeue(struct cros_ec_codec_priv *priv, size_t len)
488 {
489 struct snd_pcm_runtime *runtime = priv->wov_substream->runtime;
490 size_t req;
491
492 while (len) {
493 req = min(len, runtime->dma_bytes - priv->wov_dma_offset);
494 if (priv->wov_wp >= priv->wov_rp)
495 req = min(req, (size_t)priv->wov_wp - priv->wov_rp);
496 else
497 req = min(req, sizeof(priv->wov_buf) - priv->wov_rp);
498
499 memcpy(runtime->dma_area + priv->wov_dma_offset,
500 priv->wov_buf + priv->wov_rp, req);
501
502 priv->wov_dma_offset += req;
503 if (priv->wov_dma_offset == runtime->dma_bytes)
504 priv->wov_dma_offset = 0;
505
506 priv->wov_rp += req;
507 if (priv->wov_rp == sizeof(priv->wov_buf))
508 priv->wov_rp = 0;
509
510 len -= req;
511 }
512
513 snd_pcm_period_elapsed(priv->wov_substream);
514 }
515
516 static void wov_queue_try_dequeue(struct cros_ec_codec_priv *priv)
517 {
518 size_t period_bytes = snd_pcm_lib_period_bytes(priv->wov_substream);
519
520 while (period_bytes && wov_queue_size(priv) >= period_bytes) {
521 wov_queue_dequeue(priv, period_bytes);
522 period_bytes = snd_pcm_lib_period_bytes(priv->wov_substream);
523 }
524 }
525
526 static void wov_queue_enqueue(struct cros_ec_codec_priv *priv,
527 uint8_t *addr, size_t len, bool iomem)
528 {
529 size_t req;
530
531 while (len) {
532 if (wov_queue_full(priv)) {
533 wov_queue_try_dequeue(priv);
534
535 if (wov_queue_full(priv)) {
536 dev_err(priv->dev, "overrun detected\n");
537 return;
538 }
539 }
540
541 if (priv->wov_wp >= priv->wov_rp)
542 req = sizeof(priv->wov_buf) - priv->wov_wp;
543 else
544 /* Note: waste 1-byte to differentiate full and empty */
545 req = priv->wov_rp - priv->wov_wp - 1;
546 req = min(req, len);
547
548 if (iomem)
> 549 memcpy_fromio(priv->wov_buf + priv->wov_wp, addr, req);
550 else
551 memcpy(priv->wov_buf + priv->wov_wp, addr, req);
552
553 priv->wov_wp += req;
554 if (priv->wov_wp == sizeof(priv->wov_buf))
555 priv->wov_wp = 0;
556
557 addr += req;
558 len -= req;
559 }
560
561 wov_queue_try_dequeue(priv);
562 }
563
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 11 months
Re: [PATCH 11/11] thermal: Move thermal governor structure to internal header
by kbuild test robot
Hi Daniel,
I love your patch! Perhaps something to improve:
[auto build test WARNING on soc-thermal/next]
[cannot apply to v5.4-rc3 next-20191011]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Daniel-Lezcano/thermal-Move-defa...
base: https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-therma... next
config: i386-randconfig-g003-201941 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/export.h:45:0,
from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from drivers/platform/x86/acerhdf.c:23:
drivers/platform/x86/acerhdf.c: In function 'acerhdf_register_thermal':
drivers/platform/x86/acerhdf.c:747:30: error: dereferencing pointer to incomplete type 'struct thermal_governor'
if (strcmp(thz_dev->governor->name,
^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/platform/x86/acerhdf.c:747:2: note: in expansion of macro 'if'
if (strcmp(thz_dev->governor->name,
^~
vim +/if +747 drivers/platform/x86/acerhdf.c
e86435eb91b2bf Peter Feuerer 2009-06-21 731
1d0c3fd01afbd5 Paul Gortmaker 2018-09-20 732 static int __init acerhdf_register_thermal(void)
e86435eb91b2bf Peter Feuerer 2009-06-21 733 {
e86435eb91b2bf Peter Feuerer 2009-06-21 734 cl_dev = thermal_cooling_device_register("acerhdf-fan", NULL,
e86435eb91b2bf Peter Feuerer 2009-06-21 735 &acerhdf_cooling_ops);
e86435eb91b2bf Peter Feuerer 2009-06-21 736
e86435eb91b2bf Peter Feuerer 2009-06-21 737 if (IS_ERR(cl_dev))
e86435eb91b2bf Peter Feuerer 2009-06-21 738 return -EINVAL;
e86435eb91b2bf Peter Feuerer 2009-06-21 739
7e8b6d737da9c6 Peter Feuerer 2014-11-28 740 thz_dev = thermal_zone_device_register("acerhdf", 2, 0, NULL,
48c8dd64345ba2 Peter Feuerer 2014-11-28 741 &acerhdf_dev_ops,
48c8dd64345ba2 Peter Feuerer 2014-11-28 742 &acerhdf_zone_params, 0,
e86435eb91b2bf Peter Feuerer 2009-06-21 743 (kernelmode) ? interval*1000 : 0);
e86435eb91b2bf Peter Feuerer 2009-06-21 744 if (IS_ERR(thz_dev))
e86435eb91b2bf Peter Feuerer 2009-06-21 745 return -EINVAL;
e86435eb91b2bf Peter Feuerer 2009-06-21 746
48c8dd64345ba2 Peter Feuerer 2014-11-28 @747 if (strcmp(thz_dev->governor->name,
48c8dd64345ba2 Peter Feuerer 2014-11-28 748 acerhdf_zone_params.governor_name)) {
48c8dd64345ba2 Peter Feuerer 2014-11-28 749 pr_err("Didn't get thermal governor %s, perhaps not compiled into thermal subsystem.\n",
48c8dd64345ba2 Peter Feuerer 2014-11-28 750 acerhdf_zone_params.governor_name);
48c8dd64345ba2 Peter Feuerer 2014-11-28 751 return -EINVAL;
48c8dd64345ba2 Peter Feuerer 2014-11-28 752 }
48c8dd64345ba2 Peter Feuerer 2014-11-28 753
e86435eb91b2bf Peter Feuerer 2009-06-21 754 return 0;
e86435eb91b2bf Peter Feuerer 2009-06-21 755 }
e86435eb91b2bf Peter Feuerer 2009-06-21 756
:::::: The code at line 747 was first introduced by commit
:::::: 48c8dd64345ba2a8c41556095c7adacb1c8af7c1 acerhdf: Use bang-bang thermal governor
:::::: TO: Peter Feuerer <peter(a)piie.net>
:::::: CC: Darren Hart <dvhart(a)linux.intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 11 months
Re: [PATCH v12 06/16] leds: lp50xx: Add the LP50XX family of the RGB LED driver
by kbuild test robot
Hi Dan,
I love your patch! Yet something to improve:
[auto build test ERROR on j.anaszewski-leds/for-next]
[cannot apply to v5.4-rc3 next-20191011]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Dan-Murphy/Multicolor-Framework-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git for-next
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers//leds/leds-lp50xx.c:360:27: error: initializer element is not constant
.lp50xx_regmap_config = lp5012_regmap_config,
^~~~~~~~~~~~~~~~~~~~
drivers//leds/leds-lp50xx.c:360:27: note: (near initialization for 'lp50xx_chip_info_tbl[0].lp50xx_regmap_config')
drivers//leds/leds-lp50xx.c:371:27: error: initializer element is not constant
.lp50xx_regmap_config = lp5012_regmap_config,
^~~~~~~~~~~~~~~~~~~~
drivers//leds/leds-lp50xx.c:371:27: note: (near initialization for 'lp50xx_chip_info_tbl[1].lp50xx_regmap_config')
drivers//leds/leds-lp50xx.c:382:27: error: initializer element is not constant
.lp50xx_regmap_config = lp5024_regmap_config,
^~~~~~~~~~~~~~~~~~~~
drivers//leds/leds-lp50xx.c:382:27: note: (near initialization for 'lp50xx_chip_info_tbl[2].lp50xx_regmap_config')
drivers//leds/leds-lp50xx.c:393:27: error: initializer element is not constant
.lp50xx_regmap_config = lp5024_regmap_config,
^~~~~~~~~~~~~~~~~~~~
drivers//leds/leds-lp50xx.c:393:27: note: (near initialization for 'lp50xx_chip_info_tbl[3].lp50xx_regmap_config')
drivers//leds/leds-lp50xx.c:404:27: error: initializer element is not constant
.lp50xx_regmap_config = lp5036_regmap_config,
^~~~~~~~~~~~~~~~~~~~
drivers//leds/leds-lp50xx.c:404:27: note: (near initialization for 'lp50xx_chip_info_tbl[4].lp50xx_regmap_config')
drivers//leds/leds-lp50xx.c:415:27: error: initializer element is not constant
.lp50xx_regmap_config = lp5036_regmap_config,
^~~~~~~~~~~~~~~~~~~~
drivers//leds/leds-lp50xx.c:415:27: note: (near initialization for 'lp50xx_chip_info_tbl[5].lp50xx_regmap_config')
vim +360 drivers//leds/leds-lp50xx.c
349
350 static const struct lp50xx_chip_info lp50xx_chip_info_tbl[] = {
351 [LP5009] = {
352 .model_id = LP5009,
353 .max_modules = LP5009_MAX_LED_MODULES,
354 .num_leds = LP5009_MAX_LEDS,
355 .led_brightness0_reg = LP5012_LED0_BRT,
356 .mix_out0_reg = LP5012_OUT0_CLR,
357 .bank_brt_reg = LP5012_BNK_BRT,
358 .bank_mix_reg = LP5012_BNKA_CLR,
359 .reset_reg = LP5012_RESET,
> 360 .lp50xx_regmap_config = lp5012_regmap_config,
361 },
362 [LP5012] = {
363 .model_id = LP5012,
364 .max_modules = LP5012_MAX_LED_MODULES,
365 .num_leds = LP5012_MAX_LEDS,
366 .led_brightness0_reg = LP5012_LED0_BRT,
367 .mix_out0_reg = LP5012_OUT0_CLR,
368 .bank_brt_reg = LP5012_BNK_BRT,
369 .bank_mix_reg = LP5012_BNKA_CLR,
370 .reset_reg = LP5012_RESET,
371 .lp50xx_regmap_config = lp5012_regmap_config,
372 },
373 [LP5018] = {
374 .model_id = LP5018,
375 .max_modules = LP5018_MAX_LED_MODULES,
376 .num_leds = LP5018_MAX_LEDS,
377 .led_brightness0_reg = LP5024_LED0_BRT,
378 .mix_out0_reg = LP5024_OUT0_CLR,
379 .bank_brt_reg = LP5024_BNK_BRT,
380 .bank_mix_reg = LP5024_BNKA_CLR,
381 .reset_reg = LP5024_RESET,
382 .lp50xx_regmap_config = lp5024_regmap_config,
383 },
384 [LP5024] = {
385 .model_id = LP5024,
386 .max_modules = LP5024_MAX_LED_MODULES,
387 .num_leds = LP5024_MAX_LEDS,
388 .led_brightness0_reg = LP5024_LED0_BRT,
389 .mix_out0_reg = LP5024_OUT0_CLR,
390 .bank_brt_reg = LP5024_BNK_BRT,
391 .bank_mix_reg = LP5024_BNKA_CLR,
392 .reset_reg = LP5024_RESET,
393 .lp50xx_regmap_config = lp5024_regmap_config,
394 },
395 [LP5030] = {
396 .model_id = LP5030,
397 .max_modules = LP5030_MAX_LED_MODULES,
398 .num_leds = LP5030_MAX_LEDS,
399 .led_brightness0_reg = LP5036_LED0_BRT,
400 .mix_out0_reg = LP5036_OUT0_CLR,
401 .bank_brt_reg = LP5036_BNK_BRT,
402 .bank_mix_reg = LP5036_BNKA_CLR,
403 .reset_reg = LP5036_RESET,
404 .lp50xx_regmap_config = lp5036_regmap_config,
405 },
406 [LP5036] = {
407 .model_id = LP5036,
408 .max_modules = LP5036_MAX_LED_MODULES,
409 .num_leds = LP5036_MAX_LEDS,
410 .led_brightness0_reg = LP5036_LED0_BRT,
411 .mix_out0_reg = LP5036_OUT0_CLR,
412 .bank_brt_reg = LP5036_BNK_BRT,
413 .bank_mix_reg = LP5036_BNKA_CLR,
414 .reset_reg = LP5036_RESET,
415 .lp50xx_regmap_config = lp5036_regmap_config,
416 },
417 };
418
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 11 months
[RFC PATCH] drm/bridge: anx7625: ANX_OUI[] can be static
by kbuild test robot
Fixes: 152a82b6747f ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver")
Signed-off-by: kbuild test robot <lkp(a)intel.com>
---
anx7625.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 96adf3b89d7f0..a261f4d31ea88 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -728,7 +728,7 @@ static int anx7625_dpi_config(struct anx7625_data *ctx)
return ret;
}
-const u8 ANX_OUI[3] = { 0x00, 0x22, 0xB9 };
+static const u8 ANX_OUI[3] = { 0x00, 0x22, 0xB9 };
static int is_anx_dongle(struct anx7625_data *ctx)
{
u8 buf[3];
2 years, 11 months
Re: [PATCH] mailbox: tegra: Fix superfluous IRQ error message
by kbuild test robot
Hi Jon,
I love your patch! Yet something to improve:
[auto build test ERROR on tegra/for-next]
[cannot apply to v5.4-rc3 next-20191011]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jon-Hunter/mailbox-tegra-Fix-sup...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers//mailbox/tegra-hsp.c: In function 'tegra_hsp_probe':
>> drivers//mailbox/tegra-hsp.c:660:8: error: implicit declaration of function 'platform_get_irq_byname_optional'; did you mean 'platform_get_irq_optional'? [-Werror=implicit-function-declaration]
err = platform_get_irq_byname_optional(pdev, "doorbell");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
platform_get_irq_optional
cc1: some warnings being treated as errors
vim +660 drivers//mailbox/tegra-hsp.c
630
631 static int tegra_hsp_probe(struct platform_device *pdev)
632 {
633 struct tegra_hsp *hsp;
634 struct resource *res;
635 unsigned int i;
636 u32 value;
637 int err;
638
639 hsp = devm_kzalloc(&pdev->dev, sizeof(*hsp), GFP_KERNEL);
640 if (!hsp)
641 return -ENOMEM;
642
643 hsp->dev = &pdev->dev;
644 hsp->soc = of_device_get_match_data(&pdev->dev);
645 INIT_LIST_HEAD(&hsp->doorbells);
646 spin_lock_init(&hsp->lock);
647
648 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
649 hsp->regs = devm_ioremap_resource(&pdev->dev, res);
650 if (IS_ERR(hsp->regs))
651 return PTR_ERR(hsp->regs);
652
653 value = tegra_hsp_readl(hsp, HSP_INT_DIMENSIONING);
654 hsp->num_sm = (value >> HSP_nSM_SHIFT) & HSP_nINT_MASK;
655 hsp->num_ss = (value >> HSP_nSS_SHIFT) & HSP_nINT_MASK;
656 hsp->num_as = (value >> HSP_nAS_SHIFT) & HSP_nINT_MASK;
657 hsp->num_db = (value >> HSP_nDB_SHIFT) & HSP_nINT_MASK;
658 hsp->num_si = (value >> HSP_nSI_SHIFT) & HSP_nINT_MASK;
659
> 660 err = platform_get_irq_byname_optional(pdev, "doorbell");
661 if (err >= 0)
662 hsp->doorbell_irq = err;
663
664 if (hsp->num_si > 0) {
665 unsigned int count = 0;
666
667 hsp->shared_irqs = devm_kcalloc(&pdev->dev, hsp->num_si,
668 sizeof(*hsp->shared_irqs),
669 GFP_KERNEL);
670 if (!hsp->shared_irqs)
671 return -ENOMEM;
672
673 for (i = 0; i < hsp->num_si; i++) {
674 char *name;
675
676 name = kasprintf(GFP_KERNEL, "shared%u", i);
677 if (!name)
678 return -ENOMEM;
679
680 err = platform_get_irq_byname_optional(pdev, name);
681 if (err >= 0) {
682 hsp->shared_irqs[i] = err;
683 count++;
684 }
685
686 kfree(name);
687 }
688
689 if (count == 0) {
690 devm_kfree(&pdev->dev, hsp->shared_irqs);
691 hsp->shared_irqs = NULL;
692 }
693 }
694
695 /* setup the doorbell controller */
696 hsp->mbox_db.of_xlate = tegra_hsp_db_xlate;
697 hsp->mbox_db.num_chans = 32;
698 hsp->mbox_db.dev = &pdev->dev;
699 hsp->mbox_db.ops = &tegra_hsp_db_ops;
700
701 hsp->mbox_db.chans = devm_kcalloc(&pdev->dev, hsp->mbox_db.num_chans,
702 sizeof(*hsp->mbox_db.chans),
703 GFP_KERNEL);
704 if (!hsp->mbox_db.chans)
705 return -ENOMEM;
706
707 if (hsp->doorbell_irq) {
708 err = tegra_hsp_add_doorbells(hsp);
709 if (err < 0) {
710 dev_err(&pdev->dev, "failed to add doorbells: %d\n",
711 err);
712 return err;
713 }
714 }
715
716 err = devm_mbox_controller_register(&pdev->dev, &hsp->mbox_db);
717 if (err < 0) {
718 dev_err(&pdev->dev, "failed to register doorbell mailbox: %d\n",
719 err);
720 return err;
721 }
722
723 /* setup the shared mailbox controller */
724 hsp->mbox_sm.of_xlate = tegra_hsp_sm_xlate;
725 hsp->mbox_sm.num_chans = hsp->num_sm;
726 hsp->mbox_sm.dev = &pdev->dev;
727 hsp->mbox_sm.ops = &tegra_hsp_sm_ops;
728
729 hsp->mbox_sm.chans = devm_kcalloc(&pdev->dev, hsp->mbox_sm.num_chans,
730 sizeof(*hsp->mbox_sm.chans),
731 GFP_KERNEL);
732 if (!hsp->mbox_sm.chans)
733 return -ENOMEM;
734
735 if (hsp->shared_irqs) {
736 err = tegra_hsp_add_mailboxes(hsp, &pdev->dev);
737 if (err < 0) {
738 dev_err(&pdev->dev, "failed to add mailboxes: %d\n",
739 err);
740 return err;
741 }
742 }
743
744 err = devm_mbox_controller_register(&pdev->dev, &hsp->mbox_sm);
745 if (err < 0) {
746 dev_err(&pdev->dev, "failed to register shared mailbox: %d\n",
747 err);
748 return err;
749 }
750
751 platform_set_drvdata(pdev, hsp);
752
753 if (hsp->doorbell_irq) {
754 err = devm_request_irq(&pdev->dev, hsp->doorbell_irq,
755 tegra_hsp_doorbell_irq, IRQF_NO_SUSPEND,
756 dev_name(&pdev->dev), hsp);
757 if (err < 0) {
758 dev_err(&pdev->dev,
759 "failed to request doorbell IRQ#%u: %d\n",
760 hsp->doorbell_irq, err);
761 return err;
762 }
763 }
764
765 if (hsp->shared_irqs) {
766 err = tegra_hsp_request_shared_irq(hsp);
767 if (err < 0)
768 return err;
769 }
770
771 return 0;
772 }
773
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 11 months
Re: [PATCH 11/11] thermal: Move thermal governor structure to internal header
by kbuild test robot
Hi Daniel,
I love your patch! Yet something to improve:
[auto build test ERROR on soc-thermal/next]
[cannot apply to v5.4-rc3 next-20191011]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Daniel-Lezcano/thermal-Move-defa...
base: https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-therma... next
config: x86_64-rhel (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/platform/x86/acerhdf.c: In function 'acerhdf_register_thermal':
>> drivers/platform/x86/acerhdf.c:747:30: error: dereferencing pointer to incomplete type 'struct thermal_governor'
if (strcmp(thz_dev->governor->name,
^~
vim +747 drivers/platform/x86/acerhdf.c
e86435eb91b2bf Peter Feuerer 2009-06-21 731
1d0c3fd01afbd5 Paul Gortmaker 2018-09-20 732 static int __init acerhdf_register_thermal(void)
e86435eb91b2bf Peter Feuerer 2009-06-21 733 {
e86435eb91b2bf Peter Feuerer 2009-06-21 734 cl_dev = thermal_cooling_device_register("acerhdf-fan", NULL,
e86435eb91b2bf Peter Feuerer 2009-06-21 735 &acerhdf_cooling_ops);
e86435eb91b2bf Peter Feuerer 2009-06-21 736
e86435eb91b2bf Peter Feuerer 2009-06-21 737 if (IS_ERR(cl_dev))
e86435eb91b2bf Peter Feuerer 2009-06-21 738 return -EINVAL;
e86435eb91b2bf Peter Feuerer 2009-06-21 739
7e8b6d737da9c6 Peter Feuerer 2014-11-28 740 thz_dev = thermal_zone_device_register("acerhdf", 2, 0, NULL,
48c8dd64345ba2 Peter Feuerer 2014-11-28 741 &acerhdf_dev_ops,
48c8dd64345ba2 Peter Feuerer 2014-11-28 742 &acerhdf_zone_params, 0,
e86435eb91b2bf Peter Feuerer 2009-06-21 743 (kernelmode) ? interval*1000 : 0);
e86435eb91b2bf Peter Feuerer 2009-06-21 744 if (IS_ERR(thz_dev))
e86435eb91b2bf Peter Feuerer 2009-06-21 745 return -EINVAL;
e86435eb91b2bf Peter Feuerer 2009-06-21 746
48c8dd64345ba2 Peter Feuerer 2014-11-28 @747 if (strcmp(thz_dev->governor->name,
48c8dd64345ba2 Peter Feuerer 2014-11-28 748 acerhdf_zone_params.governor_name)) {
48c8dd64345ba2 Peter Feuerer 2014-11-28 749 pr_err("Didn't get thermal governor %s, perhaps not compiled into thermal subsystem.\n",
48c8dd64345ba2 Peter Feuerer 2014-11-28 750 acerhdf_zone_params.governor_name);
48c8dd64345ba2 Peter Feuerer 2014-11-28 751 return -EINVAL;
48c8dd64345ba2 Peter Feuerer 2014-11-28 752 }
48c8dd64345ba2 Peter Feuerer 2014-11-28 753
e86435eb91b2bf Peter Feuerer 2009-06-21 754 return 0;
e86435eb91b2bf Peter Feuerer 2009-06-21 755 }
e86435eb91b2bf Peter Feuerer 2009-06-21 756
:::::: The code at line 747 was first introduced by commit
:::::: 48c8dd64345ba2a8c41556095c7adacb1c8af7c1 acerhdf: Use bang-bang thermal governor
:::::: TO: Peter Feuerer <peter(a)piie.net>
:::::: CC: Darren Hart <dvhart(a)linux.intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 11 months
Re: [PATCH v5 1/2] HID: logitech: Add MX Master over Bluetooth
by Benjamin Tissoires
Hey,
On Mon, Oct 14, 2019 at 6:35 AM Mazin Rezk <mnrzk(a)protonmail.com> wrote:
>
> On Sunday, October 13, 2019 9:28 PM, kbuild test robot <lkp(a)intel.com> wrote:
>
> > Hi Mazin,
> >
> > Thank you for the patch! Perhaps something to improve:
> >
> > [auto build test WARNING on linus/master]
> > [cannot apply to v5.4-rc2 next-20191010]
> > [if your patch is applied to the wrong git tree, please drop us a note to help
> > improve the system. BTW, we also suggest to use '--base' option to specify the
> > base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
> >
> > url: https://github.com/0day-ci/linux/commits/Mazin-Rezk/HID-logitech-Add-MX-M...
> > config: mips-allmodconfig (attached as .config)
> > compiler: mips-linux-gcc (GCC) 7.4.0
> > reproduce:
> > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > # save the attached .config to linux build tree
> > GCC_VERSION=7.4.0 make.cross ARCH=mips
> >
> > If you fix the issue, kindly add following tag
> > Reported-by: kbuild test robot lkp(a)intel.com
> >
> > All warnings (new ones prefixed by >>):
> >
> > In file included from include/linux/ioport.h:15:0,
> > from include/linux/device.h:15,
> > from drivers/hid/hid-logitech-hidpp.c:13:
> > drivers/hid/hid-logitech-hidpp.c: In function 'hidpp_send_rap_command_sync':
> >
> > > > include/linux/bits.h:8:26: warning: left shift count >= width of type [-Wshift-count-overflow]
> >
> > #define BIT(nr) (UL(1) << (nr))
> > ^
> >
> >
> > > > drivers/hid/hid-logitech-hidpp.c:74:43: note: in expansion of macro 'BIT'
> >
> > #define HIDPP_QUIRK_MISSING_SHORT_REPORTS BIT(32)
> > ^~~
> >
> >
> > > > drivers/hid/hid-logitech-hidpp.c:347:26: note: in expansion of macro 'HIDPP_QUIRK_MISSING_SHORT_REPORTS'
> >
> > if (hidpp_dev->quirks & HIDPP_QUIRK_MISSING_SHORT_REPORTS &&
> >
> > ^
> >
> >
> > drivers/hid/hid-logitech-hidpp.c: In function 'hidpp_validate_device':
> >
> > > > include/linux/bits.h:8:26: warning: left shift count >= width of type [-Wshift-count-overflow]
> >
> > #define BIT(nr) (UL(1) << (nr))
> > ^
> >
> >
> > > > drivers/hid/hid-logitech-hidpp.c:74:43: note: in expansion of macro 'BIT'
> >
> > #define HIDPP_QUIRK_MISSING_SHORT_REPORTS BIT(32)
> > ^~~
> >
> >
> > drivers/hid/hid-logitech-hidpp.c:3496:22: note: in expansion of macro 'HIDPP_QUIRK_MISSING_SHORT_REPORTS'
> > if (hidpp->quirks & HIDPP_QUIRK_MISSING_SHORT_REPORTS)
> >
> > ^
> >
> >
> > drivers/hid/hid-logitech-hidpp.c: At top level:
> >
> > > > include/linux/bits.h:8:26: warning: left shift count >= width of type [-Wshift-count-overflow]
> >
> > #define BIT(nr) (UL(1) << (nr))
> > ^
> >
> >
> > > > drivers/hid/hid-logitech-hidpp.c:74:43: note: in expansion of macro 'BIT'
> >
> > #define HIDPP_QUIRK_MISSING_SHORT_REPORTS BIT(32)
> > ^~~
> >
> >
> > drivers/hid/hid-logitech-hidpp.c:85:40: note: in expansion of macro 'HIDPP_QUIRK_MISSING_SHORT_REPORTS'
> > #define HIDPP_QUIRK_CLASS_BLUETOOTH_LE HIDPP_QUIRK_MISSING_SHORT_REPORTS
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > > > drivers/hid/hid-logitech-hidpp.c:3794:5: note: in expansion of macro 'HIDPP_QUIRK_CLASS_BLUETOOTH_LE'
> >
> > HIDPP_QUIRK_CLASS_BLUETOOTH_LE },
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
> > > > include/linux/bits.h:8:26: warning: left shift count >= width of type [-Wshift-count-overflow]
> >
> > #define BIT(nr) (UL(1) << (nr))
> > ^
> >
> >
> > > > drivers/hid/hid-logitech-hidpp.c:74:43: note: in expansion of macro 'BIT'
> >
> > #define HIDPP_QUIRK_MISSING_SHORT_REPORTS BIT(32)
> > ^~~
> >
> >
> > drivers/hid/hid-logitech-hidpp.c:85:40: note: in expansion of macro 'HIDPP_QUIRK_MISSING_SHORT_REPORTS'
> > #define HIDPP_QUIRK_CLASS_BLUETOOTH_LE HIDPP_QUIRK_MISSING_SHORT_REPORTS
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/hid/hid-logitech-hidpp.c:3797:5: note: in expansion of macro 'HIDPP_QUIRK_CLASS_BLUETOOTH_LE'
> > HIDPP_QUIRK_CLASS_BLUETOOTH_LE },
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> >
> > In file included from include/linux/ioport.h:15:0,
> > from include/linux/device.h:15,
> > from drivers//hid/hid-logitech-hidpp.c:13:
> > drivers//hid/hid-logitech-hidpp.c: In function 'hidpp_send_rap_command_sync':
> >
> > > > include/linux/bits.h:8:26: warning: left shift count >= width of type [-Wshift-count-overflow]
> >
> > #define BIT(nr) (UL(1) << (nr))
> > ^
> >
> >
> > drivers//hid/hid-logitech-hidpp.c:74:43: note: in expansion of macro 'BIT'
> > #define HIDPP_QUIRK_MISSING_SHORT_REPORTS BIT(32)
> > ^~~
> > drivers//hid/hid-logitech-hidpp.c:347:26: note: in expansion of macro 'HIDPP_QUIRK_MISSING_SHORT_REPORTS'
> > if (hidpp_dev->quirks & HIDPP_QUIRK_MISSING_SHORT_REPORTS &&
> >
> > ^
> >
> >
> > drivers//hid/hid-logitech-hidpp.c: In function 'hidpp_validate_device':
> >
> > > > include/linux/bits.h:8:26: warning: left shift count >= width of type [-Wshift-count-overflow]
> >
> > #define BIT(nr) (UL(1) << (nr))
> > ^
> >
> >
> > drivers//hid/hid-logitech-hidpp.c:74:43: note: in expansion of macro 'BIT'
> > #define HIDPP_QUIRK_MISSING_SHORT_REPORTS BIT(32)
> > ^~~
> > drivers//hid/hid-logitech-hidpp.c:3496:22: note: in expansion of macro 'HIDPP_QUIRK_MISSING_SHORT_REPORTS'
> > if (hidpp->quirks & HIDPP_QUIRK_MISSING_SHORT_REPORTS)
> >
> > ^
> >
> >
> > drivers//hid/hid-logitech-hidpp.c: At top level:
> >
> > > > include/linux/bits.h:8:26: warning: left shift count >= width of type [-Wshift-count-overflow]
> >
> > #define BIT(nr) (UL(1) << (nr))
> > ^
> >
> >
> > drivers//hid/hid-logitech-hidpp.c:74:43: note: in expansion of macro 'BIT'
> > #define HIDPP_QUIRK_MISSING_SHORT_REPORTS BIT(32)
> > ^~~
> > drivers//hid/hid-logitech-hidpp.c:85:40: note: in expansion of macro 'HIDPP_QUIRK_MISSING_SHORT_REPORTS'
> > #define HIDPP_QUIRK_CLASS_BLUETOOTH_LE HIDPP_QUIRK_MISSING_SHORT_REPORTS
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers//hid/hid-logitech-hidpp.c:3794:5: note: in expansion of macro 'HIDPP_QUIRK_CLASS_BLUETOOTH_LE'
> > HIDPP_QUIRK_CLASS_BLUETOOTH_LE },
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > > > include/linux/bits.h:8:26: warning: left shift count >= width of type [-Wshift-count-overflow]
> >
> > #define BIT(nr) (UL(1) << (nr))
> > ^
> >
> >
> > drivers//hid/hid-logitech-hidpp.c:74:43: note: in expansion of macro 'BIT'
> > #define HIDPP_QUIRK_MISSING_SHORT_REPORTS BIT(32)
> > ^~~
> > drivers//hid/hid-logitech-hidpp.c:85:40: note: in expansion of macro 'HIDPP_QUIRK_MISSING_SHORT_REPORTS'
> > #define HIDPP_QUIRK_CLASS_BLUETOOTH_LE HIDPP_QUIRK_MISSING_SHORT_REPORTS
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers//hid/hid-logitech-hidpp.c:3797:5: note: in expansion of macro 'HIDPP_QUIRK_CLASS_BLUETOOTH_LE'
> > HIDPP_QUIRK_CLASS_BLUETOOTH_LE },
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > vim +/BIT +74 drivers/hid/hid-logitech-hidpp.c
> >
> > 12
> >
> > > 13 #include <linux/device.h>
> >
> > 14 #include <linux/input.h>
> >
> > 15 #include <linux/usb.h>
> >
> > 16 #include <linux/hid.h>
> >
> > 17 #include <linux/module.h>
> >
> > 18 #include <linux/slab.h>
> >
> > 19 #include <linux/sched.h>
> >
> > 20 #include <linux/sched/clock.h>
> >
> > 21 #include <linux/kfifo.h>
> >
> > 22 #include <linux/input/mt.h>
> >
> > 23 #include <linux/workqueue.h>
> >
> > 24 #include <linux/atomic.h>
> >
> > 25 #include <linux/fixp-arith.h>
> >
> > 26 #include <asm/unaligned.h>
> >
> > 27 #include "usbhid/usbhid.h"
> > 28 #include "hid-ids.h"
> > 29
> > 30 MODULE_LICENSE("GPL");
> > 31 MODULE_AUTHOR("Benjamin Tissoires <benjamin.tissoires(a)gmail.com>");
> >
> > 32 MODULE_AUTHOR("Nestor Lopez Casado <nlopezcasad(a)logitech.com>");
> >
> > 33
> > 34 static bool disable_raw_mode;
> > 35 module_param(disable_raw_mode, bool, 0644);
> > 36 MODULE_PARM_DESC(disable_raw_mode,
> > 37 "Disable Raw mode reporting for touchpads and keep firmware gestures.");
> > 38
> > 39 static bool disable_tap_to_click;
> > 40 module_param(disable_tap_to_click, bool, 0644);
> > 41 MODULE_PARM_DESC(disable_tap_to_click,
> > 42 "Disable Tap-To-Click mode reporting for touchpads (only on the K400 currently).");
> > 43
> > 44 #define REPORT_ID_HIDPP_SHORT 0x10
> > 45 #define REPORT_ID_HIDPP_LONG 0x11
> > 46 #define REPORT_ID_HIDPP_VERY_LONG 0x12
> > 47
> > 48 #define HIDPP_REPORT_SHORT_LENGTH 7
> > 49 #define HIDPP_REPORT_LONG_LENGTH 20
> > 50 #define HIDPP_REPORT_VERY_LONG_MAX_LENGTH 64
> > 51
> > 52 #define HIDPP_SUB_ID_CONSUMER_VENDOR_KEYS 0x03
> > 53 #define HIDPP_SUB_ID_ROLLER 0x05
> > 54 #define HIDPP_SUB_ID_MOUSE_EXTRA_BTNS 0x06
> > 55
> > 56 #define HIDPP_QUIRK_CLASS_WTP BIT(0)
> > 57 #define HIDPP_QUIRK_CLASS_M560 BIT(1)
> > 58 #define HIDPP_QUIRK_CLASS_K400 BIT(2)
> > 59 #define HIDPP_QUIRK_CLASS_G920 BIT(3)
> > 60 #define HIDPP_QUIRK_CLASS_K750 BIT(4)
> > 61
> > 62 /* bits 2..20 are reserved for classes */
> > 63 /* #define HIDPP_QUIRK_CONNECT_EVENTS BIT(21) disabled */
> > 64 #define HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS BIT(22)
> > 65 #define HIDPP_QUIRK_NO_HIDINPUT BIT(23)
> > 66 #define HIDPP_QUIRK_FORCE_OUTPUT_REPORTS BIT(24)
> > 67 #define HIDPP_QUIRK_UNIFYING BIT(25)
> > 68 #define HIDPP_QUIRK_HI_RES_SCROLL_1P0 BIT(26)
> > 69 #define HIDPP_QUIRK_HI_RES_SCROLL_X2120 BIT(27)
> > 70 #define HIDPP_QUIRK_HI_RES_SCROLL_X2121 BIT(28)
> > 71 #define HIDPP_QUIRK_HIDPP_WHEELS BIT(29)
> > 72 #define HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS BIT(30)
> > 73 #define HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS BIT(31)
> >
> >
> > > 74 #define HIDPP_QUIRK_MISSING_SHORT_REPORTS BIT(32)
> >
> > 75
> >
> >
> > --
> >
> > 0-DAY kernel test infrastructure Open Source Technology Center
> > https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
>
> It seems that I overlooked that quirks is an unsigned long and is 32-bit
> on some architectures. I feel like it's possible to change driver_data
> and quirks to unsigned long long but it seems like such an unnecessarily
> large change.
Yep, which is why I told you to use 0x20 and 0x1f :)
>
> Since we've already reached the 32-bit limit for quirks, is it possible
> that we could change how many bits are reserved for classes?
yes, we can simply change the reserved range, this is just a comment after all.
>
> Also, could bit 21 be reused for HIDPP_QUIRK_MISSING_SHORT_REPORTS?
unfortunately no. This is theoretically kernel API, as you can have a
script that binds a driver and sets a custom quirk for it (by writing
to the sysfs new_id). So if one is marked as "reserved", resuing it
might break someone's device though really unlikely.
I'd rather shrink the number of classes than reusing one quirk already used.
Cheers,
Benjamin
2 years, 11 months
Re: [PATCH v12 04/16] leds: multicolor: Introduce a multicolor class definition
by kbuild test robot
Hi Dan,
I love your patch! Yet something to improve:
[auto build test ERROR on j.anaszewski-leds/for-next]
[cannot apply to v5.4-rc3 next-20191011]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Dan-Murphy/Multicolor-Framework-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git for-next
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers//leds/led-class-multicolor.c:17:5: error: redefinition of 'led_mc_calc_color_components'
int led_mc_calc_color_components(struct led_classdev_mc *mcled_cdev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers//leds/led-class-multicolor.c:7:0:
include/linux/led-class-multicolor.h:119:19: note: previous definition of 'led_mc_calc_color_components' was here
static inline int led_mc_calc_color_components(struct led_classdev_mc *mcled_cdev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers//leds/led-class-multicolor.c:182:5: error: redefinition of 'led_classdev_multicolor_register_ext'
int led_classdev_multicolor_register_ext(struct device *parent,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers//leds/led-class-multicolor.c:7:0:
include/linux/led-class-multicolor.h:104:19: note: previous definition of 'led_classdev_multicolor_register_ext' was here
static inline int led_classdev_multicolor_register_ext(struct device *parent,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers//leds/led-class-multicolor.c:204:6: error: redefinition of 'led_classdev_multicolor_unregister'
void led_classdev_multicolor_unregister(struct led_classdev_mc *mcled_cdev)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers//leds/led-class-multicolor.c:7:0:
include/linux/led-class-multicolor.h:117:20: note: previous definition of 'led_classdev_multicolor_unregister' was here
static inline void led_classdev_multicolor_unregister(struct led_classdev_mc *mcled_cdev) {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers//leds/led-class-multicolor.c:224:5: error: redefinition of 'devm_led_classdev_multicolor_register_ext'
int devm_led_classdev_multicolor_register_ext(struct device *parent,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers//leds/led-class-multicolor.c:7:0:
include/linux/led-class-multicolor.h:126:19: note: previous definition of 'devm_led_classdev_multicolor_register_ext' was here
static inline int devm_led_classdev_multicolor_register_ext(struct device *parent,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers//leds/led-class-multicolor.c:260:6: error: redefinition of 'devm_led_classdev_multicolor_unregister'
void devm_led_classdev_multicolor_unregister(struct device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers//leds/led-class-multicolor.c:7:0:
include/linux/led-class-multicolor.h:139:20: note: previous definition of 'devm_led_classdev_multicolor_unregister' was here
static inline void devm_led_classdev_multicolor_unregister(struct device *parent,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/led_mc_calc_color_components +17 drivers//leds/led-class-multicolor.c
16
> 17 int led_mc_calc_color_components(struct led_classdev_mc *mcled_cdev,
18 enum led_brightness brightness,
19 struct led_mc_color_conversion color_component[])
20 {
21 struct led_mc_color_entry *priv;
22 int i = 0;
23
24 list_for_each_entry(priv, &mcled_cdev->color_list, list) {
25 color_component[i].color_id = priv->led_color_id;
26 color_component[i].brightness = brightness *
27 priv->intensity / priv->max_intensity;
28 i++;
29 }
30
31 return 0;
32 }
33 EXPORT_SYMBOL_GPL(led_mc_calc_color_components);
34
35 static ssize_t intensity_store(struct device *dev,
36 struct device_attribute *intensity_attr,
37 const char *buf, size_t size)
38 {
39 struct led_mc_color_entry *priv = container_of(intensity_attr,
40 struct led_mc_color_entry,
41 intensity_attr);
42 struct led_classdev *led_cdev = priv->mcled_cdev->led_cdev;
43 unsigned long value;
44 ssize_t ret;
45
46 mutex_lock(&led_cdev->led_access);
47
48 ret = kstrtoul(buf, 10, &value);
49 if (ret)
50 goto unlock;
51
52 if (value > priv->max_intensity) {
53 ret = -EINVAL;
54 goto unlock;
55 }
56
57 priv->intensity = value;
58 ret = size;
59
60 unlock:
61 mutex_unlock(&led_cdev->led_access);
62 return ret;
63 }
64
65 static ssize_t intensity_show(struct device *dev,
66 struct device_attribute *intensity_attr,
67 char *buf)
68 {
69 struct led_mc_color_entry *priv = container_of(intensity_attr,
70 struct led_mc_color_entry,
71 intensity_attr);
72
73 return sprintf(buf, "%d\n", priv->intensity);
74 }
75
76 static ssize_t max_intensity_show(struct device *dev,
77 struct device_attribute *max_intensity_attr,
78 char *buf)
79 {
80 struct led_mc_color_entry *priv = container_of(max_intensity_attr,
81 struct led_mc_color_entry,
82 max_intensity_attr);
83
84 return sprintf(buf, "%d\n", priv->max_intensity);
85 }
86
87 static struct attribute *led_color_attrs[] = {
88 NULL,
89 };
90
91 static struct attribute_group led_color_group = {
92 .name = "colors",
93 .attrs = led_color_attrs,
94 };
95
96 static int led_multicolor_init_color(struct led_classdev_mc *mcled_cdev,
97 int color_id)
98 {
99 struct led_classdev *led_cdev = mcled_cdev->led_cdev;
100 struct led_mc_color_entry *mc_priv;
101 char *intensity_file_name;
102 char *max_intensity_file_name;
103 size_t len;
104 int ret;
105
106 mc_priv = devm_kzalloc(led_cdev->dev, sizeof(*mc_priv), GFP_KERNEL);
107 if (!mc_priv)
108 return -ENOMEM;
109
110 mc_priv->led_color_id = color_id;
111 mc_priv->mcled_cdev = mcled_cdev;
112
113 sysfs_attr_init(&mc_priv->intensity_attr.attr);
114 len = strlen(led_colors[color_id]) + strlen(INTENSITY_NAME) + 1;
115 intensity_file_name = kzalloc(len, GFP_KERNEL);
116 if (!intensity_file_name)
117 return -ENOMEM;
118
119 snprintf(intensity_file_name, len, "%s%s",
120 led_colors[color_id], INTENSITY_NAME);
121 mc_priv->intensity_attr.attr.name = intensity_file_name;
122 mc_priv->intensity_attr.attr.mode = 0644;
123 mc_priv->intensity_attr.store = intensity_store;
124 mc_priv->intensity_attr.show = intensity_show;
125 ret = sysfs_add_file_to_group(&led_cdev->dev->kobj,
126 &mc_priv->intensity_attr.attr,
127 led_color_group.name);
128 if (ret)
129 goto intensity_err_out;
130
131 sysfs_attr_init(&mc_priv->max_intensity_attr.attr);
132 len = strlen(led_colors[color_id]) + strlen(MAX_INTENSITY_NAME) + 1;
133 max_intensity_file_name = kzalloc(len, GFP_KERNEL);
134 if (!max_intensity_file_name) {
135 ret = -ENOMEM;
136 goto intensity_err_out;
137 }
138
139 snprintf(max_intensity_file_name, len, "%s%s",
140 led_colors[color_id], MAX_INTENSITY_NAME);
141 mc_priv->max_intensity_attr.attr.name = max_intensity_file_name;
142 mc_priv->max_intensity_attr.attr.mode = 0444;
143 mc_priv->max_intensity_attr.show = max_intensity_show;
144 ret = sysfs_add_file_to_group(&led_cdev->dev->kobj,
145 &mc_priv->max_intensity_attr.attr,
146 led_color_group.name);
147 if (ret)
148 goto max_intensity_err_out;
149
150 mc_priv->max_intensity = LED_FULL;
151 list_add_tail(&mc_priv->list, &mcled_cdev->color_list);
152
153 max_intensity_err_out:
154 kfree(max_intensity_file_name);
155 intensity_err_out:
156 kfree(intensity_file_name);
157 return ret;
158 }
159
160 static int led_multicolor_init_color_dir(struct led_classdev_mc *mcled_cdev)
161 {
162 struct led_classdev *led_cdev = mcled_cdev->led_cdev;
163 int ret;
164 int i;
165
166 ret = sysfs_create_group(&led_cdev->dev->kobj, &led_color_group);
167 if (ret)
168 return ret;
169
170 for (i = 0; i < LED_COLOR_ID_MAX; i++) {
171 if (test_bit(i, &mcled_cdev->available_colors)) {
172 ret = led_multicolor_init_color(mcled_cdev, i);
173 if (ret)
174 break;
175
176 }
177 }
178
179 return ret;
180 }
181
> 182 int led_classdev_multicolor_register_ext(struct device *parent,
183 struct led_classdev_mc *mcled_cdev,
184 struct led_init_data *init_data)
185 {
186 struct led_classdev *led_cdev;
187 int ret;
188
189 if (!mcled_cdev)
190 return -EINVAL;
191
192 led_cdev = mcled_cdev->led_cdev;
193 INIT_LIST_HEAD(&mcled_cdev->color_list);
194
195 /* Register led class device */
196 ret = led_classdev_register_ext(parent, led_cdev, init_data);
197 if (ret)
198 return ret;
199
200 return led_multicolor_init_color_dir(mcled_cdev);
201 }
202 EXPORT_SYMBOL_GPL(led_classdev_multicolor_register_ext);
203
> 204 void led_classdev_multicolor_unregister(struct led_classdev_mc *mcled_cdev)
205 {
206 struct led_mc_color_entry *priv, *next;
207
208 if (!mcled_cdev)
209 return;
210
211 list_for_each_entry_safe(priv, next, &mcled_cdev->color_list, list)
212 list_del(&priv->list);
213
214 sysfs_remove_group(&mcled_cdev->led_cdev->dev->kobj, &led_color_group);
215 led_classdev_unregister(mcled_cdev->led_cdev);
216 }
217 EXPORT_SYMBOL_GPL(led_classdev_multicolor_unregister);
218
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 11 months