[omap:serdev-ngsm-pending-v5.7 17/29] drivers/tty/n_gsm.c:2564:18: warning: variable 'gsm' set but not used
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git serdev-ngsm-pending-v5.7
head: 4eda51fea6be98ca5a4023a988b102bf3629b295
commit: c19326e2c3e68ca54628039dd7b79b8ff0e44680 [17/29] tty: n_gsm: Add support for serdev drivers
config: nios2-randconfig-r032-20200522 (attached as .config)
compiler: nios2-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 c19326e2c3e68ca54628039dd7b79b8ff0e44680
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/tty/n_gsm.c: In function 'gsm_serdev_register_dlci':
>> drivers/tty/n_gsm.c:2564:18: warning: variable 'gsm' set but not used [-Wunused-but-set-variable]
2564 | struct gsm_mux *gsm;
| ^~~
drivers/tty/n_gsm.c: In function 'gsm_serdev_unregister_dlci':
drivers/tty/n_gsm.c:2621:18: warning: variable 'gsm' set but not used [-Wunused-but-set-variable]
2621 | struct gsm_mux *gsm;
| ^~~
vim +/gsm +2564 drivers/tty/n_gsm.c
2554
2555 /**
2556 * gsm_serdev_register_dlci - register a ts 27.010 channel
2557 * @gsd: serdev-gsm instance
2558 * @ops: channel ops
2559 */
2560 int gsm_serdev_register_dlci(struct gsm_serdev *gsd,
2561 struct gsm_serdev_dlci *ops)
2562 {
2563 struct gsm_dlci *dlci;
> 2564 struct gsm_mux *gsm;
2565 int retries;
2566
2567 if (!gsd || !gsd->gsm || !gsd->serdev)
2568 return -ENODEV;
2569
2570 gsm = gsd->gsm;
2571
2572 if (!ops || !ops->line)
2573 return -EINVAL;
2574
2575 dlci = gsd_dlci_get(gsd, ops->line, true);
2576 if (IS_ERR(dlci))
2577 return PTR_ERR(dlci);
2578
2579 if (dlci->state == DLCI_OPENING || dlci->state == DLCI_OPEN ||
2580 dlci->state == DLCI_CLOSING)
2581 return -EBUSY;
2582
2583 mutex_lock(&dlci->mutex);
2584 ops->gsd = gsd;
2585 dlci->ops = ops;
2586 dlci->modem_rx = 0;
2587 dlci->prev_data = dlci->data;
2588 dlci->data = gsd_dlci_data;
2589 mutex_unlock(&dlci->mutex);
2590
2591 gsm_dlci_begin_open(dlci);
2592
2593 /*
2594 * Allow some time for dlci to move to DLCI_OPEN state. Otherwise
2595 * the serdev consumer driver can start sending data too early during
2596 * the setup, and the response will be missed by gms_queue() if we
2597 * still have DLCI_CLOSED state.
2598 */
2599 for (retries = 10; retries > 0; retries--) {
2600 if (dlci->state == DLCI_OPEN)
2601 break;
2602 msleep(100);
2603 }
2604
2605 if (!retries)
2606 dev_dbg(&gsd->serdev->dev, "dlci%i not currently active\n",
2607 dlci->addr);
2608
2609 return 0;
2610 }
2611 EXPORT_SYMBOL_GPL(gsm_serdev_register_dlci);
2612
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[jwboyer-fedora:f30 69/98] include/asm-generic/termios.h:25:38: warning: comparison of unsigned expression < 0 is always false
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git f30
head: 2a9c1e3b6c53a78a96a7fd9599f95172fb9e9ac9
commit: 2811f52835b76d7f45858f725b3ede99a57e5001 [69/98] ARM: fix __get_user_check() in case uaccess_* calls are not inlined
config: arm-randconfig-r025-20200521 (attached as .config)
compiler: arm-linux-gnueabi-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 2811f52835b76d7f45858f725b3ede99a57e5001
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/tty.h:7,
from drivers/tty/n_tracerouter.c:21:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
>> include/asm-generic/termios.h:25:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp, &termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
--
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/tty.h:7,
from drivers/tty/tty_ldisc.c:7:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
>> include/asm-generic/termios.h:25:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp, &termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
drivers/tty/tty_ldisc.c: At top level:
drivers/tty/tty_ldisc.c:884:6: warning: no previous prototype for 'tty_sysctl_init' [-Wmissing-prototypes]
884 | void tty_sysctl_init(void)
| ^~~~~~~~~~~~~~~
--
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/serdev.h:10,
from drivers/tty/serdev/core.c:19:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
>> include/asm-generic/termios.h:25:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp, &termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
drivers/tty/serdev/core.c: In function 'serdev_controller_remove':
drivers/tty/serdev/core.c:791:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
791 | int dummy;
| ^~~~~
--
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/tty.h:7,
from include/linux/serial_core.h:17,
from drivers/tty/serial/8250/serial_cs.c:42:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
>> include/asm-generic/termios.h:25:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp, &termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
drivers/tty/serial/8250/serial_cs.c: In function 'multi_config':
drivers/tty/serial/8250/serial_cs.c:562:7: warning: variable 'err' set but not used [-Wunused-but-set-variable]
562 | int err;
| ^~~
--
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/tty.h:7,
from drivers/tty/serial/8250/8250_core.c:26:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
>> include/asm-generic/termios.h:25:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp, &termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
drivers/tty/serial/8250/8250_core.c: In function 'serial8250_isa_init_ports':
drivers/tty/serial/8250/8250_core.c:537:9: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
537 | i < ARRAY_SIZE(old_serial_port) && i < nr_uarts;
| ^
--
In file included from ./arch/arm/include/generated/uapi/asm/termios.h:1,
from include/uapi/linux/termios.h:6,
from include/linux/tty.h:7,
from drivers/tty/serial/jsm/jsm_cls.c:23:
include/asm-generic/termios.h: In function 'user_termio_to_kernel_termios':
>> include/asm-generic/termios.h:25:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
25 | if (get_user(tmp, &termio->c_iflag) < 0)
| ^
include/asm-generic/termios.h:29:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
29 | if (get_user(tmp, &termio->c_oflag) < 0)
| ^
include/asm-generic/termios.h:33:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
33 | if (get_user(tmp, &termio->c_cflag) < 0)
| ^
include/asm-generic/termios.h:37:38: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
37 | if (get_user(tmp, &termio->c_lflag) < 0)
| ^
include/asm-generic/termios.h:41:49: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
41 | if (get_user(termios->c_line, &termio->c_line) < 0)
| ^
drivers/tty/serial/jsm/jsm_cls.c: In function 'cls_copy_data_from_uart_to_queue':
drivers/tty/serial/jsm/jsm_cls.c:400:7: warning: variable 'discard' set but not used [-Wunused-but-set-variable]
400 | u8 discard;
| ^~~~~~~
vim +25 include/asm-generic/termios.h
6103ec56c65c33 Arnd Bergmann 2009-05-13 16
6103ec56c65c33 Arnd Bergmann 2009-05-13 17 /*
6103ec56c65c33 Arnd Bergmann 2009-05-13 18 * Translate a "termio" structure into a "termios". Ugh.
6103ec56c65c33 Arnd Bergmann 2009-05-13 19 */
6103ec56c65c33 Arnd Bergmann 2009-05-13 20 static inline int user_termio_to_kernel_termios(struct ktermios *termios,
6103ec56c65c33 Arnd Bergmann 2009-05-13 21 const struct termio __user *termio)
6103ec56c65c33 Arnd Bergmann 2009-05-13 22 {
6103ec56c65c33 Arnd Bergmann 2009-05-13 23 unsigned short tmp;
6103ec56c65c33 Arnd Bergmann 2009-05-13 24
6103ec56c65c33 Arnd Bergmann 2009-05-13 @25 if (get_user(tmp, &termio->c_iflag) < 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 26 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 27 termios->c_iflag = (0xffff0000 & termios->c_iflag) | tmp;
6103ec56c65c33 Arnd Bergmann 2009-05-13 28
6103ec56c65c33 Arnd Bergmann 2009-05-13 29 if (get_user(tmp, &termio->c_oflag) < 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 30 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 31 termios->c_oflag = (0xffff0000 & termios->c_oflag) | tmp;
6103ec56c65c33 Arnd Bergmann 2009-05-13 32
6103ec56c65c33 Arnd Bergmann 2009-05-13 33 if (get_user(tmp, &termio->c_cflag) < 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 34 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 35 termios->c_cflag = (0xffff0000 & termios->c_cflag) | tmp;
6103ec56c65c33 Arnd Bergmann 2009-05-13 36
6103ec56c65c33 Arnd Bergmann 2009-05-13 37 if (get_user(tmp, &termio->c_lflag) < 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 38 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 39 termios->c_lflag = (0xffff0000 & termios->c_lflag) | tmp;
6103ec56c65c33 Arnd Bergmann 2009-05-13 40
6103ec56c65c33 Arnd Bergmann 2009-05-13 41 if (get_user(termios->c_line, &termio->c_line) < 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 42 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 43
6103ec56c65c33 Arnd Bergmann 2009-05-13 44 if (copy_from_user(termios->c_cc, termio->c_cc, NCC) != 0)
6103ec56c65c33 Arnd Bergmann 2009-05-13 45 goto fault;
6103ec56c65c33 Arnd Bergmann 2009-05-13 46
6103ec56c65c33 Arnd Bergmann 2009-05-13 47 return 0;
6103ec56c65c33 Arnd Bergmann 2009-05-13 48
6103ec56c65c33 Arnd Bergmann 2009-05-13 49 fault:
6103ec56c65c33 Arnd Bergmann 2009-05-13 50 return -EFAULT;
6103ec56c65c33 Arnd Bergmann 2009-05-13 51 }
6103ec56c65c33 Arnd Bergmann 2009-05-13 52
:::::: The code at line 25 was first introduced by commit
:::::: 6103ec56c65c33774c7c38652c8204120c3c7519 asm-generic: add generic ABI headers
:::::: TO: Arnd Bergmann <arnd(a)arndb.de>
:::::: CC: Arnd Bergmann <arnd(a)klappe2.(none)>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-next:master 3406/12102] drivers/firmware/efi/libstub/efi-stub.c:148:14: warning: no previous prototype for function 'efi_entry'
by kbuild test robot
Hi Atish,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: c11d28ab4a691736e30b49813fb801847bd44e83
commit: 2e0eb483c058dd013be8e3d0ec1767be531485a2 [3406/12102] efi/libstub: Move arm-stub to a common file
config: arm64-randconfig-r026-20200521 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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
git checkout 2e0eb483c058dd013be8e3d0ec1767be531485a2
# 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: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/firmware/efi/libstub/efi-stub.c:68:6: warning: no previous prototype for function 'install_memreserve_table' [-Wmissing-prototypes]
void install_memreserve_table(void)
^
drivers/firmware/efi/libstub/efi-stub.c:68:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void install_memreserve_table(void)
^
static
>> drivers/firmware/efi/libstub/efi-stub.c:148:14: warning: no previous prototype for function 'efi_entry' [-Wmissing-prototypes]
efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)
^
drivers/firmware/efi/libstub/efi-stub.c:148:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)
^
static
2 warnings generated.
vim +/efi_entry +148 drivers/firmware/efi/libstub/efi-stub.c
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 67
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 @68 void install_memreserve_table(void)
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 69 {
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 70 struct linux_efi_memreserve *rsv;
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 71 efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID;
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 72 efi_status_t status;
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 73
966291f6344d7eb drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 74 status = efi_bs_call(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv),
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 75 (void **)&rsv);
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 76 if (status != EFI_SUCCESS) {
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 77 pr_efi_err("Failed to allocate memreserve entry!\n");
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 78 return;
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 79 }
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 80
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 81 rsv->next = 0;
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 82 rsv->size = 0;
5f0b0ecf043a531 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-11-29 83 atomic_set(&rsv->count, 0);
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 84
966291f6344d7eb drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 85 status = efi_bs_call(install_configuration_table,
966291f6344d7eb drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 86 &memreserve_table_guid, rsv);
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 87 if (status != EFI_SUCCESS)
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 88 pr_efi_err("Failed to install memreserve config table!\n");
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 89 }
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 90
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 91 static unsigned long get_dram_base(void)
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 92 {
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 93 efi_status_t status;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 94 unsigned long map_size, buff_size;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 95 unsigned long membase = EFI_ERROR;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 96 struct efi_memory_map map;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 97 efi_memory_desc_t *md;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 98 struct efi_boot_memmap boot_map;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 99
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 100 boot_map.map = (efi_memory_desc_t **)&map.map;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 101 boot_map.map_size = &map_size;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 102 boot_map.desc_size = &map.desc_size;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 103 boot_map.desc_ver = NULL;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 104 boot_map.key_ptr = NULL;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 105 boot_map.buff_size = &buff_size;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 106
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 107 status = efi_get_memory_map(&boot_map);
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 108 if (status != EFI_SUCCESS)
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 109 return membase;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 110
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 111 map.map_end = map.map + map_size;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 112
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 113 for_each_efi_memory_desc_in_map(&map, md) {
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 114 if (md->attribute & EFI_MEMORY_WB) {
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 115 if (membase > md->phys_addr)
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 116 membase = md->phys_addr;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 117 }
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 118 }
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 119
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 120 efi_bs_call(free_pool, map.map);
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 121
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 122 return membase;
b87174541abcad8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 123 }
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 124
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 125 /*
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 126 * This function handles the architcture specific differences between arm and
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 127 * arm64 regarding where the kernel image must be loaded and any memory that
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 128 * must be reserved. On failure it is required to free all
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 129 * all allocations it has made.
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 130 */
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 131 efi_status_t handle_kernel_image(unsigned long *image_addr,
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 132 unsigned long *image_size,
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 133 unsigned long *reserve_addr,
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 134 unsigned long *reserve_size,
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 135 unsigned long dram_base,
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 136 efi_loaded_image_t *image);
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 137
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 138 asmlinkage void __noreturn efi_enter_kernel(unsigned long entrypoint,
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 139 unsigned long fdt_addr,
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 140 unsigned long fdt_size);
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 141
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 142 /*
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 143 * EFI entry point for the arm/arm64 EFI stubs. This is the entrypoint
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 144 * that is described in the PE/COFF header. Most of the code is the same
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 145 * for both archictectures, with the arch-specific code provided in the
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 146 * handle_kernel_image() function.
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 147 */
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 @148 efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 149 {
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 150 efi_loaded_image_t *image;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 151 efi_status_t status;
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 152 unsigned long image_addr;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 153 unsigned long image_size = 0;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 154 unsigned long dram_base;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 155 /* addr/point and size pairs for memory management*/
79d3219d4e56b3c drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-04 156 unsigned long initrd_addr = 0;
9302c1bb8e47582 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 157 unsigned long initrd_size = 0;
345c736edd07b65 drivers/firmware/efi/arm-stub.c Ard Biesheuvel 2014-04-03 158 unsigned long fdt_addr = 0; /* Original DTB */
a643375f4b17556 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2015-03-04 159 unsigned long fdt_size = 0;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 160 char *cmdline_ptr = NULL;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 161 int cmdline_size = 0;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 162 efi_guid_t loaded_image_proto = LOADED_IMAGE_PROTOCOL_GUID;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 163 unsigned long reserve_addr = 0;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 164 unsigned long reserve_size = 0;
de8cb458625c164 drivers/firmware/efi/libstub/arm-stub.c David Howells 2017-02-06 165 enum efi_secureboot_mode secure_boot;
f0827e18a7a1da5 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-04-25 166 struct screen_info *si;
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 167 efi_properties_table_t *prop_tbl;
ec93fc371f014a6 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-03 168 unsigned long max_addr;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 169
2fcdad2a80a6d6f drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 170 sys_table = sys_table_arg;
2fcdad2a80a6d6f drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 171
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 172 /* Check if we were booted by the EFI firmware */
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 173 if (sys_table->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) {
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 174 status = EFI_INVALID_PARAMETER;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 175 goto fail;
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 176 }
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 177
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 178 status = check_platform_features();
b9d6769b5678dbd drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-02-17 179 if (status != EFI_SUCCESS)
b9d6769b5678dbd drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-02-17 180 goto fail;
b9d6769b5678dbd drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-02-17 181
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 182 /*
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 183 * Get a handle to the loaded image protocol. This is used to get
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 184 * information about the running image, such as size and the command
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 185 * line.
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 186 */
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 187 status = sys_table->boottime->handle_protocol(handle,
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 188 &loaded_image_proto, (void *)&image);
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 189 if (status != EFI_SUCCESS) {
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 190 pr_efi_err("Failed to get loaded image protocol\n");
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 191 goto fail;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 192 }
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 193
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 194 dram_base = get_dram_base();
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 195 if (dram_base == EFI_ERROR) {
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 196 pr_efi_err("Failed to find DRAM base\n");
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 197 status = EFI_LOAD_ERROR;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 198 goto fail;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 199 }
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 200
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 201 /*
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 202 * Get the command line from EFI, using the LOADED_IMAGE
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 203 * protocol. We are going to copy the command line into the
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 204 * device tree, so this can be allocated anywhere.
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 205 */
1e45bf7372c48c7 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 206 cmdline_ptr = efi_convert_cmdline(image, &cmdline_size, ULONG_MAX);
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 207 if (!cmdline_ptr) {
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 208 pr_efi_err("getting command line via LOADED_IMAGE_PROTOCOL\n");
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 209 status = EFI_OUT_OF_RESOURCES;
2b5fe07a78a09a3 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-01-26 210 goto fail;
2b5fe07a78a09a3 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-01-26 211 }
2b5fe07a78a09a3 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-01-26 212
eeff7d634f47503 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 213 if (IS_ENABLED(CONFIG_CMDLINE_EXTEND) ||
eeff7d634f47503 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 214 IS_ENABLED(CONFIG_CMDLINE_FORCE) ||
eeff7d634f47503 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 215 cmdline_size == 0)
eeff7d634f47503 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 216 efi_parse_options(CONFIG_CMDLINE);
eeff7d634f47503 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 217
eeff7d634f47503 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 218 if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && cmdline_size > 0)
eeff7d634f47503 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 219 efi_parse_options(cmdline_ptr);
eeff7d634f47503 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 220
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 221 pr_efi("Booting Linux Kernel...\n");
eeff7d634f47503 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 222
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 223 si = setup_graphics();
f0827e18a7a1da5 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-04-25 224
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 225 status = handle_kernel_image(&image_addr, &image_size,
2b5fe07a78a09a3 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-01-26 226 &reserve_addr,
2b5fe07a78a09a3 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-01-26 227 &reserve_size,
2b5fe07a78a09a3 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-01-26 228 dram_base, image);
2b5fe07a78a09a3 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-01-26 229 if (status != EFI_SUCCESS) {
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 230 pr_efi_err("Failed to relocate kernel\n");
2b5fe07a78a09a3 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-01-26 231 goto fail_free_cmdline;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 232 }
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 233
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 234 efi_retrieve_tpm2_eventlog();
d99c1ba6a73b9e9 drivers/firmware/efi/libstub/arm-stub.c Xinwei Kong 2019-11-07 235
ccc829ba3624beb drivers/firmware/efi/libstub/arm-stub.c Matthew Garrett 2017-08-25 236 /* Ask the firmware to clear memory on unclean shutdown */
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 237 efi_enable_reset_attack_mitigation();
ccc829ba3624beb drivers/firmware/efi/libstub/arm-stub.c Matthew Garrett 2017-08-25 238
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 239 secure_boot = efi_get_secureboot();
73a6492589c87cd drivers/firmware/efi/libstub/arm-stub.c Linn Crosetto 2016-04-25 240
345c736edd07b65 drivers/firmware/efi/arm-stub.c Ard Biesheuvel 2014-04-03 241 /*
de8cb458625c164 drivers/firmware/efi/libstub/arm-stub.c David Howells 2017-02-06 242 * Unauthenticated device tree data is a security hazard, so ignore
de8cb458625c164 drivers/firmware/efi/libstub/arm-stub.c David Howells 2017-02-06 243 * 'dtb=' unless UEFI Secure Boot is disabled. We assume that secure
de8cb458625c164 drivers/firmware/efi/libstub/arm-stub.c David Howells 2017-02-06 244 * boot is enabled if we can't determine its state.
345c736edd07b65 drivers/firmware/efi/arm-stub.c Ard Biesheuvel 2014-04-03 245 */
3d7ee348aa4127a drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-07-11 246 if (!IS_ENABLED(CONFIG_EFI_ARMSTUB_DTB_LOADER) ||
3d7ee348aa4127a drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-07-11 247 secure_boot != efi_secureboot_mode_disabled) {
3d7ee348aa4127a drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-07-11 248 if (strstr(cmdline_ptr, "dtb="))
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 249 pr_efi("Ignoring DTB from command line.\n");
345c736edd07b65 drivers/firmware/efi/arm-stub.c Ard Biesheuvel 2014-04-03 250 } else {
9302c1bb8e47582 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 251 status = efi_load_dtb(image, &fdt_addr, &fdt_size);
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 252
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 253 if (status != EFI_SUCCESS) {
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 254 pr_efi_err("Failed to load device tree!\n");
2b5fe07a78a09a3 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-01-26 255 goto fail_free_image;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 256 }
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 257 }
0bcaa9040d05868 drivers/firmware/efi/libstub/arm-stub.c Mark Rutland 2014-10-23 258
0bcaa9040d05868 drivers/firmware/efi/libstub/arm-stub.c Mark Rutland 2014-10-23 259 if (fdt_addr) {
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 260 pr_efi("Using DTB from command line\n");
0bcaa9040d05868 drivers/firmware/efi/libstub/arm-stub.c Mark Rutland 2014-10-23 261 } else {
345c736edd07b65 drivers/firmware/efi/arm-stub.c Ard Biesheuvel 2014-04-03 262 /* Look for a device tree configuration table entry. */
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 263 fdt_addr = (uintptr_t)get_fdt(&fdt_size);
0bcaa9040d05868 drivers/firmware/efi/libstub/arm-stub.c Mark Rutland 2014-10-23 264 if (fdt_addr)
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 265 pr_efi("Using DTB from configuration table\n");
0bcaa9040d05868 drivers/firmware/efi/libstub/arm-stub.c Mark Rutland 2014-10-23 266 }
0bcaa9040d05868 drivers/firmware/efi/libstub/arm-stub.c Mark Rutland 2014-10-23 267
0bcaa9040d05868 drivers/firmware/efi/libstub/arm-stub.c Mark Rutland 2014-10-23 268 if (!fdt_addr)
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 269 pr_efi("Generating empty DTB\n");
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 270
79d3219d4e56b3c drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-04 271 if (!noinitrd()) {
ec93fc371f014a6 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-03 272 max_addr = efi_get_max_initrd_addr(dram_base, image_addr);
79d3219d4e56b3c drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-04 273 status = efi_load_initrd_dev_path(&initrd_addr, &initrd_size,
79d3219d4e56b3c drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-04 274 max_addr);
ec93fc371f014a6 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-03 275 if (status == EFI_SUCCESS) {
ec93fc371f014a6 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-03 276 pr_efi("Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path\n");
ec93fc371f014a6 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-03 277 } else if (status == EFI_NOT_FOUND) {
ec93fc371f014a6 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-03 278 status = efi_load_initrd(image, &initrd_addr, &initrd_size,
ec93fc371f014a6 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-03 279 ULONG_MAX, max_addr);
594e576d4b93b8c drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-03-29 280 if (status == EFI_SUCCESS && initrd_size > 0)
ec93fc371f014a6 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-03 281 pr_efi("Loaded initrd from command line option\n");
ec93fc371f014a6 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-03 282 }
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 283 if (status != EFI_SUCCESS)
ec93fc371f014a6 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-03 284 pr_efi_err("Failed to load initrd!\n");
79d3219d4e56b3c drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-04 285 }
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 286
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 287 efi_random_get_seed();
568bc4e87033d23 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-11-12 288
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 289 /*
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 290 * If the NX PE data feature is enabled in the properties table, we
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 291 * should take care not to create a virtual mapping that changes the
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 292 * relative placement of runtime services code and data regions, as
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 293 * they may belong to the same PE/COFF executable image in memory.
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 294 * The easiest way to achieve that is to simply use a 1:1 mapping.
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 295 */
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 296 prop_tbl = get_efi_config_table(EFI_PROPERTIES_TABLE_GUID);
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 297 flat_va_mapping = prop_tbl &&
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 298 (prop_tbl->memory_protection_attribute &
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 299 EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA);
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 300
38fb6652229c214 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-10-25 301 /* hibernation expects the runtime regions to stay in the same place */
b92165d2ba869a9 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-10 302 if (!IS_ENABLED(CONFIG_HIBERNATION) && !nokaslr() && !flat_va_mapping) {
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 303 /*
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 304 * Randomize the base of the UEFI runtime services region.
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 305 * Preserve the 2 MB alignment of the region by taking a
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 306 * shift of 21 bit positions into account when scaling
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 307 * the headroom value using a 32-bit random value.
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 308 */
197decefdb79d6f drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-17 309 static const u64 headroom = EFI_RT_VIRTUAL_LIMIT -
197decefdb79d6f drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-17 310 EFI_RT_VIRTUAL_BASE -
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 311 EFI_RT_VIRTUAL_SIZE;
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 312 u32 rnd;
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 313
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 314 status = efi_get_random_bytes(sizeof(rnd), (u8 *)&rnd);
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 315 if (status == EFI_SUCCESS) {
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 316 virtmap_base = EFI_RT_VIRTUAL_BASE +
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 317 (((headroom >> 21) * rnd) >> (32 - 21));
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 318 }
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 319 }
e69176d68d26d63 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2017-04-04 320
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 321 install_memreserve_table();
b844470f22061e8 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2018-09-21 322
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 323 status = allocate_new_fdt_and_exit_boot(handle, &fdt_addr,
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 324 efi_get_max_fdt_addr(dram_base),
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 325 initrd_addr, initrd_size,
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 326 cmdline_ptr, fdt_addr, fdt_size);
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 327 if (status != EFI_SUCCESS)
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 328 goto fail_free_initrd;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 329
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 330 efi_enter_kernel(image_addr, fdt_addr, fdt_totalsize((void *)fdt_addr));
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 331 /* not reached */
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 332
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 333 fail_free_initrd:
8173ec7905b5b07 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 334 pr_efi_err("Failed to update FDT and exit boot services\n");
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 335
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 336 efi_free(initrd_size, initrd_addr);
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 337 efi_free(fdt_size, fdt_addr);
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 338
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 339 fail_free_image:
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 340 efi_free(image_size, image_addr);
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 341 efi_free(reserve_size, reserve_addr);
2b5fe07a78a09a3 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2016-01-26 342 fail_free_cmdline:
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 343 free_screen_info(si);
cd33a5c1d53e43b drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2019-12-24 344 efi_free(cmdline_size, (unsigned long)cmdline_ptr);
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 345 fail:
9f9223778ef385e drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2020-02-17 346 return status;
3c7f255039a2ad6 drivers/firmware/efi/arm-stub.c Mark Salter 2014-04-15 347 }
f3cdfd239da56a4 drivers/firmware/efi/libstub/arm-stub.c Ard Biesheuvel 2014-10-20 348
:::::: The code at line 148 was first introduced by commit
:::::: 9f9223778ef385e79dc67f5ee48ee4c1fb757f6b efi/libstub/arm: Make efi_entry() an ordinary PE/COFF entrypoint
:::::: TO: Ard Biesheuvel <ardb(a)kernel.org>
:::::: CC: Ard Biesheuvel <ardb(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
sound/soc/jz4740/jz4740-i2s.c:465:34: warning: unused variable 'jz4740_i2s_soc_info'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 444565650a5fe9c63ddf153e6198e31705dedeb2
commit: 62f9ed5f8768d2425461737d77b83f888b525c06 ASoC: jz4740-i2s: Avoid passing enum as match data
date: 2 months ago
config: mips-randconfig-r014-20200522 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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
git checkout 62f9ed5f8768d2425461737d77b83f888b525c06
# 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: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> sound/soc/jz4740/jz4740-i2s.c:465:34: warning: unused variable 'jz4740_i2s_soc_info' [-Wunused-const-variable]
static const struct i2s_soc_info jz4740_i2s_soc_info = {
^
>> sound/soc/jz4740/jz4740-i2s.c:488:34: warning: unused variable 'jz4780_i2s_soc_info' [-Wunused-const-variable]
static const struct i2s_soc_info jz4780_i2s_soc_info = {
^
2 warnings generated.
vim +/jz4740_i2s_soc_info +465 sound/soc/jz4740/jz4740-i2s.c
464
> 465 static const struct i2s_soc_info jz4740_i2s_soc_info = {
466 .version = JZ_I2S_JZ4740,
467 .dai = &jz4740_i2s_dai,
468 };
469
470 static struct snd_soc_dai_driver jz4780_i2s_dai = {
471 .probe = jz4740_i2s_dai_probe,
472 .remove = jz4740_i2s_dai_remove,
473 .playback = {
474 .channels_min = 1,
475 .channels_max = 2,
476 .rates = SNDRV_PCM_RATE_8000_48000,
477 .formats = JZ4740_I2S_FMTS,
478 },
479 .capture = {
480 .channels_min = 2,
481 .channels_max = 2,
482 .rates = SNDRV_PCM_RATE_8000_48000,
483 .formats = JZ4740_I2S_FMTS,
484 },
485 .ops = &jz4740_i2s_dai_ops,
486 };
487
> 488 static const struct i2s_soc_info jz4780_i2s_soc_info = {
489 .version = JZ_I2S_JZ4780,
490 .dai = &jz4780_i2s_dai,
491 };
492
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[kbuild] Re: [PATCH v5 1/5] iommu/arm-smmu: add NVIDIA implementation for dual ARM MMU-500 usage
by Dan Carpenter
Hi Krishna,
url: https://github.com/0day-ci/linux/commits/Krishna-Reddy/Nvidia-Arm-SMMUv2-...
base: 365f8d504da50feaebf826d180113529c9383670
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
# save the attached .config to linux build tree
make C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/iommu/arm-smmu-nvidia.c:151:33: sparse: sparse: cast removes address space '<asn:2>' of expression
# https://github.com/0day-ci/linux/commit/74ddf19a83203af9193b1921e43fdc6dc...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 74ddf19a83203af9193b1921e43fdc6dc68c8379
vim +151 drivers/iommu/arm-smmu-nvidia.c
74ddf19a83203a Krishna Reddy 2020-05-21 128
74ddf19a83203a Krishna Reddy 2020-05-21 129 struct arm_smmu_device *nvidia_smmu_impl_init(struct arm_smmu_device *smmu)
74ddf19a83203a Krishna Reddy 2020-05-21 130 {
74ddf19a83203a Krishna Reddy 2020-05-21 131 unsigned int i;
74ddf19a83203a Krishna Reddy 2020-05-21 132 struct nvidia_smmu *nsmmu;
74ddf19a83203a Krishna Reddy 2020-05-21 133 struct resource *res;
74ddf19a83203a Krishna Reddy 2020-05-21 134 struct device *dev = smmu->dev;
74ddf19a83203a Krishna Reddy 2020-05-21 135 struct platform_device *pdev = to_platform_device(smmu->dev);
74ddf19a83203a Krishna Reddy 2020-05-21 136
74ddf19a83203a Krishna Reddy 2020-05-21 137 nsmmu = devm_kzalloc(smmu->dev, sizeof(*nsmmu), GFP_KERNEL);
74ddf19a83203a Krishna Reddy 2020-05-21 138 if (!nsmmu)
74ddf19a83203a Krishna Reddy 2020-05-21 139 return ERR_PTR(-ENOMEM);
74ddf19a83203a Krishna Reddy 2020-05-21 140
74ddf19a83203a Krishna Reddy 2020-05-21 141 nsmmu->smmu = *smmu;
74ddf19a83203a Krishna Reddy 2020-05-21 142 /* Instance 0 is ioremapped by arm-smmu.c */
74ddf19a83203a Krishna Reddy 2020-05-21 143 nsmmu->num_inst = 1;
74ddf19a83203a Krishna Reddy 2020-05-21 144
74ddf19a83203a Krishna Reddy 2020-05-21 145 for (i = 1; i < MAX_SMMU_INSTANCES; i++) {
74ddf19a83203a Krishna Reddy 2020-05-21 146 res = platform_get_resource(pdev, IORESOURCE_MEM, i);
74ddf19a83203a Krishna Reddy 2020-05-21 147 if (!res)
74ddf19a83203a Krishna Reddy 2020-05-21 148 break;
74ddf19a83203a Krishna Reddy 2020-05-21 149 nsmmu->bases[i] = devm_ioremap_resource(dev, res);
74ddf19a83203a Krishna Reddy 2020-05-21 150 if (IS_ERR(nsmmu->bases[i]))
74ddf19a83203a Krishna Reddy 2020-05-21 @151 return (struct arm_smmu_device *)nsmmu->bases[i];
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This should be "return ERR_CAST(nsmmu->bases[i]);"
regards,
dan carepenter
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
2 years, 4 months
[dsahern-linux:nexthops/del-group-03 6/7] include/net/nexthop.h:278:18: warning: address of 'nhi->fib_nhc' will always evaluate to 'true'
by kbuild test robot
tree: https://github.com/dsahern/linux nexthops/del-group-03
head: b8c06bc47e0a04603de20861b8d5f7291ff0bc12
commit: 718aea0ab241a4f76294d37797bb2e7e50705ee6 [6/7] ipv4: nexthop version of fib_info_nh_uses_dev
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 718aea0ab241a4f76294d37797bb2e7e50705ee6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from net/core/flow_dissector.c:9:
In file included from include/net/dst_metadata.h:6:
In file included from include/net/ip_tunnels.h:24:
In file included from include/net/ip6_route.h:30:
>> include/net/nexthop.h:278:18: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
2 warnings generated.
--
In file included from net/netfilter/nf_conntrack_standalone.c:17:
In file included from include/net/netfilter/nf_conntrack.h:23:
In file included from include/linux/netfilter/nf_conntrack_proto_gre.h:5:
In file included from include/net/gre.h:6:
In file included from include/net/ip_tunnels.h:24:
In file included from include/net/ip6_route.h:30:
>> include/net/nexthop.h:278:18: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/netfilter/nf_conntrack_standalone.c:60:7: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
ntohs(tuple->src.u.tcp.port),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro '__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:61:7: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
ntohs(tuple->dst.u.tcp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro '__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:66:7: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
ntohs(tuple->src.u.udp.port),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro '__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:67:7: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
ntohs(tuple->dst.u.udp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro '__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:72:7: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
ntohs(tuple->src.u.dccp.port),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro '__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:73:7: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
ntohs(tuple->dst.u.dccp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^~~~~~~~~~~
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro '__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_standalone.c:77:7: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
ntohs(tuple->src.u.sctp.port),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
--
In file included from net/netfilter/nf_conntrack_h323_main.c:25:
In file included from include/net/ip6_route.h:30:
>> include/net/nexthop.h:278:18: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/netfilter/nf_conntrack_h323_main.c:197:6: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
tpktlen - 4);
^~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro 'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dynamic_debug.h:125:15: note: expanded from macro '__dynamic_func_call'
func(&id, ##__VA_ARGS__); ^~~~~~~~~~~
net/netfilter/nf_conntrack_h323_main.c:870:12: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
&addr, ntohs(port), &ct->tuplehash[!dir].tuple.src.u3,
^~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro 'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro '__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_h323_main.c:871:5: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
ntohs(ct->tuplehash[!dir].tuple.src.u.tcp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro 'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro '__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_h323_main.c:887:12: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
&addr, ntohs(port), &ct->tuplehash[!dir].tuple.dst.u3,
^~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro 'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro '__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_h323_main.c:888:5: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
ntohs(ct->tuplehash[!dir].tuple.dst.u.tcp.port));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:330:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:154:22: note: expanded from macro 'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:143:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
--
In file included from net/ipv4/fib_trie.c:72:
In file included from net/ipv4/fib_lookup.h:8:
>> include/net/nexthop.h:278:18: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/ipv4/fib_trie.c:1559:8: warning: variable 'nhsel' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (nhc)
^~~
net/ipv4/fib_trie.c:1575:18: note: uninitialized use occurs here
res->nh_sel = nhsel;
^~~~~
net/ipv4/fib_trie.c:1559:4: note: remove the 'if' if its condition is always false
if (nhc)
^~~~~~~~
net/ipv4/fib_trie.c:1527:12: note: initialize the variable 'nhsel' to silence this warning
int nhsel, err;
^
= 0
3 warnings generated.
--
In file included from net/ipv6/udp.c:41:
In file included from include/net/ip6_route.h:30:
>> include/net/nexthop.h:278:18: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/ipv6/udp.c:974:30: warning: no previous prototype for function 'udp_v6_early_demux' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb)
^
net/ipv6/udp.c:974:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb)
^
static
net/ipv6/udp.c:1015:29: warning: no previous prototype for function 'udpv6_rcv' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int udpv6_rcv(struct sk_buff *skb)
^
net/ipv6/udp.c:1015:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE int udpv6_rcv(struct sk_buff *skb)
^
static
4 warnings generated.
--
In file included from net/ipv6/tcp_ipv6.c:51:
In file included from include/net/ip6_route.h:30:
>> include/net/nexthop.h:278:18: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/ipv6/tcp_ipv6.c:1539:29: warning: no previous prototype for function 'tcp_v6_rcv' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb)
^
net/ipv6/tcp_ipv6.c:1539:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb)
^
static
net/ipv6/tcp_ipv6.c:1759:30: warning: no previous prototype for function 'tcp_v6_early_demux' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb)
^
net/ipv6/tcp_ipv6.c:1759:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb)
^
static
4 warnings generated.
--
In file included from net/ipv6/exthdrs.c:40:
In file included from include/net/ip6_route.h:30:
>> include/net/nexthop.h:278:18: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
include/net/nexthop.h:283:17: warning: address of 'nhi->fib_nhc' will always evaluate to 'true' [-Wpointer-bool-conversion]
return &nhi->fib_nhc;
~~~~~~ ~~~~~^~~~~~~
net/ipv6/exthdrs.c:909:33: warning: unused function 'ipv6_skb_idev' [-Wunused-function]
static inline struct inet6_dev *ipv6_skb_idev(struct sk_buff *skb)
^
3 warnings generated.
..
vim +278 include/net/nexthop.h
263
264 static inline bool nexthop_uses_dev(const struct nexthop *nh,
265 const struct net_device *dev)
266 {
267 struct nh_info *nhi;
268
269 if (nh->is_group) {
270 struct nh_group *nhg = rtnl_dereference(nh->nh_grp);
271 int i;
272
273 for (i = 0; i < nhg->num_nh; i++) {
274 struct nexthop *nhe = nhg->nh_entries[i].nh;
275
276 nhi = rcu_dereference(nhe->nh_info);
277 if (nhc_l3mdev_matches_dev(&nhi->fib_nhc, dev))
> 278 return &nhi->fib_nhc;
279 }
280 } else {
281 nhi = rcu_dereference(nh->nh_info);
282 if (nhc_l3mdev_matches_dev(&nhi->fib_nhc, dev))
283 return &nhi->fib_nhc;
284 }
285
286 return NULL;
287 }
288
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[omap:droid4-pending-v5.7 3/27] drivers/input/keyboard/omap4-keypad.c:161:6: warning: variable 'keys_up' set but not used
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git droid4-pending-v5.7
head: c79f709cdba38b9a054d444f4eabc0e1126f06cc
commit: c711eebb37dcf40648df3723e43ef028b7304bc0 [3/27] Input: omap4-keypad - Scan keys in two phases and simplify with bitmask
config: alpha-randconfig-r033-20200522 (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 c711eebb37dcf40648df3723e43ef028b7304bc0
# 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: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/input/keyboard/omap4-keypad.c: In function 'omap4_keypad_irq_thread_fn':
drivers/input/keyboard/omap4-keypad.c:161:15: warning: variable 'keys_down' set but not used [-Wunused-but-set-variable]
161 | int keys_up, keys_down;
| ^~~~~~~~~
>> drivers/input/keyboard/omap4-keypad.c:161:6: warning: variable 'keys_up' set but not used [-Wunused-but-set-variable]
161 | int keys_up, keys_down;
| ^~~~~~~
vim +/keys_up +161 drivers/input/keyboard/omap4-keypad.c
156
157 static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
158 {
159 struct omap4_keypad *keypad_data = dev_id;
160 struct input_dev *input_dev = keypad_data->input;
> 161 int keys_up, keys_down;
162 u32 low, high;
163 u64 keys;
164
165 low = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE31_0);
166 high = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE63_32);
167 keys = low | (u64)high << 32;
168
169 /* Scan for key up events for lost key-up interrupts */
170 keys_up = omap4_keypad_scan_state(keypad_data, keys, false);
171
172 /* Scan for key down events */
173 keys_down = omap4_keypad_scan_state(keypad_data, keys, true);
174
175 input_sync(input_dev);
176
177 keypad_data->keys = keys;
178
179 /* clear pending interrupts */
180 kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
181 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
182
183 return IRQ_HANDLED;
184 }
185
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH v2] ASoC: amd: put off registering mach platform_dev to avoid -517 err
by kbuild test robot
Hi Hui,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on next-20200522]
[cannot apply to v5.7-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Hui-Wang/ASoC-amd-put-off-regist...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> sound/soc/amd/renoir/acp3x-pdm-dma.c:405:49: sparse: sparse: Using plain integer as NULL pointer
vim +405 sound/soc/amd/renoir/acp3x-pdm-dma.c
398
399 static int acp_pdm_audio_probe(struct platform_device *pdev)
400 {
401 struct resource *res;
402 struct pdm_dev_data *adata;
403 unsigned int irqflags;
404 int status;
> 405 struct platform_device_info pdevinfo = {0};
406
407 if (!pdev->dev.platform_data) {
408 dev_err(&pdev->dev, "platform_data not retrieved\n");
409 return -ENODEV;
410 }
411 irqflags = *((unsigned int *)(pdev->dev.platform_data));
412
413 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
414 if (!res) {
415 dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
416 return -ENODEV;
417 }
418
419 adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL);
420 if (!adata)
421 return -ENOMEM;
422
423 adata->acp_base = devm_ioremap(&pdev->dev, res->start,
424 resource_size(res));
425 if (!adata->acp_base)
426 return -ENOMEM;
427
428 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
429 if (!res) {
430 dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
431 return -ENODEV;
432 }
433
434 adata->pdm_irq = res->start;
435 adata->capture_stream = NULL;
436
437 dev_set_drvdata(&pdev->dev, adata);
438 status = devm_snd_soc_register_component(&pdev->dev,
439 &acp_pdm_component,
440 &acp_pdm_dai_driver, 1);
441 if (status) {
442 dev_err(&pdev->dev, "Fail to register acp pdm dai\n");
443
444 return -ENODEV;
445 }
446 status = devm_request_irq(&pdev->dev, adata->pdm_irq, pdm_irq_handler,
447 irqflags, "ACP_PDM_IRQ", adata);
448 if (status) {
449 dev_err(&pdev->dev, "ACP PDM IRQ request failed\n");
450 return -ENODEV;
451 }
452
453 pdevinfo.name = "acp_pdm_mach";
454 pdevinfo.id = 0;
455 pdevinfo.parent = &pdev->dev;
456 adata->m_pdev = platform_device_register_full(&pdevinfo);
457 if (IS_ERR(adata->m_pdev)) {
458 dev_err(&pdev->dev, "cannot register %s device\n",
459 pdevinfo.name);
460 return PTR_ERR(adata->m_pdev);
461 }
462 pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS);
463 pm_runtime_use_autosuspend(&pdev->dev);
464 pm_runtime_enable(&pdev->dev);
465 pm_runtime_allow(&pdev->dev);
466 return 0;
467 }
468
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-devel:devel-catchup-202005220530 3/3] drivers/soundwire/intel_init.c:265:6: warning: assignment to 'struct sdw_master_device *' from 'int' makes pointer from integer without a cast
by kbuild test robot
tree: https://github.com/thesofproject/linux devel-catchup-202005220530
head: 2e9428fd0d1f29b48cdd226fd67bb8e2a1a10cbc
commit: 99643a70e4da2e6cb09c6bc0558492cb48cb8d2c [3/3] Merge branch 'sound/upstream-20200521' into merge/sound-upstream-20200521
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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 99643a70e4da2e6cb09c6bc0558492cb48cb8d2c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/soundwire/intel_init.c: In function 'sdw_intel_cleanup':
drivers/soundwire/intel_init.c:73:10: error: implicit declaration of function 'sdw_master_device_del' [-Werror=implicit-function-declaration]
73 | ret = sdw_master_device_del(link->md);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/soundwire/intel_init.c: In function 'sdw_intel_probe_controller':
drivers/soundwire/intel_init.c:242:42: error: invalid use of undefined type 'struct sdw_link_ops'
242 | ret = driver_register(sdw_intel_link_ops.driver);
| ^
drivers/soundwire/intel_init.c:265:8: error: implicit declaration of function 'sdw_master_device_add' [-Werror=implicit-function-declaration]
265 | md = sdw_master_device_add(res->parent,
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/soundwire/intel_init.c:265:6: warning: assignment to 'struct sdw_master_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
265 | md = sdw_master_device_add(res->parent,
| ^
drivers/soundwire/intel_init.c:304:38: error: invalid use of undefined type 'struct sdw_link_ops'
304 | driver_unregister(sdw_intel_link_ops.driver);
| ^
drivers/soundwire/intel_init.c: In function 'sdw_intel_startup_controller':
drivers/soundwire/intel_init.c:349:3: error: implicit declaration of function 'sdw_master_device_startup' [-Werror=implicit-function-declaration]
349 | sdw_master_device_startup(md);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/soundwire/intel_init.c: In function 'sdw_intel_exit':
drivers/soundwire/intel_init.c:458:38: error: invalid use of undefined type 'struct sdw_link_ops'
458 | driver_unregister(sdw_intel_link_ops.driver);
| ^
drivers/soundwire/intel_init.c: In function 'sdw_intel_process_wakeen_event':
drivers/soundwire/intel_init.c:471:3: error: implicit declaration of function 'sdw_master_device_process_wake_event' [-Werror=implicit-function-declaration]
471 | sdw_master_device_process_wake_event(link->md);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +265 drivers/soundwire/intel_init.c
f33079bb397b9b Bard Liao 2019-09-24 194
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 195 static struct sdw_intel_ctx
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 196 *sdw_intel_probe_controller(struct sdw_intel_res *res)
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 197 {
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 198 struct sdw_intel_link_res *link;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 199 struct sdw_intel_ctx *ctx;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 200 struct acpi_device *adev;
946bab81f3286c Pierre-Louis Bossart 2020-02-24 201 struct sdw_master_device *md;
89a76a6409cac5 Bard Liao 2019-12-27 202 struct sdw_slave *slave;
81a7faeadb8f72 Bard liao 2020-01-09 203 struct list_head *node;
89a76a6409cac5 Bard Liao 2019-12-27 204 struct sdw_bus *bus;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 205 u32 link_mask;
89a76a6409cac5 Bard Liao 2019-12-27 206 int num_slaves = 0;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 207 int count;
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 208 int ret;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 209 int i;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 210
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 211 if (!res)
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 212 return NULL;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 213
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 214 if (acpi_bus_get_device(res->handle, &adev))
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 215 return NULL;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 216
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 217 if (!res->count)
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 218 return NULL;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 219
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 220 count = res->count;
d62a7d41f38e1d Vinod Koul 2017-12-14 221 dev_dbg(&adev->dev, "Creating %d SDW Link devices\n", count);
d62a7d41f38e1d Vinod Koul 2017-12-14 222
d62a7d41f38e1d Vinod Koul 2017-12-14 223 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
d62a7d41f38e1d Vinod Koul 2017-12-14 224 if (!ctx)
d62a7d41f38e1d Vinod Koul 2017-12-14 225 return NULL;
d62a7d41f38e1d Vinod Koul 2017-12-14 226
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 227 ctx->links = kcalloc(count, sizeof(*ctx->links), GFP_KERNEL);
d62a7d41f38e1d Vinod Koul 2017-12-14 228 if (!ctx->links)
d62a7d41f38e1d Vinod Koul 2017-12-14 229 goto link_err;
d62a7d41f38e1d Vinod Koul 2017-12-14 230
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 231 ctx->count = count;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 232 ctx->mmio_base = res->mmio_base;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 233 ctx->link_mask = res->link_mask;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 234 ctx->handle = res->handle;
01f59e2d608aef Pierre-Louis Bossart 2019-12-02 235 mutex_init(&ctx->shim_lock);
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 236
d62a7d41f38e1d Vinod Koul 2017-12-14 237 link = ctx->links;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 238 link_mask = ctx->link_mask;
d62a7d41f38e1d Vinod Koul 2017-12-14 239
f33079bb397b9b Bard Liao 2019-09-24 240 INIT_LIST_HEAD(&ctx->link_list);
f33079bb397b9b Bard Liao 2019-09-24 241
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 242 ret = driver_register(sdw_intel_link_ops.driver);
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 243 if (ret) {
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 244 dev_err(&adev->dev, "failed to register sdw master driver: %d\n", ret);
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 245 goto register_err;
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 246 }
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 247
d62a7d41f38e1d Vinod Koul 2017-12-14 248 /* Create SDW Master devices */
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 249 for (i = 0; i < count; i++, link++) {
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 250 if (link_mask && !(link_mask & BIT(i)))
50302fc7b936c1 Pierre-Louis Bossart 2019-08-05 251 continue;
50302fc7b936c1 Pierre-Louis Bossart 2019-08-05 252
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 253 link->mmio_base = res->mmio_base;
f98f690fb03c2a Pierre-Louis Bossart 2019-12-11 254 link->registers = res->mmio_base + SDW_LINK_BASE
d62a7d41f38e1d Vinod Koul 2017-12-14 255 + (SDW_LINK_SIZE * i);
f98f690fb03c2a Pierre-Louis Bossart 2019-12-11 256 link->shim = res->mmio_base + SDW_SHIM_BASE;
f98f690fb03c2a Pierre-Louis Bossart 2019-12-11 257 link->alh = res->mmio_base + SDW_ALH_BASE;
f98f690fb03c2a Pierre-Louis Bossart 2019-12-11 258 link->ops = res->ops;
4b206d34b92224 Rander Wang 2019-12-11 259 link->dev = res->dev;
25f90d16b4adfc Pierre-Louis Bossart 2019-12-03 260 link->clock_stop_quirks = res->clock_stop_quirks;
91ed8f429393a0 Pierre-Louis Bossart 2020-02-05 261 link->shim_lock = &ctx->shim_lock;
8d179b1844c323 Pierre-Louis Bossart 2020-02-06 262 link->shim_mask = &ctx->shim_mask;
fbe891a6ebc46f Pierre-Louis Bossart 2020-02-13 263 link->link_mask = link_mask;
91ed8f429393a0 Pierre-Louis Bossart 2020-02-05 264
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 @265 md = sdw_master_device_add(res->parent,
946bab81f3286c Pierre-Louis Bossart 2020-02-24 266 acpi_fwnode_handle(adev),
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 267 &sdw_intel_link_ops,
946bab81f3286c Pierre-Louis Bossart 2020-02-24 268 i,
946bab81f3286c Pierre-Louis Bossart 2020-02-24 269 link);
c46302ec554c57 Vinod Koul 2018-04-26 270
946bab81f3286c Pierre-Louis Bossart 2020-02-24 271 if (IS_ERR(md)) {
946bab81f3286c Pierre-Louis Bossart 2020-02-24 272 dev_err(&adev->dev, "Could not create link %d\n", i);
198e19ac4881e2 Bard liao 2020-01-10 273 goto err;
198e19ac4881e2 Bard liao 2020-01-10 274 }
f33079bb397b9b Bard Liao 2019-09-24 275
946bab81f3286c Pierre-Louis Bossart 2020-02-24 276 link->md = md;
91ed8f429393a0 Pierre-Louis Bossart 2020-02-05 277
f33079bb397b9b Bard Liao 2019-09-24 278 list_add_tail(&link->list, &ctx->link_list);
89a76a6409cac5 Bard Liao 2019-12-27 279 bus = &link->cdns->bus;
89a76a6409cac5 Bard Liao 2019-12-27 280 /* Calculate number of slaves */
81a7faeadb8f72 Bard liao 2020-01-09 281 list_for_each(node, &bus->slaves)
89a76a6409cac5 Bard Liao 2019-12-27 282 num_slaves++;
89a76a6409cac5 Bard Liao 2019-12-27 283 }
89a76a6409cac5 Bard Liao 2019-12-27 284
89a76a6409cac5 Bard Liao 2019-12-27 285 ctx->ids = kcalloc(num_slaves, sizeof(*ctx->ids), GFP_KERNEL);
89a76a6409cac5 Bard Liao 2019-12-27 286 if (!ctx->ids)
89a76a6409cac5 Bard Liao 2019-12-27 287 goto err;
89a76a6409cac5 Bard Liao 2019-12-27 288
89a76a6409cac5 Bard Liao 2019-12-27 289 ctx->num_slaves = num_slaves;
89a76a6409cac5 Bard Liao 2019-12-27 290 i = 0;
89a76a6409cac5 Bard Liao 2019-12-27 291 list_for_each_entry(link, &ctx->link_list, list) {
89a76a6409cac5 Bard Liao 2019-12-27 292 bus = &link->cdns->bus;
89a76a6409cac5 Bard Liao 2019-12-27 293 list_for_each_entry(slave, &bus->slaves, node) {
89a76a6409cac5 Bard Liao 2019-12-27 294 ctx->ids[i].id = slave->id;
89a76a6409cac5 Bard Liao 2019-12-27 295 ctx->ids[i].link_id = bus->link_id;
89a76a6409cac5 Bard Liao 2019-12-27 296 i++;
89a76a6409cac5 Bard Liao 2019-12-27 297 }
d62a7d41f38e1d Vinod Koul 2017-12-14 298 }
d62a7d41f38e1d Vinod Koul 2017-12-14 299
d62a7d41f38e1d Vinod Koul 2017-12-14 300 return ctx;
d62a7d41f38e1d Vinod Koul 2017-12-14 301
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 302 err:
946bab81f3286c Pierre-Louis Bossart 2020-02-24 303 ctx->count = i;
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 304 driver_unregister(sdw_intel_link_ops.driver);
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 305 register_err:
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 306 sdw_intel_cleanup(ctx);
d62a7d41f38e1d Vinod Koul 2017-12-14 307 link_err:
d62a7d41f38e1d Vinod Koul 2017-12-14 308 kfree(ctx);
d62a7d41f38e1d Vinod Koul 2017-12-14 309 return NULL;
d62a7d41f38e1d Vinod Koul 2017-12-14 310 }
d62a7d41f38e1d Vinod Koul 2017-12-14 311
:::::: The code at line 265 was first introduced by commit
:::::: 2ef8387155a7b77eed32f7cc5dd4b39a8f4e77dc soundwire: drivers/soundwire/intel_init.c: use sdw_link_ops
:::::: TO: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
:::::: CC: Pierre Bossart <pierre-louis.bossart(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[jlayton:ceph-fscache-iter 14/14] fs/ceph/addr.c:186:6: warning: no previous prototype for function 'ceph_readpage_cb'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscache-iter
head: bd114d497163ff233e8a0402f76b39ada94b2164
commit: bd114d497163ff233e8a0402f76b39ada94b2164 [14/14] ceph: convert to using fscache_read_helper
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout bd114d497163ff233e8a0402f76b39ada94b2164
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> fs/ceph/addr.c:186:6: warning: no previous prototype for function 'ceph_readpage_cb' [-Wmissing-prototypes]
void ceph_readpage_cb(struct ceph_osd_request *req)
^
fs/ceph/addr.c:186:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ceph_readpage_cb(struct ceph_osd_request *req)
^
static
1 warning generated.
vim +/ceph_readpage_cb +186 fs/ceph/addr.c
185
> 186 void ceph_readpage_cb(struct ceph_osd_request *req)
187 {
188 struct ceph_fs_client *fsc = req->r_priv;
189 struct ceph_fsc_request *cfreq = container_of(req,
190 struct ceph_fsc_request,
191 osd_req);
192 struct fscache_io_request *fsreq = &cfreq->fsc_req;
193 int err = req->r_result;
194
195 ceph_update_read_latency(&fsc->mdsc->metric, req->r_start_latency,
196 req->r_end_latency, err);
197
198 ceph_osdc_put_request(req);
199 dout("readpage result %d\n", err);
200
201 /* no object should mean success but no data */
202 if (err == -ENOENT)
203 err = 0;
204 else if (err == -EBLACKLISTED)
205 fsc->blacklisted = true;
206
207 fsreq->error = err;
208 if (fsreq->io_done)
209 fsreq->io_done(fsreq);
210 }
211
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months