[peterz-queue:x86/paravirt 5/26] drivers/input/joystick/sidewinder.c:482:1: warning: the frame size of 1344 bytes is larger than 1024 bytes
From: kernel test robot
Date: Thu Aug 26 2021 - 08:57:20 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/paravirt
head: 104c81502044e33b4fc88510c8f1f70ade85d00e
commit: 4309ca74326576bde2530dd0d4c73fb69b91bd9f [5/26] kbuild: Remove CONFIG_DEBUG_SECTION_MISMATCH
config: h8300-randconfig-r034-20210826 (attached as .config)
compiler: h8300-linux-gcc (GCC) 11.2.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
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=4309ca74326576bde2530dd0d4c73fb69b91bd9f
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue x86/paravirt
git checkout 4309ca74326576bde2530dd0d4c73fb69b91bd9f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
drivers/input/joystick/sidewinder.c: In function 'sw_read':
>> drivers/input/joystick/sidewinder.c:482:1: warning: the frame size of 1344 bytes is larger than 1024 bytes [-Wframe-larger-than=]
482 | }
| ^
vim +482 drivers/input/joystick/sidewinder.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 402
^1da177e4c3f41 Linus Torvalds 2005-04-16 403 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 404 * sw_read() reads SideWinder joystick data, and reinitializes
^1da177e4c3f41 Linus Torvalds 2005-04-16 405 * the joystick in case of persistent problems. This is the function that is
^1da177e4c3f41 Linus Torvalds 2005-04-16 406 * called from the generic code to poll the joystick.
^1da177e4c3f41 Linus Torvalds 2005-04-16 407 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 408
^1da177e4c3f41 Linus Torvalds 2005-04-16 409 static int sw_read(struct sw *sw)
^1da177e4c3f41 Linus Torvalds 2005-04-16 410 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 411 unsigned char buf[SW_LENGTH];
^1da177e4c3f41 Linus Torvalds 2005-04-16 412 int i;
^1da177e4c3f41 Linus Torvalds 2005-04-16 413
^1da177e4c3f41 Linus Torvalds 2005-04-16 414 i = sw_read_packet(sw->gameport, buf, sw->length, 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 415
^1da177e4c3f41 Linus Torvalds 2005-04-16 416 if (sw->type == SW_ID_3DP && sw->length == 66 && i != 66) { /* Broken packet, try to fix */
^1da177e4c3f41 Linus Torvalds 2005-04-16 417
^1da177e4c3f41 Linus Torvalds 2005-04-16 418 if (i == 64 && !sw_check(sw_get_bits(buf,0,64,1))) { /* Last init failed, 1 bit mode */
^1da177e4c3f41 Linus Torvalds 2005-04-16 419 printk(KERN_WARNING "sidewinder.c: Joystick in wrong mode on %s"
^1da177e4c3f41 Linus Torvalds 2005-04-16 420 " - going to reinitialize.\n", sw->gameport->phys);
^1da177e4c3f41 Linus Torvalds 2005-04-16 421 sw->fail = SW_FAIL; /* Reinitialize */
^1da177e4c3f41 Linus Torvalds 2005-04-16 422 i = 128; /* Bogus value */
^1da177e4c3f41 Linus Torvalds 2005-04-16 423 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 424
^1da177e4c3f41 Linus Torvalds 2005-04-16 425 if (i < 66 && GB(0,64) == GB(i*3-66,64)) /* 1 == 3 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 426 i = 66; /* Everything is fine */
^1da177e4c3f41 Linus Torvalds 2005-04-16 427
^1da177e4c3f41 Linus Torvalds 2005-04-16 428 if (i < 66 && GB(0,64) == GB(66,64)) /* 1 == 2 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 429 i = 66; /* Everything is fine */
^1da177e4c3f41 Linus Torvalds 2005-04-16 430
^1da177e4c3f41 Linus Torvalds 2005-04-16 431 if (i < 66 && GB(i*3-132,64) == GB(i*3-66,64)) { /* 2 == 3 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 432 memmove(buf, buf + i - 22, 22); /* Move data */
^1da177e4c3f41 Linus Torvalds 2005-04-16 433 i = 66; /* Carry on */
^1da177e4c3f41 Linus Torvalds 2005-04-16 434 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 435 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 436
^1da177e4c3f41 Linus Torvalds 2005-04-16 437 if (i == sw->length && !sw_parse(buf, sw)) { /* Parse data */
^1da177e4c3f41 Linus Torvalds 2005-04-16 438
^1da177e4c3f41 Linus Torvalds 2005-04-16 439 sw->fail = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 440 sw->ok++;
^1da177e4c3f41 Linus Torvalds 2005-04-16 441
^1da177e4c3f41 Linus Torvalds 2005-04-16 442 if (sw->type == SW_ID_3DP && sw->length == 66 /* Many packets OK */
^1da177e4c3f41 Linus Torvalds 2005-04-16 443 && sw->ok > SW_OK) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 444
^1da177e4c3f41 Linus Torvalds 2005-04-16 445 printk(KERN_INFO "sidewinder.c: No more trouble on %s"
^1da177e4c3f41 Linus Torvalds 2005-04-16 446 " - enabling optimization again.\n", sw->gameport->phys);
^1da177e4c3f41 Linus Torvalds 2005-04-16 447 sw->length = 22;
^1da177e4c3f41 Linus Torvalds 2005-04-16 448 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 449
^1da177e4c3f41 Linus Torvalds 2005-04-16 450 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 451 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 452
^1da177e4c3f41 Linus Torvalds 2005-04-16 453 sw->ok = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 454 sw->fail++;
^1da177e4c3f41 Linus Torvalds 2005-04-16 455
^1da177e4c3f41 Linus Torvalds 2005-04-16 456 if (sw->type == SW_ID_3DP && sw->length == 22 && sw->fail > SW_BAD) { /* Consecutive bad packets */
^1da177e4c3f41 Linus Torvalds 2005-04-16 457
^1da177e4c3f41 Linus Torvalds 2005-04-16 458 printk(KERN_INFO "sidewinder.c: Many bit errors on %s"
^1da177e4c3f41 Linus Torvalds 2005-04-16 459 " - disabling optimization.\n", sw->gameport->phys);
^1da177e4c3f41 Linus Torvalds 2005-04-16 460 sw->length = 66;
^1da177e4c3f41 Linus Torvalds 2005-04-16 461 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 462
^1da177e4c3f41 Linus Torvalds 2005-04-16 463 if (sw->fail < SW_FAIL)
^1da177e4c3f41 Linus Torvalds 2005-04-16 464 return -1; /* Not enough, don't reinitialize yet */
^1da177e4c3f41 Linus Torvalds 2005-04-16 465
^1da177e4c3f41 Linus Torvalds 2005-04-16 466 printk(KERN_WARNING "sidewinder.c: Too many bit errors on %s"
^1da177e4c3f41 Linus Torvalds 2005-04-16 467 " - reinitializing joystick.\n", sw->gameport->phys);
^1da177e4c3f41 Linus Torvalds 2005-04-16 468
^1da177e4c3f41 Linus Torvalds 2005-04-16 469 if (!i && sw->type == SW_ID_3DP) { /* 3D Pro can be in analog mode */
^1da177e4c3f41 Linus Torvalds 2005-04-16 470 mdelay(3 * SW_TIMEOUT);
^1da177e4c3f41 Linus Torvalds 2005-04-16 471 sw_init_digital(sw->gameport);
^1da177e4c3f41 Linus Torvalds 2005-04-16 472 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 473
^1da177e4c3f41 Linus Torvalds 2005-04-16 474 mdelay(SW_TIMEOUT);
^1da177e4c3f41 Linus Torvalds 2005-04-16 475 i = sw_read_packet(sw->gameport, buf, SW_LENGTH, 0); /* Read normal data packet */
^1da177e4c3f41 Linus Torvalds 2005-04-16 476 mdelay(SW_TIMEOUT);
^1da177e4c3f41 Linus Torvalds 2005-04-16 477 sw_read_packet(sw->gameport, buf, SW_LENGTH, i); /* Read ID packet, this initializes the stick */
^1da177e4c3f41 Linus Torvalds 2005-04-16 478
^1da177e4c3f41 Linus Torvalds 2005-04-16 479 sw->fail = SW_FAIL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 480
^1da177e4c3f41 Linus Torvalds 2005-04-16 481 return -1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 @482 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 483
:::::: The code at line 482 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip