Re: [PATCH v1 1/1] auxdisplay: panel: Switch to use module_parport_driver()
by kernel test robot
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc7 next-20210621]
[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/Andy-Shevchenko/auxdisplay-panel...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6b00bc639f1f2beeff3595e1bab9faaa51d23b01
config: powerpc-randconfig-r016-20210621 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e1adf90826a57b674eee79b071fb46c1f5683cd0)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/e05c6842e04754d31229738b77ce7166b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/auxdisplay-panel-Switch-to-use-module_parport_driver/20210617-050100
git checkout e05c6842e04754d31229738b77ce7166b2fa15c8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 errors (new ones prefixed by >>):
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/auxdisplay/panel.c:43:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:122:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/auxdisplay/panel.c:43:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:124:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/auxdisplay/panel.c:43:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:126:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/auxdisplay/panel.c:43:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:128:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/auxdisplay/panel.c:43:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:130:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/auxdisplay/panel.c:1617:3: error: void function 'panel_attach' should not return a value [-Wreturn-type]
return -ENODEV;
^ ~~~~~~~
13 warnings and 1 error generated.
vim +/panel_attach +1617 drivers/auxdisplay/panel.c
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1520
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1521 static void panel_attach(struct parport *port)
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1522 {
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1523 int selected_keypad_type = NOT_SET;
9be83c0a44de0c59 drivers/staging/panel/panel.c Sudip Mukherjee 2015-05-20 1524 struct pardev_cb panel_cb;
9be83c0a44de0c59 drivers/staging/panel/panel.c Sudip Mukherjee 2015-05-20 1525
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1526 /* take care of an eventual profile */
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1527 switch (profile) {
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1528 case PANEL_PROFILE_CUSTOM:
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1529 /* custom profile */
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1530 selected_keypad_type = DEFAULT_KEYPAD_TYPE;
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1531 selected_lcd_type = DEFAULT_LCD_TYPE;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1532 break;
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1533 case PANEL_PROFILE_OLD:
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1534 /* 8 bits, 2*16, old keypad */
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1535 selected_keypad_type = KEYPAD_TYPE_OLD;
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1536 selected_lcd_type = LCD_TYPE_OLD;
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1537
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1538 /* TODO: This two are a little hacky, sort it out later */
2d35bcf66c61d696 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1539 if (lcd_width == NOT_SET)
698b1515f0391438 drivers/staging/panel/panel.c Willy Tarreau 2008-11-22 1540 lcd_width = 16;
2d35bcf66c61d696 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1541 if (lcd_hwidth == NOT_SET)
698b1515f0391438 drivers/staging/panel/panel.c Willy Tarreau 2008-11-22 1542 lcd_hwidth = 16;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1543 break;
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1544 case PANEL_PROFILE_NEW:
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1545 /* serial, 2*16, new keypad */
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1546 selected_keypad_type = KEYPAD_TYPE_NEW;
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1547 selected_lcd_type = LCD_TYPE_KS0074;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1548 break;
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1549 case PANEL_PROFILE_HANTRONIX:
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1550 /* 8 bits, 2*16 hantronix-like, no keypad */
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1551 selected_keypad_type = KEYPAD_TYPE_NONE;
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1552 selected_lcd_type = LCD_TYPE_HANTRONIX;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1553 break;
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1554 case PANEL_PROFILE_NEXCOM:
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1555 /* generic 8 bits, 2*16, nexcom keypad, eg. Nexcom. */
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1556 selected_keypad_type = KEYPAD_TYPE_NEXCOM;
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1557 selected_lcd_type = LCD_TYPE_NEXCOM;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1558 break;
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1559 case PANEL_PROFILE_LARGE:
429ccf058bc20173 drivers/staging/panel/panel.c Henri Häkkinen 2010-06-12 1560 /* 8 bits, 2*40, old keypad */
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1561 selected_keypad_type = KEYPAD_TYPE_OLD;
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1562 selected_lcd_type = LCD_TYPE_OLD;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1563 break;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1564 }
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1565
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1566 /*
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1567 * Overwrite selection with module param values (both keypad and lcd),
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1568 * where the deprecated params have lower prio.
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1569 */
1a4b2e3e6c65655c drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1570 if (keypad_enabled != NOT_SET)
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1571 selected_keypad_type = keypad_enabled;
1a4b2e3e6c65655c drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1572 if (keypad_type != NOT_SET)
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1573 selected_keypad_type = keypad_type;
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1574
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1575 keypad.enabled = (selected_keypad_type > 0);
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1576
1a4b2e3e6c65655c drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1577 if (lcd_enabled != NOT_SET)
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1578 selected_lcd_type = lcd_enabled;
1a4b2e3e6c65655c drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1579 if (lcd_type != NOT_SET)
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1580 selected_lcd_type = lcd_type;
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1581
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1582 lcd.enabled = (selected_lcd_type > 0);
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1583
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1584 if (lcd.enabled) {
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1585 /*
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1586 * Init lcd struct with load-time values to preserve exact
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1587 * current functionality (at least for now).
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1588 */
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1589 lcd.charset = lcd_charset;
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1590 lcd.proto = lcd_proto;
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1591 lcd.pins.e = lcd_e_pin;
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1592 lcd.pins.rs = lcd_rs_pin;
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1593 lcd.pins.rw = lcd_rw_pin;
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1594 lcd.pins.cl = lcd_cl_pin;
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1595 lcd.pins.da = lcd_da_pin;
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1596 lcd.pins.bl = lcd_bl_pin;
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1597 }
733345ec4ee37568 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-11 1598
87b8e0c88195cfc9 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1599 switch (selected_keypad_type) {
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1600 case KEYPAD_TYPE_OLD:
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1601 keypad_profile = old_keypad_profile;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1602 break;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1603 case KEYPAD_TYPE_NEW:
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1604 keypad_profile = new_keypad_profile;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1605 break;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1606 case KEYPAD_TYPE_NEXCOM:
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1607 keypad_profile = nexcom_keypad_profile;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1608 break;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1609 default:
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1610 keypad_profile = NULL;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1611 break;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1612 }
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1613
a8b2580b736746a4 drivers/staging/panel/panel.c Mariusz Gorski 2014-11-27 1614 if (!lcd.enabled && !keypad.enabled) {
f43de77c9dddba86 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-10 1615 /* no device enabled, let's exit */
30f468b2ea7a75aa drivers/misc/panel.c Geert Uytterhoeven 2017-02-06 1616 pr_err("panel driver disabled.\n");
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 @1617 return -ENODEV;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1618 }
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1619
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1620 if (port->number != parport)
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1621 return;
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1622
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1623 if (pprt) {
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1624 pr_err("%s: port->number=%d parport=%d, already registered!\n",
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1625 __func__, port->number, parport);
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1626 return;
f43de77c9dddba86 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-10 1627 }
f43de77c9dddba86 drivers/staging/panel/panel.c Sudip Mukherjee 2015-02-10 1628
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1629 memset(&panel_cb, 0, sizeof(panel_cb));
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1630 panel_cb.private = &pprt;
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1631 /* panel_cb.flags = 0 should be PARPORT_DEV_EXCL? */
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1632
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1633 pprt = parport_register_dev_model(port, "panel", &panel_cb, 0);
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1634 if (!pprt) {
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1635 pr_err("%s: port->number=%d parport=%d, parport_register_device() failed\n",
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1636 __func__, port->number, parport);
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1637 return;
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1638 }
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1639
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1640 if (parport_claim(pprt)) {
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1641 pr_err("could not claim access to parport%d. Aborting.\n",
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1642 parport);
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1643 goto err_unreg_device;
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1644 }
7005b58458e4beec drivers/staging/panel/panel.c Willy Tarreau 2008-11-13 1645
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1646 /* must init LCD first, just in case an IRQ from the keypad is
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1647 * generated at keypad init
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1648 */
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1649 if (lcd.enabled) {
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1650 lcd_init();
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1651 if (!lcd.charlcd || charlcd_register(lcd.charlcd))
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1652 goto err_unreg_device;
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1653 }
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1654
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1655 if (keypad.enabled) {
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1656 keypad_init();
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1657 if (misc_register(&keypad_dev))
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1658 goto err_lcd_unreg;
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1659 }
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1660 return;
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1661
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1662 err_lcd_unreg:
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1663 if (scan_timer.function)
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1664 del_timer_sync(&scan_timer);
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1665 if (lcd.enabled)
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1666 charlcd_unregister(lcd.charlcd);
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1667 err_unreg_device:
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1668 kfree(lcd.charlcd);
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1669 lcd.charlcd = NULL;
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1670 parport_unregister_device(pprt);
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1671 pprt = NULL;
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1672 }
e05c6842e04754d3 drivers/auxdisplay/panel.c Andy Shevchenko 2021-06-16 1673
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[freescale-fslc:5.4-2.3.x-imx 11826/19460] include/asm-generic/div64.h:243:22: error: passing argument 1 of '__div64_32' from incompatible pointer type
by kernel test robot
Hi Adrian,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc 5.4-2.3.x-imx
head: 4efcf5cb62af1dae546bc1022b4edf6dedb6c983
commit: cdfd304a32248295f7d77f61d32137f1bb5bf64e [11826/19460] MLK-24423: sound: soc: fsl: imx pdm: fixed mclk improve voice
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/Freescale/linux-fslc/commit/cdfd304a32248295f7d77f61d3...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.4-2.3.x-imx
git checkout cdfd304a32248295f7d77f61d32137f1bb5bf64e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from ./arch/arc/include/generated/asm/div64.h:1,
from include/linux/kernel.h:18,
from include/linux/list.h:9,
from include/linux/module.h:9,
from sound/soc/fsl/imx-pdm.c:12:
sound/soc/fsl/imx-pdm.c: In function 'imx_pdm_mic_hw_params':
include/asm-generic/div64.h:226:28: warning: comparison of distinct pointer types lacks a cast
226 | (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
| ^~
sound/soc/fsl/imx-pdm.c:241:16: note: in expansion of macro 'do_div'
241 | mclk_freq = (do_div(sample_rate, 8000) ?
| ^~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:9,
from sound/soc/fsl/imx-pdm.c:12:
include/asm-generic/div64.h:239:25: warning: right shift count >= width of type [-Wshift-count-overflow]
239 | } else if (likely(((n) >> 32) == 0)) { \
| ^~
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
77 | # define likely(x) __builtin_expect(!!(x), 1)
| ^
sound/soc/fsl/imx-pdm.c:241:16: note: in expansion of macro 'do_div'
241 | mclk_freq = (do_div(sample_rate, 8000) ?
| ^~~~~~
In file included from ./arch/arc/include/generated/asm/div64.h:1,
from include/linux/kernel.h:18,
from include/linux/list.h:9,
from include/linux/module.h:9,
from sound/soc/fsl/imx-pdm.c:12:
>> include/asm-generic/div64.h:243:22: error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types]
243 | __rem = __div64_32(&(n), __base); \
| ^~~~
| |
| unsigned int *
sound/soc/fsl/imx-pdm.c:241:16: note: in expansion of macro 'do_div'
241 | mclk_freq = (do_div(sample_rate, 8000) ?
| ^~~~~~
include/asm-generic/div64.h:217:38: note: expected 'uint64_t *' {aka 'long long unsigned int *'} but argument is of type 'unsigned int *'
217 | extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
| ~~~~~~~~~~^~~~~~~~
cc1: some warnings being treated as errors
vim +/__div64_32 +243 include/asm-generic/div64.h
^1da177e4c3f415 Linus Torvalds 2005-04-16 219
^1da177e4c3f415 Linus Torvalds 2005-04-16 220 /* The unnecessary pointer compare is there
^1da177e4c3f415 Linus Torvalds 2005-04-16 221 * to check for type safety (n must be 64bit)
^1da177e4c3f415 Linus Torvalds 2005-04-16 222 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 223 # define do_div(n,base) ({ \
^1da177e4c3f415 Linus Torvalds 2005-04-16 224 uint32_t __base = (base); \
^1da177e4c3f415 Linus Torvalds 2005-04-16 225 uint32_t __rem; \
^1da177e4c3f415 Linus Torvalds 2005-04-16 226 (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
911918aa7ef6f86 Nicolas Pitre 2015-11-02 227 if (__builtin_constant_p(__base) && \
911918aa7ef6f86 Nicolas Pitre 2015-11-02 228 is_power_of_2(__base)) { \
911918aa7ef6f86 Nicolas Pitre 2015-11-02 229 __rem = (n) & (__base - 1); \
911918aa7ef6f86 Nicolas Pitre 2015-11-02 230 (n) >>= ilog2(__base); \
461a5e51060c93f Nicolas Pitre 2015-10-30 231 } else if (__div64_const32_is_OK && \
461a5e51060c93f Nicolas Pitre 2015-10-30 232 __builtin_constant_p(__base) && \
461a5e51060c93f Nicolas Pitre 2015-10-30 233 __base != 0) { \
461a5e51060c93f Nicolas Pitre 2015-10-30 234 uint32_t __res_lo, __n_lo = (n); \
461a5e51060c93f Nicolas Pitre 2015-10-30 235 (n) = __div64_const32(n, __base); \
461a5e51060c93f Nicolas Pitre 2015-10-30 236 /* the remainder can be computed with 32-bit regs */ \
461a5e51060c93f Nicolas Pitre 2015-10-30 237 __res_lo = (n); \
461a5e51060c93f Nicolas Pitre 2015-10-30 238 __rem = __n_lo - __res_lo * __base; \
911918aa7ef6f86 Nicolas Pitre 2015-11-02 239 } else if (likely(((n) >> 32) == 0)) { \
^1da177e4c3f415 Linus Torvalds 2005-04-16 240 __rem = (uint32_t)(n) % __base; \
^1da177e4c3f415 Linus Torvalds 2005-04-16 241 (n) = (uint32_t)(n) / __base; \
^1da177e4c3f415 Linus Torvalds 2005-04-16 242 } else \
^1da177e4c3f415 Linus Torvalds 2005-04-16 @243 __rem = __div64_32(&(n), __base); \
^1da177e4c3f415 Linus Torvalds 2005-04-16 244 __rem; \
^1da177e4c3f415 Linus Torvalds 2005-04-16 245 })
^1da177e4c3f415 Linus Torvalds 2005-04-16 246
:::::: The code at line 243 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
1 year, 3 months
[linux-next:master 11572/11714] include/soc/microchip/mpfs.h:49:29: warning: no previous prototype for function 'mpfs_sys_controller_get'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 889bab4c367a0ef58208fd80fafa74bb6e2dca26
commit: de5473936808627fa98c3d2e8e3fa3076338f601 [11572/11714] mbox: add polarfire soc system controller mailbox
config: arm-randconfig-r032-20210621 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e1adf90826a57b674eee79b071fb46c1f5683cd0)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout de5473936808627fa98c3d2e8e3fa3076338f601
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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 drivers/mailbox/mailbox-mpfs.c:19:
>> include/soc/microchip/mpfs.h:49:29: warning: no previous prototype for function 'mpfs_sys_controller_get' [-Wmissing-prototypes]
struct mpfs_sys_controller *mpfs_sys_controller_get(struct device_node *mailbox_node)
^
include/soc/microchip/mpfs.h:49:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct mpfs_sys_controller *mpfs_sys_controller_get(struct device_node *mailbox_node)
^
static
>> drivers/mailbox/mailbox-mpfs.c:122:43: warning: shift count >= width of type [-Wshift-count-overflow]
tx_trigger = (opt_sel << SCB_CTRL_POS) & SCB_CTRL_MASK;
^~~~~~~~~~~~~
drivers/mailbox/mailbox-mpfs.c:42:23: note: expanded from macro 'SCB_CTRL_MASK'
#define SCB_CTRL_MASK GENMASK(SCB_CTRL_POS + SCB_MASK_WIDTH, SCB_CTRL_POS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:38:31: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~
include/linux/bits.h:36:11: note: expanded from macro '__GENMASK'
(~UL(0) >> (BITS_PER_LONG - 1 - (h))))
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mailbox/mailbox-mpfs.c:19:
include/soc/microchip/mpfs.h:43:12: warning: unused function 'mpfs_blocking_transaction' [-Wunused-function]
static int mpfs_blocking_transaction(struct mpfs_sys_controller *mpfs_client, void *msg,
^
3 warnings generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for QCOM_SCM
Depends on (ARM || ARM64) && HAVE_ARM_SMCCC
Selected by
- ARM_QCOM_SPM_CPUIDLE && CPU_IDLE && (ARM || ARM64) && (ARCH_QCOM || COMPILE_TEST && !ARM64 && MMU
vim +/mpfs_sys_controller_get +49 include/soc/microchip/mpfs.h
48
> 49 struct mpfs_sys_controller *mpfs_sys_controller_get(struct device_node *mailbox_node)
50 {
51 return NULL;
52 }
53
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH 2/4] fpga: dfl: Move DFH header register macros to linux/dfl.h
by kernel test robot
Hi "Martin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on hwmon/hwmon-next]
[also build test ERROR on spi/for-next lee-mfd/for-mfd-next linus/master v5.13-rc7 next-20210621]
[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/Martin-Hundeb-ll/fpga-mfd-hwmon-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: mips-randconfig-r005-20210621 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e1adf90826a57b674eee79b071fb46c1f5683cd0)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/3cd517ceee3e0bb24e44dd409f3ba2652...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Martin-Hundeb-ll/fpga-mfd-hwmon-Initial-support-for-Silicom-N5010-PAC/20210621-150923
git checkout 3cd517ceee3e0bb24e44dd409f3ba2652c2ed297
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/fpga/dfl.c:13:
>> include/linux/dfl.h:117:10: error: implicit declaration of function 'readq' [-Werror,-Wimplicit-function-declaration]
u64 v = readq(base + DFH);
^
include/linux/dfl.h:126:10: error: implicit declaration of function 'readq' [-Werror,-Wimplicit-function-declaration]
u64 v = readq(base + DFH);
^
include/linux/dfl.h:135:37: error: implicit declaration of function 'readq' [-Werror,-Wimplicit-function-declaration]
return (u8)FIELD_GET(DFH_REVISION, readq(base + DFH));
^
include/linux/dfl.h:135:37: error: implicit declaration of function 'readq' [-Werror,-Wimplicit-function-declaration]
4 errors generated.
vim +/readq +117 include/linux/dfl.h
113
114 /* Function to read from DFH and check if the Feature type is FME */
115 static inline bool dfl_feature_is_fme(void __iomem *base)
116 {
> 117 u64 v = readq(base + DFH);
118
119 return (FIELD_GET(DFH_TYPE, v) == DFH_TYPE_FIU) &&
120 (FIELD_GET(DFH_ID, v) == DFH_ID_FIU_FME);
121 }
122
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[linux-next:master 11572/11714] include/soc/microchip/mpfs.h:49:29: warning: no previous prototype for 'mpfs_sys_controller_get'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 889bab4c367a0ef58208fd80fafa74bb6e2dca26
commit: de5473936808627fa98c3d2e8e3fa3076338f601 [11572/11714] mbox: add polarfire soc system controller mailbox
config: microblaze-randconfig-r012-20210621 (attached as .config)
compiler: microblaze-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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout de5473936808627fa98c3d2e8e3fa3076338f601
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze
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 drivers/mailbox/mailbox-mpfs.c:19:
>> include/soc/microchip/mpfs.h:49:29: warning: no previous prototype for 'mpfs_sys_controller_get' [-Wmissing-prototypes]
49 | struct mpfs_sys_controller *mpfs_sys_controller_get(struct device_node *mailbox_node)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bitops.h:6,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:20,
from ./arch/microblaze/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/io.h:11,
from drivers/mailbox/mailbox-mpfs.c:11:
drivers/mailbox/mailbox-mpfs.c: In function 'mpfs_mbox_send_data':
>> include/linux/bits.h:36:11: warning: right shift count >= width of type [-Wshift-count-overflow]
36 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bits.h:38:31: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/mailbox/mailbox-mpfs.c:42:23: note: in expansion of macro 'GENMASK'
42 | #define SCB_CTRL_MASK GENMASK(SCB_CTRL_POS + SCB_MASK_WIDTH, SCB_CTRL_POS)
| ^~~~~~~
drivers/mailbox/mailbox-mpfs.c:122:43: note: in expansion of macro 'SCB_CTRL_MASK'
122 | tx_trigger = (opt_sel << SCB_CTRL_POS) & SCB_CTRL_MASK;
| ^~~~~~~~~~~~~
In file included from drivers/mailbox/mailbox-mpfs.c:19:
At top level:
include/soc/microchip/mpfs.h:43:12: warning: 'mpfs_blocking_transaction' defined but not used [-Wunused-function]
43 | static int mpfs_blocking_transaction(struct mpfs_sys_controller *mpfs_client, void *msg,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/mpfs_sys_controller_get +49 include/soc/microchip/mpfs.h
48
> 49 struct mpfs_sys_controller *mpfs_sys_controller_get(struct device_node *mailbox_node)
50 {
51 return NULL;
52 }
53
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
arch/powerpc/kvm/book3s_hv_nested.c:264:6: error: stack frame size of 2304 bytes in function 'kvmhv_enter_nested_guest'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d93a0d43e3d0ba9e19387be4dae4a8d5b175a8d7
commit: 97e4910232fa1f81e806aa60c25a0450276d99a2 linux/compiler-clang.h: define HAVE_BUILTIN_BSWAP*
date: 3 weeks ago
config: powerpc64-randconfig-r006-20210403 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0fe8af94688aa03c01913c2001d6a1a911f42ce6)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 97e4910232fa1f81e806aa60c25a0450276d99a2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/kvm/book3s_hv_nested.c:264:6: error: stack frame size of 2304 bytes in function 'kvmhv_enter_nested_guest' [-Werror,-Wframe-larger-than=]
long kvmhv_enter_nested_guest(struct kvm_vcpu *vcpu)
^
1 error generated.
vim +/kvmhv_enter_nested_guest +264 arch/powerpc/kvm/book3s_hv_nested.c
afe75049303f75 Ravi Bangoria 2020-12-16 263
360cae313702cd Paul Mackerras 2018-10-08 @264 long kvmhv_enter_nested_guest(struct kvm_vcpu *vcpu)
360cae313702cd Paul Mackerras 2018-10-08 265 {
360cae313702cd Paul Mackerras 2018-10-08 266 long int err, r;
360cae313702cd Paul Mackerras 2018-10-08 267 struct kvm_nested_guest *l2;
360cae313702cd Paul Mackerras 2018-10-08 268 struct pt_regs l2_regs, saved_l1_regs;
afe75049303f75 Ravi Bangoria 2020-12-16 269 struct hv_guest_state l2_hv = {0}, saved_l1_hv;
360cae313702cd Paul Mackerras 2018-10-08 270 struct kvmppc_vcore *vc = vcpu->arch.vcore;
360cae313702cd Paul Mackerras 2018-10-08 271 u64 hv_ptr, regs_ptr;
360cae313702cd Paul Mackerras 2018-10-08 272 u64 hdec_exp;
360cae313702cd Paul Mackerras 2018-10-08 273 s64 delta_purr, delta_spurr, delta_ic, delta_vtb;
360cae313702cd Paul Mackerras 2018-10-08 274 u64 mask;
360cae313702cd Paul Mackerras 2018-10-08 275 unsigned long lpcr;
360cae313702cd Paul Mackerras 2018-10-08 276
360cae313702cd Paul Mackerras 2018-10-08 277 if (vcpu->kvm->arch.l1_ptcr == 0)
360cae313702cd Paul Mackerras 2018-10-08 278 return H_NOT_AVAILABLE;
360cae313702cd Paul Mackerras 2018-10-08 279
360cae313702cd Paul Mackerras 2018-10-08 280 /* copy parameters in */
360cae313702cd Paul Mackerras 2018-10-08 281 hv_ptr = kvmppc_get_gpr(vcpu, 4);
1508c22f112ce1 Alexey Kardashevskiy 2020-06-09 282 regs_ptr = kvmppc_get_gpr(vcpu, 5);
1508c22f112ce1 Alexey Kardashevskiy 2020-06-09 283 vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
afe75049303f75 Ravi Bangoria 2020-12-16 284 err = kvmhv_read_guest_state_and_regs(vcpu, &l2_hv, &l2_regs,
afe75049303f75 Ravi Bangoria 2020-12-16 285 hv_ptr, regs_ptr);
1508c22f112ce1 Alexey Kardashevskiy 2020-06-09 286 srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
360cae313702cd Paul Mackerras 2018-10-08 287 if (err)
360cae313702cd Paul Mackerras 2018-10-08 288 return H_PARAMETER;
1508c22f112ce1 Alexey Kardashevskiy 2020-06-09 289
10b5022db7861a Suraj Jitindar Singh 2018-10-08 290 if (kvmppc_need_byteswap(vcpu))
10b5022db7861a Suraj Jitindar Singh 2018-10-08 291 byteswap_hv_regs(&l2_hv);
afe75049303f75 Ravi Bangoria 2020-12-16 292 if (l2_hv.version > HV_GUEST_STATE_VERSION)
360cae313702cd Paul Mackerras 2018-10-08 293 return H_P2;
360cae313702cd Paul Mackerras 2018-10-08 294
10b5022db7861a Suraj Jitindar Singh 2018-10-08 295 if (kvmppc_need_byteswap(vcpu))
10b5022db7861a Suraj Jitindar Singh 2018-10-08 296 byteswap_pt_regs(&l2_regs);
9d0b048da788c1 Suraj Jitindar Singh 2018-10-08 297 if (l2_hv.vcpu_token >= NR_CPUS)
9d0b048da788c1 Suraj Jitindar Singh 2018-10-08 298 return H_PARAMETER;
9d0b048da788c1 Suraj Jitindar Singh 2018-10-08 299
360cae313702cd Paul Mackerras 2018-10-08 300 /* translate lpid */
360cae313702cd Paul Mackerras 2018-10-08 301 l2 = kvmhv_get_nested(vcpu->kvm, l2_hv.lpid, true);
360cae313702cd Paul Mackerras 2018-10-08 302 if (!l2)
360cae313702cd Paul Mackerras 2018-10-08 303 return H_PARAMETER;
360cae313702cd Paul Mackerras 2018-10-08 304 if (!l2->l1_gr_to_hr) {
360cae313702cd Paul Mackerras 2018-10-08 305 mutex_lock(&l2->tlb_lock);
360cae313702cd Paul Mackerras 2018-10-08 306 kvmhv_update_ptbl_cache(l2);
360cae313702cd Paul Mackerras 2018-10-08 307 mutex_unlock(&l2->tlb_lock);
360cae313702cd Paul Mackerras 2018-10-08 308 }
360cae313702cd Paul Mackerras 2018-10-08 309
360cae313702cd Paul Mackerras 2018-10-08 310 /* save l1 values of things */
360cae313702cd Paul Mackerras 2018-10-08 311 vcpu->arch.regs.msr = vcpu->arch.shregs.msr;
360cae313702cd Paul Mackerras 2018-10-08 312 saved_l1_regs = vcpu->arch.regs;
360cae313702cd Paul Mackerras 2018-10-08 313 kvmhv_save_hv_regs(vcpu, &saved_l1_hv);
360cae313702cd Paul Mackerras 2018-10-08 314
360cae313702cd Paul Mackerras 2018-10-08 315 /* convert TB values/offsets to host (L0) values */
360cae313702cd Paul Mackerras 2018-10-08 316 hdec_exp = l2_hv.hdec_expiry - vc->tb_offset;
360cae313702cd Paul Mackerras 2018-10-08 317 vc->tb_offset += l2_hv.tb_offset;
360cae313702cd Paul Mackerras 2018-10-08 318
360cae313702cd Paul Mackerras 2018-10-08 319 /* set L1 state to L2 state */
360cae313702cd Paul Mackerras 2018-10-08 320 vcpu->arch.nested = l2;
360cae313702cd Paul Mackerras 2018-10-08 321 vcpu->arch.nested_vcpu_id = l2_hv.vcpu_token;
360cae313702cd Paul Mackerras 2018-10-08 322 vcpu->arch.regs = l2_regs;
360cae313702cd Paul Mackerras 2018-10-08 323 vcpu->arch.shregs.msr = vcpu->arch.regs.msr;
360cae313702cd Paul Mackerras 2018-10-08 324 mask = LPCR_DPFD | LPCR_ILE | LPCR_TC | LPCR_AIL | LPCR_LD |
360cae313702cd Paul Mackerras 2018-10-08 325 LPCR_LPES | LPCR_MER;
360cae313702cd Paul Mackerras 2018-10-08 326 lpcr = (vc->lpcr & ~mask) | (l2_hv.lpcr & mask);
73937deb4b2d7f Suraj Jitindar Singh 2018-10-08 327 sanitise_hv_regs(vcpu, &l2_hv);
360cae313702cd Paul Mackerras 2018-10-08 328 restore_hv_regs(vcpu, &l2_hv);
360cae313702cd Paul Mackerras 2018-10-08 329
360cae313702cd Paul Mackerras 2018-10-08 330 vcpu->arch.ret = RESUME_GUEST;
360cae313702cd Paul Mackerras 2018-10-08 331 vcpu->arch.trap = 0;
360cae313702cd Paul Mackerras 2018-10-08 332 do {
360cae313702cd Paul Mackerras 2018-10-08 333 if (mftb() >= hdec_exp) {
360cae313702cd Paul Mackerras 2018-10-08 334 vcpu->arch.trap = BOOK3S_INTERRUPT_HV_DECREMENTER;
360cae313702cd Paul Mackerras 2018-10-08 335 r = RESUME_HOST;
360cae313702cd Paul Mackerras 2018-10-08 336 break;
360cae313702cd Paul Mackerras 2018-10-08 337 }
8c99d34578628b Tianjia Zhang 2020-04-27 338 r = kvmhv_run_single_vcpu(vcpu, hdec_exp, lpcr);
360cae313702cd Paul Mackerras 2018-10-08 339 } while (is_kvmppc_resume_guest(r));
360cae313702cd Paul Mackerras 2018-10-08 340
360cae313702cd Paul Mackerras 2018-10-08 341 /* save L2 state for return */
360cae313702cd Paul Mackerras 2018-10-08 342 l2_regs = vcpu->arch.regs;
360cae313702cd Paul Mackerras 2018-10-08 343 l2_regs.msr = vcpu->arch.shregs.msr;
360cae313702cd Paul Mackerras 2018-10-08 344 delta_purr = vcpu->arch.purr - l2_hv.purr;
360cae313702cd Paul Mackerras 2018-10-08 345 delta_spurr = vcpu->arch.spurr - l2_hv.spurr;
360cae313702cd Paul Mackerras 2018-10-08 346 delta_ic = vcpu->arch.ic - l2_hv.ic;
360cae313702cd Paul Mackerras 2018-10-08 347 delta_vtb = vc->vtb - l2_hv.vtb;
360cae313702cd Paul Mackerras 2018-10-08 348 save_hv_return_state(vcpu, vcpu->arch.trap, &l2_hv);
360cae313702cd Paul Mackerras 2018-10-08 349
360cae313702cd Paul Mackerras 2018-10-08 350 /* restore L1 state */
360cae313702cd Paul Mackerras 2018-10-08 351 vcpu->arch.nested = NULL;
360cae313702cd Paul Mackerras 2018-10-08 352 vcpu->arch.regs = saved_l1_regs;
360cae313702cd Paul Mackerras 2018-10-08 353 vcpu->arch.shregs.msr = saved_l1_regs.msr & ~MSR_TS_MASK;
360cae313702cd Paul Mackerras 2018-10-08 354 /* set L1 MSR TS field according to L2 transaction state */
360cae313702cd Paul Mackerras 2018-10-08 355 if (l2_regs.msr & MSR_TS_MASK)
360cae313702cd Paul Mackerras 2018-10-08 356 vcpu->arch.shregs.msr |= MSR_TS_S;
360cae313702cd Paul Mackerras 2018-10-08 357 vc->tb_offset = saved_l1_hv.tb_offset;
360cae313702cd Paul Mackerras 2018-10-08 358 restore_hv_regs(vcpu, &saved_l1_hv);
360cae313702cd Paul Mackerras 2018-10-08 359 vcpu->arch.purr += delta_purr;
360cae313702cd Paul Mackerras 2018-10-08 360 vcpu->arch.spurr += delta_spurr;
360cae313702cd Paul Mackerras 2018-10-08 361 vcpu->arch.ic += delta_ic;
360cae313702cd Paul Mackerras 2018-10-08 362 vc->vtb += delta_vtb;
360cae313702cd Paul Mackerras 2018-10-08 363
360cae313702cd Paul Mackerras 2018-10-08 364 kvmhv_put_nested(l2);
360cae313702cd Paul Mackerras 2018-10-08 365
360cae313702cd Paul Mackerras 2018-10-08 366 /* copy l2_hv_state and regs back to guest */
10b5022db7861a Suraj Jitindar Singh 2018-10-08 367 if (kvmppc_need_byteswap(vcpu)) {
10b5022db7861a Suraj Jitindar Singh 2018-10-08 368 byteswap_hv_regs(&l2_hv);
10b5022db7861a Suraj Jitindar Singh 2018-10-08 369 byteswap_pt_regs(&l2_regs);
10b5022db7861a Suraj Jitindar Singh 2018-10-08 370 }
1508c22f112ce1 Alexey Kardashevskiy 2020-06-09 371 vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
afe75049303f75 Ravi Bangoria 2020-12-16 372 err = kvmhv_write_guest_state_and_regs(vcpu, &l2_hv, &l2_regs,
afe75049303f75 Ravi Bangoria 2020-12-16 373 hv_ptr, regs_ptr);
1508c22f112ce1 Alexey Kardashevskiy 2020-06-09 374 srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
360cae313702cd Paul Mackerras 2018-10-08 375 if (err)
360cae313702cd Paul Mackerras 2018-10-08 376 return H_AUTHORITY;
360cae313702cd Paul Mackerras 2018-10-08 377
360cae313702cd Paul Mackerras 2018-10-08 378 if (r == -EINTR)
360cae313702cd Paul Mackerras 2018-10-08 379 return H_INTERRUPT;
360cae313702cd Paul Mackerras 2018-10-08 380
873db2cd9a6d7f Suraj Jitindar Singh 2018-12-14 381 if (vcpu->mmio_needed) {
873db2cd9a6d7f Suraj Jitindar Singh 2018-12-14 382 kvmhv_nested_mmio_needed(vcpu, regs_ptr);
873db2cd9a6d7f Suraj Jitindar Singh 2018-12-14 383 return H_TOO_HARD;
873db2cd9a6d7f Suraj Jitindar Singh 2018-12-14 384 }
873db2cd9a6d7f Suraj Jitindar Singh 2018-12-14 385
360cae313702cd Paul Mackerras 2018-10-08 386 return vcpu->arch.trap;
360cae313702cd Paul Mackerras 2018-10-08 387 }
360cae313702cd Paul Mackerras 2018-10-08 388
:::::: The code at line 264 was first introduced by commit
:::::: 360cae313702cdd0b90f82c261a8302fecef030a KVM: PPC: Book3S HV: Nested guest entry via hypercall
:::::: TO: Paul Mackerras <paulus(a)ozlabs.org>
:::::: CC: Michael Ellerman <mpe(a)ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
drivers/edac/altera_edac.c:541:42: warning: unused variable 'ocramecc_data'
by kernel test robot
Hi Krzysztof,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 13311e74253fe64329390df80bed3f07314ddd61
commit: 4a9a1a5602d82c079325bf37466af0b67d6c0b9e arm64: socfpga: merge Agilex and N5X into ARCH_INTEL_SOCFPGA
date: 3 months ago
config: arm64-randconfig-r024-20210621 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e1adf90826a57b674eee79b071fb46c1f5683cd0)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4a9a1a5602d82c079325bf37466af0b67d6c0b9e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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/edac/altera_edac.c:541:42: warning: unused variable 'ocramecc_data' [-Wunused-const-variable]
static const struct edac_device_prv_data ocramecc_data;
^
drivers/edac/altera_edac.c:542:42: warning: unused variable 'l2ecc_data' [-Wunused-const-variable]
static const struct edac_device_prv_data l2ecc_data;
^
>> drivers/edac/altera_edac.c:543:42: warning: unused variable 'a10_ocramecc_data' [-Wunused-const-variable]
static const struct edac_device_prv_data a10_ocramecc_data;
^
drivers/edac/altera_edac.c:544:42: warning: unused variable 'a10_l2ecc_data' [-Wunused-const-variable]
static const struct edac_device_prv_data a10_l2ecc_data;
^
>> drivers/edac/altera_edac.c:642:37: warning: unused variable 'altr_edac_device_inject_fops' [-Wunused-const-variable]
static const struct file_operations altr_edac_device_inject_fops = {
^
5 warnings generated.
vim +/ocramecc_data +541 drivers/edac/altera_edac.c
c3eea1942a16db Thor Thayer 2016-02-10 532
c3eea1942a16db Thor Thayer 2016-02-10 533 /*
c3eea1942a16db Thor Thayer 2016-02-10 534 * EDAC Device Functions (shared between various IPs).
c3eea1942a16db Thor Thayer 2016-02-10 535 * The discrete memories use the EDAC Device framework. The probe
c3eea1942a16db Thor Thayer 2016-02-10 536 * and error handling functions are very similar between memories
c3eea1942a16db Thor Thayer 2016-02-10 537 * so they are shared. The memory allocation and freeing for EDAC
c3eea1942a16db Thor Thayer 2016-02-10 538 * trigger testing are different for each memory.
c3eea1942a16db Thor Thayer 2016-02-10 539 */
c3eea1942a16db Thor Thayer 2016-02-10 540
1cf70377247302 Thor Thayer 2016-06-22 @541 static const struct edac_device_prv_data ocramecc_data;
1cf70377247302 Thor Thayer 2016-06-22 542 static const struct edac_device_prv_data l2ecc_data;
1cf70377247302 Thor Thayer 2016-06-22 @543 static const struct edac_device_prv_data a10_ocramecc_data;
1cf70377247302 Thor Thayer 2016-06-22 544 static const struct edac_device_prv_data a10_l2ecc_data;
c3eea1942a16db Thor Thayer 2016-02-10 545
c3eea1942a16db Thor Thayer 2016-02-10 546 static irqreturn_t altr_edac_device_handler(int irq, void *dev_id)
c3eea1942a16db Thor Thayer 2016-02-10 547 {
c3eea1942a16db Thor Thayer 2016-02-10 548 irqreturn_t ret_value = IRQ_NONE;
c3eea1942a16db Thor Thayer 2016-02-10 549 struct edac_device_ctl_info *dci = dev_id;
c3eea1942a16db Thor Thayer 2016-02-10 550 struct altr_edac_device_dev *drvdata = dci->pvt_info;
c3eea1942a16db Thor Thayer 2016-02-10 551 const struct edac_device_prv_data *priv = drvdata->data;
c3eea1942a16db Thor Thayer 2016-02-10 552
c3eea1942a16db Thor Thayer 2016-02-10 553 if (irq == drvdata->sb_irq) {
c3eea1942a16db Thor Thayer 2016-02-10 554 if (priv->ce_clear_mask)
c3eea1942a16db Thor Thayer 2016-02-10 555 writel(priv->ce_clear_mask, drvdata->base);
c3eea1942a16db Thor Thayer 2016-02-10 556 edac_device_handle_ce(dci, 0, 0, drvdata->edac_dev_name);
c3eea1942a16db Thor Thayer 2016-02-10 557 ret_value = IRQ_HANDLED;
c3eea1942a16db Thor Thayer 2016-02-10 558 } else if (irq == drvdata->db_irq) {
c3eea1942a16db Thor Thayer 2016-02-10 559 if (priv->ue_clear_mask)
c3eea1942a16db Thor Thayer 2016-02-10 560 writel(priv->ue_clear_mask, drvdata->base);
c3eea1942a16db Thor Thayer 2016-02-10 561 edac_device_handle_ue(dci, 0, 0, drvdata->edac_dev_name);
c3eea1942a16db Thor Thayer 2016-02-10 562 panic("\nEDAC:ECC_DEVICE[Uncorrectable errors]\n");
c3eea1942a16db Thor Thayer 2016-02-10 563 ret_value = IRQ_HANDLED;
c3eea1942a16db Thor Thayer 2016-02-10 564 } else {
c3eea1942a16db Thor Thayer 2016-02-10 565 WARN_ON(1);
c3eea1942a16db Thor Thayer 2016-02-10 566 }
c3eea1942a16db Thor Thayer 2016-02-10 567
c3eea1942a16db Thor Thayer 2016-02-10 568 return ret_value;
c3eea1942a16db Thor Thayer 2016-02-10 569 }
c3eea1942a16db Thor Thayer 2016-02-10 570
c3eea1942a16db Thor Thayer 2016-02-10 571 static ssize_t altr_edac_device_trig(struct file *file,
c3eea1942a16db Thor Thayer 2016-02-10 572 const char __user *user_buf,
c3eea1942a16db Thor Thayer 2016-02-10 573 size_t count, loff_t *ppos)
c3eea1942a16db Thor Thayer 2016-02-10 574
c3eea1942a16db Thor Thayer 2016-02-10 575 {
c3eea1942a16db Thor Thayer 2016-02-10 576 u32 *ptemp, i, error_mask;
c3eea1942a16db Thor Thayer 2016-02-10 577 int result = 0;
c3eea1942a16db Thor Thayer 2016-02-10 578 u8 trig_type;
c3eea1942a16db Thor Thayer 2016-02-10 579 unsigned long flags;
c3eea1942a16db Thor Thayer 2016-02-10 580 struct edac_device_ctl_info *edac_dci = file->private_data;
c3eea1942a16db Thor Thayer 2016-02-10 581 struct altr_edac_device_dev *drvdata = edac_dci->pvt_info;
c3eea1942a16db Thor Thayer 2016-02-10 582 const struct edac_device_prv_data *priv = drvdata->data;
c3eea1942a16db Thor Thayer 2016-02-10 583 void *generic_ptr = edac_dci->dev;
c3eea1942a16db Thor Thayer 2016-02-10 584
c3eea1942a16db Thor Thayer 2016-02-10 585 if (!user_buf || get_user(trig_type, user_buf))
c3eea1942a16db Thor Thayer 2016-02-10 586 return -EFAULT;
c3eea1942a16db Thor Thayer 2016-02-10 587
c3eea1942a16db Thor Thayer 2016-02-10 588 if (!priv->alloc_mem)
c3eea1942a16db Thor Thayer 2016-02-10 589 return -ENOMEM;
c3eea1942a16db Thor Thayer 2016-02-10 590
c3eea1942a16db Thor Thayer 2016-02-10 591 /*
c3eea1942a16db Thor Thayer 2016-02-10 592 * Note that generic_ptr is initialized to the device * but in
c3eea1942a16db Thor Thayer 2016-02-10 593 * some alloc_functions, this is overridden and returns data.
c3eea1942a16db Thor Thayer 2016-02-10 594 */
c3eea1942a16db Thor Thayer 2016-02-10 595 ptemp = priv->alloc_mem(priv->trig_alloc_sz, &generic_ptr);
c3eea1942a16db Thor Thayer 2016-02-10 596 if (!ptemp) {
c3eea1942a16db Thor Thayer 2016-02-10 597 edac_printk(KERN_ERR, EDAC_DEVICE,
c3eea1942a16db Thor Thayer 2016-02-10 598 "Inject: Buffer Allocation error\n");
c3eea1942a16db Thor Thayer 2016-02-10 599 return -ENOMEM;
c3eea1942a16db Thor Thayer 2016-02-10 600 }
c3eea1942a16db Thor Thayer 2016-02-10 601
c3eea1942a16db Thor Thayer 2016-02-10 602 if (trig_type == ALTR_UE_TRIGGER_CHAR)
c3eea1942a16db Thor Thayer 2016-02-10 603 error_mask = priv->ue_set_mask;
c3eea1942a16db Thor Thayer 2016-02-10 604 else
c3eea1942a16db Thor Thayer 2016-02-10 605 error_mask = priv->ce_set_mask;
c3eea1942a16db Thor Thayer 2016-02-10 606
c3eea1942a16db Thor Thayer 2016-02-10 607 edac_printk(KERN_ALERT, EDAC_DEVICE,
c3eea1942a16db Thor Thayer 2016-02-10 608 "Trigger Error Mask (0x%X)\n", error_mask);
c3eea1942a16db Thor Thayer 2016-02-10 609
c3eea1942a16db Thor Thayer 2016-02-10 610 local_irq_save(flags);
c3eea1942a16db Thor Thayer 2016-02-10 611 /* write ECC corrupted data out. */
c3eea1942a16db Thor Thayer 2016-02-10 612 for (i = 0; i < (priv->trig_alloc_sz / sizeof(*ptemp)); i++) {
c3eea1942a16db Thor Thayer 2016-02-10 613 /* Read data so we're in the correct state */
c3eea1942a16db Thor Thayer 2016-02-10 614 rmb();
332efa6374de75 Mark Rutland 2017-10-23 615 if (READ_ONCE(ptemp[i]))
c3eea1942a16db Thor Thayer 2016-02-10 616 result = -1;
c3eea1942a16db Thor Thayer 2016-02-10 617 /* Toggle Error bit (it is latched), leave ECC enabled */
811fce4f2a7aea Thor Thayer 2016-03-21 618 writel(error_mask, (drvdata->base + priv->set_err_ofst));
811fce4f2a7aea Thor Thayer 2016-03-21 619 writel(priv->ecc_enable_mask, (drvdata->base +
811fce4f2a7aea Thor Thayer 2016-03-21 620 priv->set_err_ofst));
c3eea1942a16db Thor Thayer 2016-02-10 621 ptemp[i] = i;
c3eea1942a16db Thor Thayer 2016-02-10 622 }
c3eea1942a16db Thor Thayer 2016-02-10 623 /* Ensure it has been written out */
c3eea1942a16db Thor Thayer 2016-02-10 624 wmb();
c3eea1942a16db Thor Thayer 2016-02-10 625 local_irq_restore(flags);
c3eea1942a16db Thor Thayer 2016-02-10 626
c3eea1942a16db Thor Thayer 2016-02-10 627 if (result)
c3eea1942a16db Thor Thayer 2016-02-10 628 edac_printk(KERN_ERR, EDAC_DEVICE, "Mem Not Cleared\n");
c3eea1942a16db Thor Thayer 2016-02-10 629
c3eea1942a16db Thor Thayer 2016-02-10 630 /* Read out written data. ECC error caused here */
c3eea1942a16db Thor Thayer 2016-02-10 631 for (i = 0; i < ALTR_TRIGGER_READ_WRD_CNT; i++)
332efa6374de75 Mark Rutland 2017-10-23 632 if (READ_ONCE(ptemp[i]) != i)
c3eea1942a16db Thor Thayer 2016-02-10 633 edac_printk(KERN_ERR, EDAC_DEVICE,
c3eea1942a16db Thor Thayer 2016-02-10 634 "Read doesn't match written data\n");
c3eea1942a16db Thor Thayer 2016-02-10 635
c3eea1942a16db Thor Thayer 2016-02-10 636 if (priv->free_mem)
c3eea1942a16db Thor Thayer 2016-02-10 637 priv->free_mem(ptemp, priv->trig_alloc_sz, generic_ptr);
c3eea1942a16db Thor Thayer 2016-02-10 638
c3eea1942a16db Thor Thayer 2016-02-10 639 return count;
c3eea1942a16db Thor Thayer 2016-02-10 640 }
c3eea1942a16db Thor Thayer 2016-02-10 641
c3eea1942a16db Thor Thayer 2016-02-10 @642 static const struct file_operations altr_edac_device_inject_fops = {
c3eea1942a16db Thor Thayer 2016-02-10 643 .open = simple_open,
c3eea1942a16db Thor Thayer 2016-02-10 644 .write = altr_edac_device_trig,
c3eea1942a16db Thor Thayer 2016-02-10 645 .llseek = generic_file_llseek,
c3eea1942a16db Thor Thayer 2016-02-10 646 };
c3eea1942a16db Thor Thayer 2016-02-10 647
:::::: The code at line 541 was first introduced by commit
:::::: 1cf703772473022ac89d815871b20aa4738449b4 EDAC, altera: Make all private data structures static
:::::: TO: Thor Thayer <tthayer(a)opensource.altera.com>
:::::: CC: Borislav Petkov <bp(a)suse.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months