drivers/video/fbdev/controlfb.c:373:13: warning: variable 'b' set but not used
by kernel test robot
Hi Bartlomiej,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc80c51fd4b23ec007e88d4c688f2cac1b8648e7
commit: a07a63b0e24dd1316d11427601a9f83dc955bb40 video: fbdev: controlfb: add COMPILE_TEST support
date: 4 months ago
config: nds32-randconfig-r031-20200810 (attached as .config)
compiler: nds32le-linux-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 checkout a07a63b0e24dd1316d11427601a9f83dc955bb40
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
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 >>):
In file included from ./arch/nds32/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/nds32/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/video/fbdev/controlfb.c:34:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/nds32/include/asm/memory.h:82:32: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
82 | #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
| ^~
include/asm-generic/bug.h:139:27: note: in definition of macro 'WARN_ON_ONCE'
139 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
drivers/video/fbdev/controlfb.c: In function 'controlfb_setcolreg':
>> drivers/video/fbdev/controlfb.c:373:13: warning: variable 'b' set but not used [-Wunused-but-set-variable]
373 | __u8 r, g, b;
| ^
>> drivers/video/fbdev/controlfb.c:373:10: warning: variable 'g' set but not used [-Wunused-but-set-variable]
373 | __u8 r, g, b;
| ^
>> drivers/video/fbdev/controlfb.c:373:7: warning: variable 'r' set but not used [-Wunused-but-set-variable]
373 | __u8 r, g, b;
| ^
drivers/video/fbdev/controlfb.c: In function 'control_set_hardware':
>> drivers/video/fbdev/controlfb.c:505:11: warning: variable 'cmode' set but not used [-Wunused-but-set-variable]
505 | int i, cmode;
| ^~~~~
vim +/b +373 drivers/video/fbdev/controlfb.c
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 367
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 368 static int controlfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 369 u_int transp, struct fb_info *info)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 370 {
c4e423239ca7cbc drivers/video/fbdev/controlfb.c Fabian Frederick 2014-09-17 371 struct fb_info_control *p =
c4e423239ca7cbc drivers/video/fbdev/controlfb.c Fabian Frederick 2014-09-17 372 container_of(info, struct fb_info_control, info);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 @373 __u8 r, g, b;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 374
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 375 if (regno > 255)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 376 return 1;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 377
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 378 r = red >> 8;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 379 g = green >> 8;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 380 b = blue >> 8;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 381
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 382 out_8(&p->cmap_regs->addr, regno); /* tell clut what addr to fill */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 383 out_8(&p->cmap_regs->lut, r); /* send one color channel at */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 384 out_8(&p->cmap_regs->lut, g); /* a time... */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 385 out_8(&p->cmap_regs->lut, b);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 386
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 387 if (regno < 16) {
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 388 int i;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 389 switch (p->par.cmode) {
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 390 case CMODE_16:
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 391 p->pseudo_palette[regno] =
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 392 (regno << 10) | (regno << 5) | regno;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 393 break;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 394 case CMODE_32:
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 395 i = (regno << 8) | regno;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 396 p->pseudo_palette[regno] = (i << 16) | i;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 397 break;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 398 }
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 399 }
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 400
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 401 return 0;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 402 }
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 403
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 404
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 405 /******************** End of controlfb_ops implementation ******************/
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 406
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 407
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 408
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 409 static void set_control_clock(unsigned char *params)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 410 {
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 411 #ifdef CONFIG_ADB_CUDA
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 412 struct adb_request req;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 413 int i;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 414
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 415 for (i = 0; i < 3; ++i) {
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 416 cuda_request(&req, NULL, 5, CUDA_PACKET, CUDA_GET_SET_IIC,
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 417 0x50, i + 1, params[i]);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 418 while (!req.complete)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 419 cuda_poll();
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 420 }
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 421 #endif
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 422 }
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 423
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 424
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 425 /*
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 426 * finish off the driver initialization and register
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 427 */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 428 static int __init init_control(struct fb_info_control *p)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 429 {
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 430 int full, sense, vmode, cmode, vyres;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 431 struct fb_var_screeninfo var;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 432 int rc;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 433
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 434 printk(KERN_INFO "controlfb: ");
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 435
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 436 full = p->total_vram == 0x400000;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 437
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 438 /* Try to pick a video mode out of NVRAM if we have one. */
066ac5c3c4bb467 drivers/video/fbdev/controlfb.c Finn Thain 2019-01-15 439 cmode = default_cmode;
066ac5c3c4bb467 drivers/video/fbdev/controlfb.c Finn Thain 2019-01-15 440 if (IS_REACHABLE(CONFIG_NVRAM) && cmode == CMODE_NVRAM)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 441 cmode = nvram_read_byte(NV_CMODE);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 442 if (cmode < CMODE_8 || cmode > CMODE_32)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 443 cmode = CMODE_8;
066ac5c3c4bb467 drivers/video/fbdev/controlfb.c Finn Thain 2019-01-15 444
066ac5c3c4bb467 drivers/video/fbdev/controlfb.c Finn Thain 2019-01-15 445 vmode = default_vmode;
066ac5c3c4bb467 drivers/video/fbdev/controlfb.c Finn Thain 2019-01-15 446 if (IS_REACHABLE(CONFIG_NVRAM) && vmode == VMODE_NVRAM)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 447 vmode = nvram_read_byte(NV_VMODE);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 448 if (vmode < 1 || vmode > VMODE_MAX ||
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 449 control_mac_modes[vmode - 1].m[full] < cmode) {
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 450 sense = read_control_sense(p);
066ac5c3c4bb467 drivers/video/fbdev/controlfb.c Finn Thain 2019-01-15 451 printk(KERN_CONT "Monitor sense value = 0x%x, ", sense);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 452 vmode = mac_map_monitor_sense(sense);
066ac5c3c4bb467 drivers/video/fbdev/controlfb.c Finn Thain 2019-01-15 453 if (control_mac_modes[vmode - 1].m[full] < 0)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 454 vmode = VMODE_640_480_60;
066ac5c3c4bb467 drivers/video/fbdev/controlfb.c Finn Thain 2019-01-15 455 cmode = min(cmode, control_mac_modes[vmode - 1].m[full]);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 456 }
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 457
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 458 /* Initialize info structure */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 459 control_init_info(&p->info, p);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 460
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 461 /* Setup default var */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 462 if (mac_vmode_to_var(vmode, cmode, &var) < 0) {
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 463 /* This shouldn't happen! */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 464 printk("mac_vmode_to_var(%d, %d,) failed\n", vmode, cmode);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 465 try_again:
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 466 vmode = VMODE_640_480_60;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 467 cmode = CMODE_8;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 468 if (mac_vmode_to_var(vmode, cmode, &var) < 0) {
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 469 printk(KERN_ERR "controlfb: mac_vmode_to_var() failed\n");
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 470 return -ENXIO;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 471 }
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 472 printk(KERN_INFO "controlfb: ");
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 473 }
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 474 printk("using video mode %d and color mode %d.\n", vmode, cmode);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 475
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 476 vyres = (p->total_vram - CTRLFB_OFF) / (var.xres << cmode);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 477 if (vyres > var.yres)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 478 var.yres_virtual = vyres;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 479
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 480 /* Apply default var */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 481 var.activate = FB_ACTIVATE_NOW;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 482 rc = fb_set_var(&p->info, &var);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 483 if (rc && (vmode != VMODE_640_480_60 || cmode != CMODE_8))
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 484 goto try_again;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 485
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 486 /* Register with fbdev layer */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 487 if (register_framebuffer(&p->info) < 0)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 488 return -ENXIO;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 489
31b6780c15a4e3a drivers/video/controlfb.c Joe Perches 2013-09-19 490 fb_info(&p->info, "control display adapter\n");
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 491
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 492 return 0;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 493 }
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 494
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 495 #define RADACAL_WRITE(a,d) \
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 496 out_8(&p->cmap_regs->addr, (a)); \
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 497 out_8(&p->cmap_regs->dat, (d))
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 498
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 499 /* Now how about actually saying, Make it so! */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 500 /* Some things in here probably don't need to be done each time. */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 501 static void control_set_hardware(struct fb_info_control *p, struct fb_par_control *par)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 502 {
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 503 struct control_regvals *r;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 504 volatile struct preg __iomem *rp;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 @505 int i, cmode;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 506
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 507 if (PAR_EQUAL(&p->par, par)) {
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 508 /*
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 509 * check if only xoffset or yoffset differs.
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 510 * this prevents flickers in typical VT switch case.
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 511 */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 512 if (p->par.xoffset != par->xoffset ||
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 513 p->par.yoffset != par->yoffset)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 514 set_screen_start(par->xoffset, par->yoffset, p);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 515
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 516 return;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 517 }
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 518
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 519 p->par = *par;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 520 cmode = p->par.cmode;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 521 r = &par->regvals;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 522
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 523 /* Turn off display */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 524 out_le32(CNTRL_REG(p,ctrl), 0x400 | par->ctrl);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 525
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 526 set_control_clock(r->clock_params);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 527
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 528 RADACAL_WRITE(0x20, r->radacal_ctrl);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 529 RADACAL_WRITE(0x21, p->control_use_bank2 ? 0 : 1);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 530 RADACAL_WRITE(0x10, 0);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 531 RADACAL_WRITE(0x11, 0);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 532
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 533 rp = &p->control_regs->vswin;
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 534 for (i = 0; i < 16; ++i, ++rp)
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 535 out_le32(&rp->r, r->regs[i]);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 536
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 537 out_le32(CNTRL_REG(p,pitch), par->pitch);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 538 out_le32(CNTRL_REG(p,mode), r->mode);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 539 out_le32(CNTRL_REG(p,vram_attr), p->vram_attr);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 540 out_le32(CNTRL_REG(p,start_addr), par->yoffset * par->pitch
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 541 + (par->xoffset << cmode));
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 542 out_le32(CNTRL_REG(p,rfrcnt), 0x1e5);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 543 out_le32(CNTRL_REG(p,intr_ena), 0);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 544
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 545 /* Turn on display */
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 546 out_le32(CNTRL_REG(p,ctrl), par->ctrl);
^1da177e4c3f415 drivers/video/controlfb.c Linus Torvalds 2005-04-16 547
:::::: The code at line 373 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/misc/habanalabs/gaudi/gaudi.c:902 _gaudi_init_tpc_mem() warn: should 'cb->id << (12)' be a 64 bit
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc80c51fd4b23ec007e88d4c688f2cac1b8648e7
commit: ac0ae6a96aa58eeba4aed97b12ef1dea8c5bf399 habanalabs: add gaudi asic-dependent code
date: 3 months ago
config: riscv-randconfig-m031-20200810 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/misc/habanalabs/gaudi/gaudi.c:902 _gaudi_init_tpc_mem() warn: should 'cb->id << (12)' be a 64 bit type?
drivers/misc/habanalabs/gaudi/gaudi.c:4612 gaudi_memset_device_memory() warn: should 'cb->id << (12)' be a 64 bit type?
vim +902 drivers/misc/habanalabs/gaudi/gaudi.c
829
830 static int _gaudi_init_tpc_mem(struct hl_device *hdev,
831 dma_addr_t tpc_kernel_src_addr, u32 tpc_kernel_size)
832 {
833 struct asic_fixed_properties *prop = &hdev->asic_prop;
834 struct packet_lin_dma *init_tpc_mem_pkt;
835 struct hl_cs_job *job;
836 struct hl_cb *cb;
837 u64 dst_addr;
838 u32 cb_size, ctl;
839 u8 tpc_id;
840 int rc;
841
842 cb = hl_cb_kernel_create(hdev, PAGE_SIZE);
843 if (!cb)
844 return -EFAULT;
845
846 init_tpc_mem_pkt = (struct packet_lin_dma *) (uintptr_t)
847 cb->kernel_address;
848 cb_size = sizeof(*init_tpc_mem_pkt);
849 memset(init_tpc_mem_pkt, 0, cb_size);
850
851 init_tpc_mem_pkt->tsize = cpu_to_le32(tpc_kernel_size);
852
853 ctl = ((PACKET_LIN_DMA << GAUDI_PKT_CTL_OPCODE_SHIFT) |
854 (1 << GAUDI_PKT_LIN_DMA_CTL_LIN_SHIFT) |
855 (1 << GAUDI_PKT_CTL_RB_SHIFT) |
856 (1 << GAUDI_PKT_CTL_MB_SHIFT));
857
858 init_tpc_mem_pkt->ctl = cpu_to_le32(ctl);
859
860 init_tpc_mem_pkt->src_addr = cpu_to_le64(tpc_kernel_src_addr);
861 dst_addr = (prop->sram_user_base_address &
862 GAUDI_PKT_LIN_DMA_DST_ADDR_MASK) >>
863 GAUDI_PKT_LIN_DMA_DST_ADDR_SHIFT;
864 init_tpc_mem_pkt->dst_addr |= cpu_to_le64(dst_addr);
865
866 job = hl_cs_allocate_job(hdev, QUEUE_TYPE_EXT, true);
867 if (!job) {
868 dev_err(hdev->dev, "Failed to allocate a new job\n");
869 rc = -ENOMEM;
870 goto release_cb;
871 }
872
873 job->id = 0;
874 job->user_cb = cb;
875 job->user_cb->cs_cnt++;
876 job->user_cb_size = cb_size;
877 job->hw_queue_id = GAUDI_QUEUE_ID_DMA_0_0;
878 job->patched_cb = job->user_cb;
879 job->job_cb_size = job->user_cb_size + sizeof(struct packet_msg_prot);
880
881 hl_debugfs_add_job(hdev, job);
882
883 rc = gaudi_send_job_on_qman0(hdev, job);
884
885 if (rc)
886 goto free_job;
887
888 for (tpc_id = 0 ; tpc_id < TPC_NUMBER_OF_ENGINES ; tpc_id++) {
889 rc = gaudi_run_tpc_kernel(hdev, dst_addr, tpc_id);
890 if (rc)
891 break;
892 }
893
894 free_job:
895 hl_userptr_delete_list(hdev, &job->userptr_list);
896 hl_debugfs_remove_job(hdev, job);
897 kfree(job);
898 cb->cs_cnt--;
899
900 release_cb:
901 hl_cb_put(cb);
> 902 hl_cb_destroy(hdev, &hdev->kernel_cb_mgr, cb->id << PAGE_SHIFT);
903
904 return rc;
905 }
906
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/net/dsa/sja1105/sja1105_main.c:3418 sja1105_check_device_id() warn: this array is probably non-NULL. 'match->compatible'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc80c51fd4b23ec007e88d4c688f2cac1b8648e7
commit: 0b0e299720bb99428892a23ecbd2b4b7f61ccf6d net: dsa: sja1105: use detected device id instead of DT one on mismatch
date: 5 days ago
config: i386-randconfig-m021-20200810 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:3418 sja1105_check_device_id() warn: this array is probably non-NULL. 'match->compatible'
drivers/net/dsa/sja1105/sja1105_main.c:3418 sja1105_check_device_id() warn: this array is probably non-NULL. 'match->compatible'
Old smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:46 sja1105_port_allow_traffic() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:47 sja1105_port_allow_traffic() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:48 sja1105_port_allow_traffic() warn: should '(((1))) << to' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:188 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 1
drivers/net/dsa/sja1105/sja1105_main.c:191 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 1
drivers/net/dsa/sja1105/sja1105_main.c:197 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 1
drivers/net/dsa/sja1105/sja1105_main.c:202 sja1105_init_mii_settings() warn: is 'table->entries' large enough for 'struct sja1105_xmii_params_entry'? 1
drivers/net/dsa/sja1105/sja1105_main.c:562 sja1105_init_avb_params() warn: is 'table->entries' large enough for 'struct sja1105_avb_params_entry'? 1
drivers/net/dsa/sja1105/sja1105_main.c:1154 sja1105_find_static_fdb_entry() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1272 sja1105et_fdb_add() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1274 sja1105et_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1282 sja1105et_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1368 sja1105pqrs_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1376 sja1105pqrs_fdb_add() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1381 sja1105pqrs_fdb_add() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1431 sja1105pqrs_fdb_del() warn: should '(((1))) << port' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1515 sja1105_fdb_dump() warn: should '((((1))) << port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:1837 sja1105_static_config_reload() warn: bitwise AND condition is false here
drivers/net/dsa/sja1105/sja1105_main.c:2195 sja1105_build_bridge_vlans() warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2196 sja1105_build_bridge_vlans() warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2198 sja1105_build_bridge_vlans() warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2217 sja1105_build_dsa_8021q_vlans() warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2218 sja1105_build_dsa_8021q_vlans() warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2220 sja1105_build_dsa_8021q_vlans() warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2270 sja1105_build_subvlans() warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2271 sja1105_build_subvlans() warn: should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2272 sja1105_build_subvlans() warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2273 sja1105_build_subvlans() warn: should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2278 sja1105_build_subvlans() warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2280 sja1105_build_subvlans() warn: should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2296 sja1105_build_subvlans() warn: should '(((1))) << (v->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2297 sja1105_build_subvlans() warn: should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2437 sja1105_build_crosschip_subvlans() warn: should '(((1))) << (tmp->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2438 sja1105_build_crosschip_subvlans() warn: should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2446 sja1105_build_crosschip_subvlans() warn: should '(((1))) << (tmp->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2447 sja1105_build_crosschip_subvlans() warn: should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2472 sja1105_build_crosschip_subvlans() warn: should '(((1))) << upstream' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2473 sja1105_build_crosschip_subvlans() warn: should '(((1))) << (tmp->port)' be a 64 bit type?
drivers/net/dsa/sja1105/sja1105_main.c:2879 sja1105_best_effort_vlan_filtering_set() error: uninitialized symbol 'rc'.
drivers/net/dsa/sja1105/sja1105_main.c:3094 sja1105_mgmt_xmit() warn: should '(((1))) << port' be a 64 bit type?
vim +3418 drivers/net/dsa/sja1105/sja1105_main.c
3395
3396 static int sja1105_check_device_id(struct sja1105_private *priv)
3397 {
3398 const struct sja1105_regs *regs = priv->info->regs;
3399 u8 prod_id[SJA1105_SIZE_DEVICE_ID] = {0};
3400 struct device *dev = &priv->spidev->dev;
3401 const struct of_device_id *match;
3402 u32 device_id;
3403 u64 part_no;
3404 int rc;
3405
3406 rc = sja1105_xfer_u32(priv, SPI_READ, regs->device_id, &device_id,
3407 NULL);
3408 if (rc < 0)
3409 return rc;
3410
3411 rc = sja1105_xfer_buf(priv, SPI_READ, regs->prod_id, prod_id,
3412 SJA1105_SIZE_DEVICE_ID);
3413 if (rc < 0)
3414 return rc;
3415
3416 sja1105_unpack(prod_id, &part_no, 19, 4, SJA1105_SIZE_DEVICE_ID);
3417
> 3418 for (match = sja1105_dt_ids; match->compatible; match++) {
3419 const struct sja1105_info *info = match->data;
3420
3421 /* Is what's been probed in our match table at all? */
3422 if (info->device_id != device_id || info->part_no != part_no)
3423 continue;
3424
3425 /* But is it what's in the device tree? */
3426 if (priv->info->device_id != device_id ||
3427 priv->info->part_no != part_no) {
3428 dev_warn(dev, "Device tree specifies chip %s but found %s, please fix it!\n",
3429 priv->info->name, info->name);
3430 /* It isn't. No problem, pick that up. */
3431 priv->info = info;
3432 }
3433
3434 return 0;
3435 }
3436
3437 dev_err(dev, "Unexpected {device ID, part number}: 0x%x 0x%llx\n",
3438 device_id, part_no);
3439
3440 return -ENODEV;
3441 }
3442
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/net/wireless/realtek/rtw88/rtw8821c.c:71:8: warning: type qualifiers ignored on function return type
by kernel test robot
Hi Tzu-En,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc80c51fd4b23ec007e88d4c688f2cac1b8648e7
commit: f745eb9ca5bf823bc5c0f82a434cefb41c57844e rtw88: 8821c: Add 8821CE to Kconfig and Makefile
date: 4 weeks ago
config: alpha-randconfig-r036-20200810 (attached as .config)
compiler: alpha-linux-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 checkout f745eb9ca5bf823bc5c0f82a434cefb41c57844e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
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 >>):
>> drivers/net/wireless/realtek/rtw88/rtw8821c.c:71:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
71 | static const u8 rtw8821c_get_swing_index(struct rtw_dev *rtwdev)
| ^~~~~
vim +71 drivers/net/wireless/realtek/rtw88/rtw8821c.c
3a4312828ce13e Tzu-En Huang 2020-06-03 70
3a4312828ce13e Tzu-En Huang 2020-06-03 @71 static const u8 rtw8821c_get_swing_index(struct rtw_dev *rtwdev)
3a4312828ce13e Tzu-En Huang 2020-06-03 72 {
3a4312828ce13e Tzu-En Huang 2020-06-03 73 u8 i = 0;
3a4312828ce13e Tzu-En Huang 2020-06-03 74 u32 swing, table_value;
3a4312828ce13e Tzu-En Huang 2020-06-03 75
3a4312828ce13e Tzu-En Huang 2020-06-03 76 swing = rtw_read32_mask(rtwdev, REG_TXSCALE_A, 0xffe00000);
3a4312828ce13e Tzu-En Huang 2020-06-03 77 for (i = 0; i < ARRAY_SIZE(rtw8821c_txscale_tbl); i++) {
3a4312828ce13e Tzu-En Huang 2020-06-03 78 table_value = rtw8821c_txscale_tbl[i];
3a4312828ce13e Tzu-En Huang 2020-06-03 79 if (swing == table_value)
3a4312828ce13e Tzu-En Huang 2020-06-03 80 break;
3a4312828ce13e Tzu-En Huang 2020-06-03 81 }
3a4312828ce13e Tzu-En Huang 2020-06-03 82
3a4312828ce13e Tzu-En Huang 2020-06-03 83 return i;
3a4312828ce13e Tzu-En Huang 2020-06-03 84 }
3a4312828ce13e Tzu-En Huang 2020-06-03 85
:::::: The code at line 71 was first introduced by commit
:::::: 3a4312828ce13e1645fd3af76e4314a2623b3361 rtw88: 8821c: add power tracking
:::::: TO: Tzu-En Huang <tehuang(a)realtek.com>
:::::: CC: Kalle Valo <kvalo(a)codeaurora.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/soc/qcom/qcom_aoss.c:228:9: warning: variable 'tlen' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc80c51fd4b23ec007e88d4c688f2cac1b8648e7
commit: 89e7eddece6140020749932f9647a6068cc0d56d soc: qcom: aoss: Read back before triggering the IRQ
date: 6 months ago
config: nds32-randconfig-r031-20200810 (attached as .config)
compiler: nds32le-linux-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 checkout 89e7eddece6140020749932f9647a6068cc0d56d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
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 >>):
drivers/soc/qcom/qcom_aoss.c: In function 'qmp_send':
>> drivers/soc/qcom/qcom_aoss.c:228:9: warning: variable 'tlen' set but not used [-Wunused-but-set-variable]
228 | size_t tlen;
| ^~~~
vim +/tlen +228 drivers/soc/qcom/qcom_aoss.c
212
213 /**
214 * qmp_send() - send a message to the AOSS
215 * @qmp: qmp context
216 * @data: message to be sent
217 * @len: length of the message
218 *
219 * Transmit @data to AOSS and wait for the AOSS to acknowledge the message.
220 * @len must be a multiple of 4 and not longer than the mailbox size. Access is
221 * synchronized by this implementation.
222 *
223 * Return: 0 on success, negative errno on failure
224 */
225 static int qmp_send(struct qmp *qmp, const void *data, size_t len)
226 {
227 long time_left;
> 228 size_t tlen;
229 int ret;
230
231 if (WARN_ON(len + sizeof(u32) > qmp->size))
232 return -EINVAL;
233
234 if (WARN_ON(len % sizeof(u32)))
235 return -EINVAL;
236
237 mutex_lock(&qmp->tx_lock);
238
239 /* The message RAM only implements 32-bit accesses */
240 __iowrite32_copy(qmp->msgram + qmp->offset + sizeof(u32),
241 data, len / sizeof(u32));
242 writel(len, qmp->msgram + qmp->offset);
243
244 /* Read back len to confirm data written in message RAM */
245 tlen = readl(qmp->msgram + qmp->offset);
246 qmp_kick(qmp);
247
248 time_left = wait_event_interruptible_timeout(qmp->event,
249 qmp_message_empty(qmp), HZ);
250 if (!time_left) {
251 dev_err(qmp->dev, "ucore did not ack channel\n");
252 ret = -ETIMEDOUT;
253
254 /* Clear message from buffer */
255 writel(0, qmp->msgram + qmp->offset);
256 } else {
257 ret = 0;
258 }
259
260 mutex_unlock(&qmp->tx_lock);
261
262 return ret;
263 }
264
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/firmware/meson/meson_sm.c:170:17: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc80c51fd4b23ec007e88d4c688f2cac1b8648e7
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: arm64-randconfig-s032-20200810 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-141-g19506bc2-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/firmware/meson/meson_sm.c:85:24: sparse: sparse: Using plain integer as NULL pointer
>> drivers/firmware/meson/meson_sm.c:170:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *sm_shmem_out_base @@
drivers/firmware/meson/meson_sm.c:170:17: sparse: expected void const *
drivers/firmware/meson/meson_sm.c:170:17: sparse: got void [noderef] __iomem *sm_shmem_out_base
>> drivers/firmware/meson/meson_sm.c:206:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *sm_shmem_in_base @@
drivers/firmware/meson/meson_sm.c:206:9: sparse: expected void *
drivers/firmware/meson/meson_sm.c:206:9: sparse: got void [noderef] __iomem *sm_shmem_in_base
vim +170 drivers/firmware/meson/meson_sm.c
2c4ddb215521d5 Carlo Caione 2016-08-27 124
2c4ddb215521d5 Carlo Caione 2016-08-27 125 /**
2c4ddb215521d5 Carlo Caione 2016-08-27 126 * meson_sm_call_read - retrieve data from secure-monitor
2c4ddb215521d5 Carlo Caione 2016-08-27 127 *
8cde3c2153e8f5 Carlo Caione 2019-07-31 128 * @fw: Pointer to secure-monitor firmware
2c4ddb215521d5 Carlo Caione 2016-08-27 129 * @buffer: Buffer to store the retrieved data
83e007a0c6a3f4 Carlo Caione 2017-03-03 130 * @bsize: Size of the buffer
2c4ddb215521d5 Carlo Caione 2016-08-27 131 * @cmd_index: Index of the SMC32 function ID
2c4ddb215521d5 Carlo Caione 2016-08-27 132 * @arg0: SMC32 Argument 0
2c4ddb215521d5 Carlo Caione 2016-08-27 133 * @arg1: SMC32 Argument 1
2c4ddb215521d5 Carlo Caione 2016-08-27 134 * @arg2: SMC32 Argument 2
2c4ddb215521d5 Carlo Caione 2016-08-27 135 * @arg3: SMC32 Argument 3
2c4ddb215521d5 Carlo Caione 2016-08-27 136 * @arg4: SMC32 Argument 4
2c4ddb215521d5 Carlo Caione 2016-08-27 137 *
2c4ddb215521d5 Carlo Caione 2016-08-27 138 * Return: size of read data on success, a negative value on error
7a9bc330df9b8f Carlo Caione 2017-03-03 139 * When 0 is returned there is no guarantee about the amount of
7a9bc330df9b8f Carlo Caione 2017-03-03 140 * data read and bsize bytes are copied in buffer.
2c4ddb215521d5 Carlo Caione 2016-08-27 141 */
8cde3c2153e8f5 Carlo Caione 2019-07-31 142 int meson_sm_call_read(struct meson_sm_firmware *fw, void *buffer,
8cde3c2153e8f5 Carlo Caione 2019-07-31 143 unsigned int bsize, unsigned int cmd_index, u32 arg0,
8cde3c2153e8f5 Carlo Caione 2019-07-31 144 u32 arg1, u32 arg2, u32 arg3, u32 arg4)
2c4ddb215521d5 Carlo Caione 2016-08-27 145 {
2c4ddb215521d5 Carlo Caione 2016-08-27 146 u32 size;
7a9bc330df9b8f Carlo Caione 2017-03-03 147 int ret;
2c4ddb215521d5 Carlo Caione 2016-08-27 148
8cde3c2153e8f5 Carlo Caione 2019-07-31 149 if (!fw->chip)
2c4ddb215521d5 Carlo Caione 2016-08-27 150 return -ENOENT;
2c4ddb215521d5 Carlo Caione 2016-08-27 151
8cde3c2153e8f5 Carlo Caione 2019-07-31 152 if (!fw->chip->cmd_shmem_out_base)
2c4ddb215521d5 Carlo Caione 2016-08-27 153 return -EINVAL;
2c4ddb215521d5 Carlo Caione 2016-08-27 154
8cde3c2153e8f5 Carlo Caione 2019-07-31 155 if (bsize > fw->chip->shmem_size)
83e007a0c6a3f4 Carlo Caione 2017-03-03 156 return -EINVAL;
83e007a0c6a3f4 Carlo Caione 2017-03-03 157
8cde3c2153e8f5 Carlo Caione 2019-07-31 158 if (meson_sm_call(fw, cmd_index, &size, arg0, arg1, arg2, arg3, arg4) < 0)
2c4ddb215521d5 Carlo Caione 2016-08-27 159 return -EINVAL;
2c4ddb215521d5 Carlo Caione 2016-08-27 160
7a9bc330df9b8f Carlo Caione 2017-03-03 161 if (size > bsize)
2c4ddb215521d5 Carlo Caione 2016-08-27 162 return -EINVAL;
2c4ddb215521d5 Carlo Caione 2016-08-27 163
7a9bc330df9b8f Carlo Caione 2017-03-03 164 ret = size;
7a9bc330df9b8f Carlo Caione 2017-03-03 165
7a9bc330df9b8f Carlo Caione 2017-03-03 166 if (!size)
7a9bc330df9b8f Carlo Caione 2017-03-03 167 size = bsize;
7a9bc330df9b8f Carlo Caione 2017-03-03 168
2c4ddb215521d5 Carlo Caione 2016-08-27 169 if (buffer)
8cde3c2153e8f5 Carlo Caione 2019-07-31 @170 memcpy(buffer, fw->sm_shmem_out_base, size);
2c4ddb215521d5 Carlo Caione 2016-08-27 171
7a9bc330df9b8f Carlo Caione 2017-03-03 172 return ret;
2c4ddb215521d5 Carlo Caione 2016-08-27 173 }
2c4ddb215521d5 Carlo Caione 2016-08-27 174 EXPORT_SYMBOL(meson_sm_call_read);
2c4ddb215521d5 Carlo Caione 2016-08-27 175
2c4ddb215521d5 Carlo Caione 2016-08-27 176 /**
2c4ddb215521d5 Carlo Caione 2016-08-27 177 * meson_sm_call_write - send data to secure-monitor
2c4ddb215521d5 Carlo Caione 2016-08-27 178 *
8cde3c2153e8f5 Carlo Caione 2019-07-31 179 * @fw: Pointer to secure-monitor firmware
2c4ddb215521d5 Carlo Caione 2016-08-27 180 * @buffer: Buffer containing data to send
2c4ddb215521d5 Carlo Caione 2016-08-27 181 * @size: Size of the data to send
2c4ddb215521d5 Carlo Caione 2016-08-27 182 * @cmd_index: Index of the SMC32 function ID
2c4ddb215521d5 Carlo Caione 2016-08-27 183 * @arg0: SMC32 Argument 0
2c4ddb215521d5 Carlo Caione 2016-08-27 184 * @arg1: SMC32 Argument 1
2c4ddb215521d5 Carlo Caione 2016-08-27 185 * @arg2: SMC32 Argument 2
2c4ddb215521d5 Carlo Caione 2016-08-27 186 * @arg3: SMC32 Argument 3
2c4ddb215521d5 Carlo Caione 2016-08-27 187 * @arg4: SMC32 Argument 4
2c4ddb215521d5 Carlo Caione 2016-08-27 188 *
2c4ddb215521d5 Carlo Caione 2016-08-27 189 * Return: size of sent data on success, a negative value on error
2c4ddb215521d5 Carlo Caione 2016-08-27 190 */
8cde3c2153e8f5 Carlo Caione 2019-07-31 191 int meson_sm_call_write(struct meson_sm_firmware *fw, void *buffer,
8cde3c2153e8f5 Carlo Caione 2019-07-31 192 unsigned int size, unsigned int cmd_index, u32 arg0,
8cde3c2153e8f5 Carlo Caione 2019-07-31 193 u32 arg1, u32 arg2, u32 arg3, u32 arg4)
2c4ddb215521d5 Carlo Caione 2016-08-27 194 {
2c4ddb215521d5 Carlo Caione 2016-08-27 195 u32 written;
2c4ddb215521d5 Carlo Caione 2016-08-27 196
8cde3c2153e8f5 Carlo Caione 2019-07-31 197 if (!fw->chip)
2c4ddb215521d5 Carlo Caione 2016-08-27 198 return -ENOENT;
2c4ddb215521d5 Carlo Caione 2016-08-27 199
8cde3c2153e8f5 Carlo Caione 2019-07-31 200 if (size > fw->chip->shmem_size)
2c4ddb215521d5 Carlo Caione 2016-08-27 201 return -EINVAL;
2c4ddb215521d5 Carlo Caione 2016-08-27 202
8cde3c2153e8f5 Carlo Caione 2019-07-31 203 if (!fw->chip->cmd_shmem_in_base)
2c4ddb215521d5 Carlo Caione 2016-08-27 204 return -EINVAL;
2c4ddb215521d5 Carlo Caione 2016-08-27 205
8cde3c2153e8f5 Carlo Caione 2019-07-31 @206 memcpy(fw->sm_shmem_in_base, buffer, size);
2c4ddb215521d5 Carlo Caione 2016-08-27 207
8cde3c2153e8f5 Carlo Caione 2019-07-31 208 if (meson_sm_call(fw, cmd_index, &written, arg0, arg1, arg2, arg3, arg4) < 0)
2c4ddb215521d5 Carlo Caione 2016-08-27 209 return -EINVAL;
2c4ddb215521d5 Carlo Caione 2016-08-27 210
2c4ddb215521d5 Carlo Caione 2016-08-27 211 if (!written)
2c4ddb215521d5 Carlo Caione 2016-08-27 212 return -EINVAL;
2c4ddb215521d5 Carlo Caione 2016-08-27 213
2c4ddb215521d5 Carlo Caione 2016-08-27 214 return written;
2c4ddb215521d5 Carlo Caione 2016-08-27 215 }
2c4ddb215521d5 Carlo Caione 2016-08-27 216 EXPORT_SYMBOL(meson_sm_call_write);
2c4ddb215521d5 Carlo Caione 2016-08-27 217
:::::: The code at line 170 was first introduced by commit
:::::: 8cde3c2153e8f57be884c0e73f18bc4de150e870 firmware: meson_sm: Rework driver as a proper platform driver
:::::: TO: Carlo Caione <ccaione(a)baylibre.com>
:::::: CC: Kevin Hilman <khilman(a)baylibre.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/usb/core/devio.c:1155 do_proc_control() error: copy_from_user() 'tbuf' too small (4096 vs 8192)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 049eb096da48db0421dd5e358b9b082a1a8a2025
commit: c17536d0abde2fd24afca542e3bb73b45a299633 usb: usbfs: stop using compat_alloc_user_space
date: 2 weeks ago
config: nds32-randconfig-m031-20200808 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/usb/core/devio.c:1155 do_proc_control() error: copy_from_user() 'tbuf' too small (4096 vs 8192)
vim +/tbuf +1155 drivers/usb/core/devio.c
1104
1105 static int do_proc_control(struct usb_dev_state *ps,
1106 struct usbdevfs_ctrltransfer *ctrl)
1107 {
1108 struct usb_device *dev = ps->dev;
1109 unsigned int tmo;
1110 unsigned char *tbuf;
1111 unsigned wLength;
1112 int i, pipe, ret;
1113
1114 ret = check_ctrlrecip(ps, ctrl->bRequestType, ctrl->bRequest,
1115 ctrl->wIndex);
1116 if (ret)
1117 return ret;
1118 wLength = ctrl->wLength; /* To suppress 64k PAGE_SIZE warning */
1119 if (wLength > PAGE_SIZE)
1120 return -EINVAL;
1121 ret = usbfs_increase_memory_usage(PAGE_SIZE + sizeof(struct urb) +
1122 sizeof(struct usb_ctrlrequest));
1123 if (ret)
1124 return ret;
1125 tbuf = (unsigned char *)__get_free_page(GFP_KERNEL);
1126 if (!tbuf) {
1127 ret = -ENOMEM;
1128 goto done;
1129 }
1130 tmo = ctrl->timeout;
1131 snoop(&dev->dev, "control urb: bRequestType=%02x "
1132 "bRequest=%02x wValue=%04x "
1133 "wIndex=%04x wLength=%04x\n",
1134 ctrl->bRequestType, ctrl->bRequest, ctrl->wValue,
1135 ctrl->wIndex, ctrl->wLength);
1136 if (ctrl->bRequestType & 0x80) {
1137 pipe = usb_rcvctrlpipe(dev, 0);
1138 snoop_urb(dev, NULL, pipe, ctrl->wLength, tmo, SUBMIT, NULL, 0);
1139
1140 usb_unlock_device(dev);
1141 i = usb_control_msg(dev, pipe, ctrl->bRequest,
1142 ctrl->bRequestType, ctrl->wValue, ctrl->wIndex,
1143 tbuf, ctrl->wLength, tmo);
1144 usb_lock_device(dev);
1145 snoop_urb(dev, NULL, pipe, max(i, 0), min(i, 0), COMPLETE,
1146 tbuf, max(i, 0));
1147 if ((i > 0) && ctrl->wLength) {
1148 if (copy_to_user(ctrl->data, tbuf, i)) {
1149 ret = -EFAULT;
1150 goto done;
1151 }
1152 }
1153 } else {
1154 if (ctrl->wLength) {
> 1155 if (copy_from_user(tbuf, ctrl->data, ctrl->wLength)) {
1156 ret = -EFAULT;
1157 goto done;
1158 }
1159 }
1160 pipe = usb_sndctrlpipe(dev, 0);
1161 snoop_urb(dev, NULL, pipe, ctrl->wLength, tmo, SUBMIT,
1162 tbuf, ctrl->wLength);
1163
1164 usb_unlock_device(dev);
1165 i = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ctrl->bRequest,
1166 ctrl->bRequestType, ctrl->wValue, ctrl->wIndex,
1167 tbuf, ctrl->wLength, tmo);
1168 usb_lock_device(dev);
1169 snoop_urb(dev, NULL, pipe, max(i, 0), min(i, 0), COMPLETE, NULL, 0);
1170 }
1171 if (i < 0 && i != -EPIPE) {
1172 dev_printk(KERN_DEBUG, &dev->dev, "usbfs: USBDEVFS_CONTROL "
1173 "failed cmd %s rqt %u rq %u len %u ret %d\n",
1174 current->comm, ctrl->bRequestType, ctrl->bRequest,
1175 ctrl->wLength, i);
1176 }
1177 ret = i;
1178 done:
1179 free_page((unsigned long) tbuf);
1180 usbfs_decrease_memory_usage(PAGE_SIZE + sizeof(struct urb) +
1181 sizeof(struct usb_ctrlrequest));
1182 return ret;
1183 }
1184
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[chrome-os:chromeos-5.4 14466/14490] WARNING: vmlinux.o(.text+0x230e428): Section mismatch in reference from the function sock_zerocopy_put() to the variable .init.text:.L0
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 644e643f042135c6fcb0e075bb7cf0fc868fbbfa
commit: 2025bcfc9d6dc47db94c386ae238557e8b104bdc [14466/14490] CHROMIUM: Merge 'v5.4.57' into chromeos-5.4
config: riscv-randconfig-r004-20200809 (attached as .config)
compiler: riscv32-linux-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 checkout 2025bcfc9d6dc47db94c386ae238557e8b104bdc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
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 >>):
>> WARNING: vmlinux.o(.text+0x230e428): Section mismatch in reference from the function sock_zerocopy_put() to the variable .init.text:.L0
The function sock_zerocopy_put() references
the variable __init .L0 .
This is often because sock_zerocopy_put lacks a __init
annotation or the annotation of .L0 is wrong.
--
>> WARNING: vmlinux.o(.text+0x2312b70): Section mismatch in reference from the function sock_zerocopy_put_abort() to the variable .init.text:.L0
The function sock_zerocopy_put_abort() references
the variable __init .L0 .
This is often because sock_zerocopy_put_abort lacks a __init
annotation or the annotation of .L0 is wrong.
--
>> WARNING: vmlinux.o(__ex_table+0xcf0): Section mismatch in reference from the (unknown reference) (unknown) to the variable ___ksymtab+dev_mc_add_excl:__ksymtab_dev_mc_add_excl
FATAL: The relocation at __ex_table+0xcf0 references
section "___ksymtab+dev_mc_add_excl" which is not executable, IOW
it is not possible for the kernel to fault
at that address. Something is seriously wrong
and should be fixed.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v1 2/2] drm/bridge: add refactored it6505 driver
by kernel test robot
Hi allen,
I love your patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on drm-intel/for-linux-next linus/master v5.8 next-20200810]
[cannot apply to drm-tip/drm-tip drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/allen/IT6505-cover-letter/202008...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/gpu/drm/bridge/ite-it6505.c: In function 'it6505_calc_video_info':
drivers/gpu/drm/bridge/ite-it6505.c:662:14: warning: variable 'vdes' set but not used [-Wunused-but-set-variable]
662 | int vtotal, vdes, vdew, vfph, vsyncw;
| ^~~~
drivers/gpu/drm/bridge/ite-it6505.c:661:14: warning: variable 'hdes' set but not used [-Wunused-but-set-variable]
661 | int htotal, hdes, hdew, hfph, hsyncw;
| ^~~~
drivers/gpu/drm/bridge/ite-it6505.c:660:28: warning: variable 'interlaced' set but not used [-Wunused-but-set-variable]
660 | int hsync_pol, vsync_pol, interlaced;
| ^~~~~~~~~~
drivers/gpu/drm/bridge/ite-it6505.c:660:17: warning: variable 'vsync_pol' set but not used [-Wunused-but-set-variable]
660 | int hsync_pol, vsync_pol, interlaced;
| ^~~~~~~~~
drivers/gpu/drm/bridge/ite-it6505.c:660:6: warning: variable 'hsync_pol' set but not used [-Wunused-but-set-variable]
660 | int hsync_pol, vsync_pol, interlaced;
| ^~~~~~~~~
In file included from drivers/gpu/drm/bridge/ite-it6505.c:32:
drivers/gpu/drm/bridge/ite-it6505.c: In function 'it6505_setup_sha1_input':
>> drivers/gpu/drm/bridge/ite-it6505.c:1935:28: warning: field width specifier '*' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
1935 | DRM_DEV_DEBUG_DRIVER(dev, "binfo:0x%*ph", ARRAY_SIZE(binfo), binfo);
| ^~~~~~~~~~~~~~
include/drm/drm_print.h:386:34: note: in definition of macro 'DRM_DEV_DEBUG_DRIVER'
386 | drm_dev_dbg(dev, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/bridge/ite-it6505.c:1935:38: note: format string is defined here
1935 | DRM_DEV_DEBUG_DRIVER(dev, "binfo:0x%*ph", ARRAY_SIZE(binfo), binfo);
| ~^~
| |
| int
In file included from drivers/gpu/drm/bridge/ite-it6505.c:32:
drivers/gpu/drm/bridge/ite-it6505.c: In function 'it6505_hdcp_work':
drivers/gpu/drm/bridge/ite-it6505.c:2070:28: warning: field width specifier '*' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=]
2070 | DRM_DEV_DEBUG_DRIVER(dev, "ret: %d link_status: %*ph", ret,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
2071 | sizeof(link_status), link_status);
| ~~~~~~~~~~~~~~~~~~~
| |
| long unsigned int
include/drm/drm_print.h:386:34: note: in definition of macro 'DRM_DEV_DEBUG_DRIVER'
386 | drm_dev_dbg(dev, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/bridge/ite-it6505.c:2070:51: note: format string is defined here
2070 | DRM_DEV_DEBUG_DRIVER(dev, "ret: %d link_status: %*ph", ret,
| ~^~
| |
| int
In file included from drivers/gpu/drm/bridge/ite-it6505.c:32:
drivers/gpu/drm/bridge/ite-it6505.c:2087:28: warning: field width specifier '*' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
2087 | DRM_DEV_DEBUG_DRIVER(dev, "bksv = 0x%*ph",
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:386:34: note: in definition of macro 'DRM_DEV_DEBUG_DRIVER'
386 | drm_dev_dbg(dev, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/bridge/ite-it6505.c:2087:39: note: format string is defined here
2087 | DRM_DEV_DEBUG_DRIVER(dev, "bksv = 0x%*ph",
| ~^~
| |
| int
drivers/gpu/drm/bridge/ite-it6505.c: At top level:
>> drivers/gpu/drm/bridge/ite-it6505.c:2099:6: warning: no previous prototype for 'it6505_show_hdcp_info' [-Wmissing-prototypes]
2099 | void it6505_show_hdcp_info(struct it6505 *it6505)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/bridge/ite-it6505.c:32:
drivers/gpu/drm/bridge/ite-it6505.c: In function 'it6505_show_hdcp_info':
drivers/gpu/drm/bridge/ite-it6505.c:2107:28: warning: field width specifier '*' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
2107 | DRM_DEV_DEBUG_DRIVER(dev, "bksv = 0x%*ph", ARRAY_SIZE(it6505->bksvs),
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:386:34: note: in definition of macro 'DRM_DEV_DEBUG_DRIVER'
386 | drm_dev_dbg(dev, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/bridge/ite-it6505.c:2107:39: note: format string is defined here
2107 | DRM_DEV_DEBUG_DRIVER(dev, "bksv = 0x%*ph", ARRAY_SIZE(it6505->bksvs),
| ~^~
| |
| int
In file included from drivers/gpu/drm/bridge/ite-it6505.c:32:
drivers/gpu/drm/bridge/ite-it6505.c:2113:29: warning: field width specifier '*' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
2113 | DRM_DEV_DEBUG_DRIVER(dev, "sha1_input: 0x%*ph",
| ^~~~~~~~~~~~~~~~~~~~
include/drm/drm_print.h:386:34: note: in definition of macro 'DRM_DEV_DEBUG_DRIVER'
386 | drm_dev_dbg(dev, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/bridge/ite-it6505.c:2113:45: note: format string is defined here
2113 | DRM_DEV_DEBUG_DRIVER(dev, "sha1_input: 0x%*ph",
| ~^~
| |
| int
drivers/gpu/drm/bridge/ite-it6505.c: At top level:
>> drivers/gpu/drm/bridge/ite-it6505.c:2965:16: error: initialization of 'enum drm_mode_status (*)(struct drm_bridge *, const struct drm_display_mode *)' from incompatible pointer type 'enum drm_mode_status (*)(struct drm_bridge *, const struct drm_display_info *, const struct drm_display_mode *)' [-Werror=incompatible-pointer-types]
2965 | .mode_valid = it6505_bridge_mode_valid,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/bridge/ite-it6505.c:2965:16: note: (near initialization for 'it6505_bridge_funcs.mode_valid')
drivers/gpu/drm/bridge/ite-it6505.c: In function 'it6505_i2c_probe':
drivers/gpu/drm/bridge/ite-it6505.c:3140:31: warning: variable 'pdata' set but not used [-Wunused-but-set-variable]
3140 | struct it6505_platform_data *pdata;
| ^~~~~
cc1: some warnings being treated as errors
vim +2965 drivers/gpu/drm/bridge/ite-it6505.c
2961
2962 static const struct drm_bridge_funcs it6505_bridge_funcs = {
2963 .attach = it6505_bridge_attach,
2964 .detach = it6505_bridge_detach,
> 2965 .mode_valid = it6505_bridge_mode_valid,
2966 .mode_set = it6505_bridge_mode_set,
2967 .enable = it6505_bridge_enable,
2968 .disable = it6505_bridge_disable,
2969 };
2970
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[superna9999:amlogic/v5.9/s400-mipi-dsi 12/16] drivers/gpu/drm/drm_bridge.c:201 drm_bridge_attach() error: uninitialized symbol 'ret'.
by Dan Carpenter
tree: https://github.com/superna9999/linux amlogic/v5.9/s400-mipi-dsi
head: 4cbe7065356e7e68a59a0787bc4a4a3ca9375065
commit: 87c65f7a5406d7484a6e9aeab87b275f29542aed [12/16] drm: bridge: debug
config: i386-randconfig-m021-20200802 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/gpu/drm/drm_bridge.c:201 drm_bridge_attach() error: uninitialized symbol 'ret'.
# https://github.com/superna9999/linux/commit/87c65f7a5406d7484a6e9aeab87b2...
git remote add superna9999 https://github.com/superna9999/linux
git remote update superna9999
git checkout 87c65f7a5406d7484a6e9aeab87b275f29542aed
vim +/ret +201 drivers/gpu/drm/drm_bridge.c
3bb80f249525c05 Laurent Pinchart 2016-11-28 175 int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
a25b988ff83f3ca Laurent Pinchart 2020-02-26 176 struct drm_bridge *previous,
a25b988ff83f3ca Laurent Pinchart 2020-02-26 177 enum drm_bridge_attach_flags flags)
3d3f8b1f8b62c3a Ajay Kumar 2015-01-20 178 {
3bb80f249525c05 Laurent Pinchart 2016-11-28 179 int ret;
^^^^^^^
3bb80f249525c05 Laurent Pinchart 2016-11-28 180
87c65f7a5406d74 Neil Armstrong 2020-04-06 181 pr_info("%s %08x %08x %08x\n", __func__, encoder, bridge, previous);
87c65f7a5406d74 Neil Armstrong 2020-04-06 182
3bb80f249525c05 Laurent Pinchart 2016-11-28 183 if (!encoder || !bridge)
3bb80f249525c05 Laurent Pinchart 2016-11-28 184 return -EINVAL;
3bb80f249525c05 Laurent Pinchart 2016-11-28 185
3bb80f249525c05 Laurent Pinchart 2016-11-28 186 if (previous && (!previous->dev || previous->encoder != encoder))
3d3f8b1f8b62c3a Ajay Kumar 2015-01-20 187 return -EINVAL;
3d3f8b1f8b62c3a Ajay Kumar 2015-01-20 188
3d3f8b1f8b62c3a Ajay Kumar 2015-01-20 189 if (bridge->dev)
3d3f8b1f8b62c3a Ajay Kumar 2015-01-20 190 return -EBUSY;
3d3f8b1f8b62c3a Ajay Kumar 2015-01-20 191
3bb80f249525c05 Laurent Pinchart 2016-11-28 192 bridge->dev = encoder->dev;
3bb80f249525c05 Laurent Pinchart 2016-11-28 193 bridge->encoder = encoder;
3bb80f249525c05 Laurent Pinchart 2016-11-28 194
05193dc38197021 Boris Brezillon 2019-12-03 195 if (previous)
05193dc38197021 Boris Brezillon 2019-12-03 196 list_add(&bridge->chain_node, &previous->chain_node);
05193dc38197021 Boris Brezillon 2019-12-03 197 else
05193dc38197021 Boris Brezillon 2019-12-03 198 list_add(&bridge->chain_node, &encoder->bridge_chain);
05193dc38197021 Boris Brezillon 2019-12-03 199
3bb80f249525c05 Laurent Pinchart 2016-11-28 200 if (bridge->funcs->attach) {
87c65f7a5406d74 Neil Armstrong 2020-04-06 @201 pr_info("%s:%d %d\n", __func__, __LINE__, ret);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Probably supposed to be one line later.
a25b988ff83f3ca Laurent Pinchart 2020-02-26 202 ret = bridge->funcs->attach(bridge, flags);
751465913f045a1 Boris Brezillon 2020-01-28 203 if (ret < 0)
751465913f045a1 Boris Brezillon 2020-01-28 204 goto err_reset_bridge;
3bb80f249525c05 Laurent Pinchart 2016-11-28 205 }
751465913f045a1 Boris Brezillon 2020-01-28 206
751465913f045a1 Boris Brezillon 2020-01-28 207 if (bridge->funcs->atomic_reset) {
751465913f045a1 Boris Brezillon 2020-01-28 208 struct drm_bridge_state *state;
751465913f045a1 Boris Brezillon 2020-01-28 209
751465913f045a1 Boris Brezillon 2020-01-28 210 state = bridge->funcs->atomic_reset(bridge);
751465913f045a1 Boris Brezillon 2020-01-28 211 if (IS_ERR(state)) {
751465913f045a1 Boris Brezillon 2020-01-28 212 ret = PTR_ERR(state);
751465913f045a1 Boris Brezillon 2020-01-28 213 goto err_detach_bridge;
751465913f045a1 Boris Brezillon 2020-01-28 214 }
751465913f045a1 Boris Brezillon 2020-01-28 215
751465913f045a1 Boris Brezillon 2020-01-28 216 drm_atomic_private_obj_init(bridge->dev, &bridge->base,
751465913f045a1 Boris Brezillon 2020-01-28 217 &state->base,
751465913f045a1 Boris Brezillon 2020-01-28 218 &drm_bridge_priv_state_funcs);
3bb80f249525c05 Laurent Pinchart 2016-11-28 219 }
3d3f8b1f8b62c3a Ajay Kumar 2015-01-20 220
3d3f8b1f8b62c3a Ajay Kumar 2015-01-20 221 return 0;
751465913f045a1 Boris Brezillon 2020-01-28 222
751465913f045a1 Boris Brezillon 2020-01-28 223 err_detach_bridge:
751465913f045a1 Boris Brezillon 2020-01-28 224 if (bridge->funcs->detach)
751465913f045a1 Boris Brezillon 2020-01-28 225 bridge->funcs->detach(bridge);
751465913f045a1 Boris Brezillon 2020-01-28 226
751465913f045a1 Boris Brezillon 2020-01-28 227 err_reset_bridge:
751465913f045a1 Boris Brezillon 2020-01-28 228 bridge->dev = NULL;
751465913f045a1 Boris Brezillon 2020-01-28 229 bridge->encoder = NULL;
751465913f045a1 Boris Brezillon 2020-01-28 230 list_del(&bridge->chain_node);
751465913f045a1 Boris Brezillon 2020-01-28 231 return ret;
3d3f8b1f8b62c3a Ajay Kumar 2015-01-20 232 }
3d3f8b1f8b62c3a Ajay Kumar 2015-01-20 233 EXPORT_SYMBOL(drm_bridge_attach);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month