ld.lld: error: kernel/built-in.a(kallsyms.o):(function update_iter: .text+0xa10): relocation R_RISCV_PCREL_HI20 out of range: -524433 is not in [-524288, 524287]; references kallsyms_num_syms
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Mark Brown <broonie(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 871bfa02d08d9c0ed981c50082b7afd367d3700b
commit: 7fb593cbd88cf4df01c096d4dc320f027dfa2560 Merge remote-tracking branch 'regulator/for-5.14' into regulator-next
date: 7 months ago
config: riscv-randconfig-r023-20220114 (https://download.01.org/0day-ci/archive/20220115/202201150206.PzD5J1a9-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82c8aca93488730ce8f66101e0f3538f14b551dd)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-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 7fb593cbd88cf4df01c096d4dc320f027dfa2560
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash
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 >>):
>> ld.lld: error: kernel/built-in.a(kallsyms.o):(function update_iter: .text+0xa10): relocation R_RISCV_PCREL_HI20 out of range: -524433 is not in [-524288, 524287]; references kallsyms_num_syms
>>> referenced by kallsyms.c
>>> defined in kernel/built-in.a(kallsyms.o)
--
>> ld.lld: error: kernel/built-in.a(kallsyms.o):(function update_iter: .text+0xa48): relocation R_RISCV_PCREL_HI20 out of range: -524433 is not in [-524288, 524287]; references kallsyms_relative_base
>>> referenced by kallsyms.c
>>> defined in kernel/built-in.a(kallsyms.o)
--
>> ld.lld: error: kernel/built-in.a(kallsyms.o):(function kallsyms_expand_symbol: .text+0xfc): relocation R_RISCV_PCREL_HI20 out of range: -524432 is not in [-524288, 524287]; references kallsyms_names
>>> referenced by kallsyms.c
>>> defined in kernel/built-in.a(kallsyms.o)
--
>> ld.lld: error: kernel/built-in.a(kallsyms.o):(function kallsyms_expand_symbol: .text+0x118): relocation R_RISCV_PCREL_HI20 out of range: -524432 is not in [-524288, 524287]; references kallsyms_token_index
>>> referenced by kallsyms.c
>>> defined in kernel/built-in.a(kallsyms.o)
--
>> ld.lld: error: kernel/built-in.a(kallsyms.o):(function kallsyms_expand_symbol: .text+0x120): relocation R_RISCV_PCREL_HI20 out of range: -524432 is not in [-524288, 524287]; references kallsyms_token_table
>>> referenced by kallsyms.c
>>> defined in kernel/built-in.a(kallsyms.o)
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[freescale-fslc:pr/521 2683/9999] sound/soc/sof/intel/byt.c:613:27: error: 'intel_ipc_msg_data' undeclared here (not in a function); did you mean 'sof_ipc_msg_data'?
by kernel test robot
Hi Daniel,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc pr/521
head: e1200a7e26459892adfac6cb313bd8458b21fa95
commit: f628121dfa77c1af3991c7d0fc91961da65a89bc [2683/9999] LF-3774-1 ASoC: sof: Make Intel IPC stream ops generic
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20220115/202201150255.Q1KqCUXx-lk...)
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/Freescale/linux-fslc/commit/f628121dfa77c1af3991c7d0fc...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/521
git checkout f628121dfa77c1af3991c7d0fc91961da65a89bc
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash
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 >>):
>> sound/soc/sof/intel/byt.c:613:27: error: 'intel_ipc_msg_data' undeclared here (not in a function); did you mean 'sof_ipc_msg_data'?
613 | .ipc_msg_data = intel_ipc_msg_data,
| ^~~~~~~~~~~~~~~~~~
| sof_ipc_msg_data
>> sound/soc/sof/intel/byt.c:614:27: error: 'intel_ipc_pcm_params' undeclared here (not in a function); did you mean 'sof_ipc_pcm_params'?
614 | .ipc_pcm_params = intel_ipc_pcm_params,
| ^~~~~~~~~~~~~~~~~~~~
| sof_ipc_pcm_params
>> sound/soc/sof/intel/byt.c:628:27: error: 'intel_pcm_open' undeclared here (not in a function)
628 | .pcm_open = intel_pcm_open,
| ^~~~~~~~~~~~~~
>> sound/soc/sof/intel/byt.c:629:27: error: 'intel_pcm_close' undeclared here (not in a function)
629 | .pcm_close = intel_pcm_close,
| ^~~~~~~~~~~~~~~
vim +613 sound/soc/sof/intel/byt.c
9e42c5ca4a276a Liam Girdwood 2019-04-12 584
9e42c5ca4a276a Liam Girdwood 2019-04-12 585 const struct snd_sof_dsp_ops sof_tng_ops = {
9e42c5ca4a276a Liam Girdwood 2019-04-12 586 /* device init */
9e42c5ca4a276a Liam Girdwood 2019-04-12 587 .probe = tangier_pci_probe,
9e42c5ca4a276a Liam Girdwood 2019-04-12 588
9e42c5ca4a276a Liam Girdwood 2019-04-12 589 /* DSP core boot / reset */
9e42c5ca4a276a Liam Girdwood 2019-04-12 590 .run = byt_run,
9e42c5ca4a276a Liam Girdwood 2019-04-12 591 .reset = byt_reset,
9e42c5ca4a276a Liam Girdwood 2019-04-12 592
9e42c5ca4a276a Liam Girdwood 2019-04-12 593 /* Register IO */
9e42c5ca4a276a Liam Girdwood 2019-04-12 594 .write = sof_io_write,
9e42c5ca4a276a Liam Girdwood 2019-04-12 595 .read = sof_io_read,
9e42c5ca4a276a Liam Girdwood 2019-04-12 596 .write64 = sof_io_write64,
9e42c5ca4a276a Liam Girdwood 2019-04-12 597 .read64 = sof_io_read64,
9e42c5ca4a276a Liam Girdwood 2019-04-12 598
9e42c5ca4a276a Liam Girdwood 2019-04-12 599 /* Block IO */
9e42c5ca4a276a Liam Girdwood 2019-04-12 600 .block_read = sof_block_read,
9e42c5ca4a276a Liam Girdwood 2019-04-12 601 .block_write = sof_block_write,
9e42c5ca4a276a Liam Girdwood 2019-04-12 602
9e42c5ca4a276a Liam Girdwood 2019-04-12 603 /* doorbell */
9e42c5ca4a276a Liam Girdwood 2019-04-12 604 .irq_handler = byt_irq_handler,
9e42c5ca4a276a Liam Girdwood 2019-04-12 605 .irq_thread = byt_irq_thread,
9e42c5ca4a276a Liam Girdwood 2019-04-12 606
9e42c5ca4a276a Liam Girdwood 2019-04-12 607 /* ipc */
9e42c5ca4a276a Liam Girdwood 2019-04-12 608 .send_msg = byt_send_msg,
83ee7ab1627b75 Daniel Baluta 2019-08-07 609 .fw_ready = sof_fw_ready,
83ee7ab1627b75 Daniel Baluta 2019-08-07 610 .get_mailbox_offset = byt_get_mailbox_offset,
83ee7ab1627b75 Daniel Baluta 2019-08-07 611 .get_window_offset = byt_get_window_offset,
9e42c5ca4a276a Liam Girdwood 2019-04-12 612
9e42c5ca4a276a Liam Girdwood 2019-04-12 @613 .ipc_msg_data = intel_ipc_msg_data,
9e42c5ca4a276a Liam Girdwood 2019-04-12 @614 .ipc_pcm_params = intel_ipc_pcm_params,
9e42c5ca4a276a Liam Girdwood 2019-04-12 615
285880a23d105e Daniel Baluta 2019-12-04 616 /* machine driver */
285880a23d105e Daniel Baluta 2019-12-04 617 .machine_select = byt_machine_select,
285880a23d105e Daniel Baluta 2019-12-04 618 .machine_register = sof_machine_register,
285880a23d105e Daniel Baluta 2019-12-04 619 .machine_unregister = sof_machine_unregister,
285880a23d105e Daniel Baluta 2019-12-04 620 .set_mach_params = byt_set_mach_params,
285880a23d105e Daniel Baluta 2019-12-04 621
9e42c5ca4a276a Liam Girdwood 2019-04-12 622 /* debug */
9e42c5ca4a276a Liam Girdwood 2019-04-12 623 .debug_map = byt_debugfs,
9e42c5ca4a276a Liam Girdwood 2019-04-12 624 .debug_map_count = ARRAY_SIZE(byt_debugfs),
9e42c5ca4a276a Liam Girdwood 2019-04-12 625 .dbg_dump = byt_dump,
9e42c5ca4a276a Liam Girdwood 2019-04-12 626
9e42c5ca4a276a Liam Girdwood 2019-04-12 627 /* stream callbacks */
9e42c5ca4a276a Liam Girdwood 2019-04-12 @628 .pcm_open = intel_pcm_open,
9e42c5ca4a276a Liam Girdwood 2019-04-12 @629 .pcm_close = intel_pcm_close,
9e42c5ca4a276a Liam Girdwood 2019-04-12 630
9e42c5ca4a276a Liam Girdwood 2019-04-12 631 /* module loading */
9e42c5ca4a276a Liam Girdwood 2019-04-12 632 .load_module = snd_sof_parse_module_memcpy,
9e42c5ca4a276a Liam Girdwood 2019-04-12 633
9e42c5ca4a276a Liam Girdwood 2019-04-12 634 /*Firmware loading */
9e42c5ca4a276a Liam Girdwood 2019-04-12 635 .load_firmware = snd_sof_load_firmware_memcpy,
9e42c5ca4a276a Liam Girdwood 2019-04-12 636
9e42c5ca4a276a Liam Girdwood 2019-04-12 637 /* DAI drivers */
9e42c5ca4a276a Liam Girdwood 2019-04-12 638 .drv = byt_dai,
9e42c5ca4a276a Liam Girdwood 2019-04-12 639 .num_drv = 3, /* we have only 3 SSPs on byt*/
27e322fabd508b Pierre-Louis Bossart 2019-10-24 640
27e322fabd508b Pierre-Louis Bossart 2019-10-24 641 /* ALSA HW info flags */
27e322fabd508b Pierre-Louis Bossart 2019-10-24 642 .hw_info = SNDRV_PCM_INFO_MMAP |
27e322fabd508b Pierre-Louis Bossart 2019-10-24 643 SNDRV_PCM_INFO_MMAP_VALID |
27e322fabd508b Pierre-Louis Bossart 2019-10-24 644 SNDRV_PCM_INFO_INTERLEAVED |
27e322fabd508b Pierre-Louis Bossart 2019-10-24 645 SNDRV_PCM_INFO_PAUSE |
4c02a7bd43e22f Pierre-Louis Bossart 2019-10-24 646 SNDRV_PCM_INFO_BATCH,
0f501c7cde4086 Pierre-Louis Bossart 2019-12-17 647
0f501c7cde4086 Pierre-Louis Bossart 2019-12-17 648 .arch_ops = &sof_xtensa_arch_ops,
9e42c5ca4a276a Liam Girdwood 2019-04-12 649 };
e42b19450866fb Pierre-Louis Bossart 2019-12-17 650 EXPORT_SYMBOL_NS(sof_tng_ops, SND_SOC_SOF_MERRIFIELD);
9e42c5ca4a276a Liam Girdwood 2019-04-12 651
:::::: The code at line 613 was first introduced by commit
:::::: 9e42c5ca4a276a668b11116704f5f0d66ab80608 ASoC: SOF: Intel: Add BYT, CHT and BSW DSP HW support.
:::::: TO: Liam Girdwood <liam.r.girdwood(a)linux.intel.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[hverkuil-media-tree:for-v5.18f 76/82] include/linux/kern_levels.h:5:25: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t' {aka 'long long unsigned int'}
by kernel test robot
tree: git://linuxtv.org/hverkuil/media_tree.git for-v5.18f
head: 97dd85f0caf1ad96c275147583c46f8ee12308fc
commit: 63c049607882d11ee1cce0c739113c8dfd7fed02 [76/82] media: aspeed: add more debug log messages
config: arc-randconfig-r043-20220114 (https://download.01.org/0day-ci/archive/20220115/202201150246.rrQHjstb-lk...)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add hverkuil-media-tree git://linuxtv.org/hverkuil/media_tree.git
git fetch --no-tags hverkuil-media-tree for-v5.18f
git checkout 63c049607882d11ee1cce0c739113c8dfd7fed02
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/media/platform/
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 include/linux/kernel.h:20,
from include/linux/clk.h:13,
from drivers/media/platform/aspeed-video.c:7:
drivers/media/platform/aspeed-video.c: In function 'aspeed_video_set_resolution':
>> include/linux/kern_levels.h:5:25: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t' {aka 'long long unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:422:25: note: in definition of macro 'printk_index_wrap'
422 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/media/v4l2-common.h:58:9: note: in expansion of macro 'printk'
58 | printk(level "%s: " fmt, (dev)->name , ## arg)
| ^~~~~~
include/media/v4l2-common.h:74:25: note: in expansion of macro 'v4l2_printk'
74 | v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \
| ^~~~~~~~~~~
include/linux/kern_levels.h:15:25: note: in expansion of macro 'KERN_SOH'
15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
| ^~~~~~~~
include/media/v4l2-common.h:74:37: note: in expansion of macro 'KERN_DEBUG'
74 | v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \
| ^~~~~~~~~~
drivers/media/platform/aspeed-video.c:976:17: note: in expansion of macro 'v4l2_dbg'
976 | v4l2_dbg(1, debug, &video->v4l2_dev, "src buf0 addr(%#x) size(%d)\n",
| ^~~~~~~~
>> include/linux/kern_levels.h:5:25: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t' {aka 'long long unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:422:25: note: in definition of macro 'printk_index_wrap'
422 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/media/v4l2-common.h:58:9: note: in expansion of macro 'printk'
58 | printk(level "%s: " fmt, (dev)->name , ## arg)
| ^~~~~~
include/media/v4l2-common.h:74:25: note: in expansion of macro 'v4l2_printk'
74 | v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \
| ^~~~~~~~~~~
include/linux/kern_levels.h:15:25: note: in expansion of macro 'KERN_SOH'
15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
| ^~~~~~~~
include/media/v4l2-common.h:74:37: note: in expansion of macro 'KERN_DEBUG'
74 | v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \
| ^~~~~~~~~~
drivers/media/platform/aspeed-video.c:978:17: note: in expansion of macro 'v4l2_dbg'
978 | v4l2_dbg(1, debug, &video->v4l2_dev, "src buf1 addr(%#x) size(%d)\n",
| ^~~~~~~~
In file included from include/linux/device.h:15,
from drivers/media/platform/aspeed-video.c:9:
drivers/media/platform/aspeed-video.c: In function 'aspeed_video_init':
drivers/media/platform/aspeed-video.c:1805:30: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'dma_addr_t' {aka 'long long unsigned int'} [-Wformat=]
1805 | dev_info(video->dev, "alloc mem size(%d) at %#x for jpeg header\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/aspeed-video.c:1805:9: note: in expansion of macro 'dev_info'
1805 | dev_info(video->dev, "alloc mem size(%d) at %#x for jpeg header\n",
| ^~~~~~~~
drivers/media/platform/aspeed-video.c:1805:55: note: format string is defined here
1805 | dev_info(video->dev, "alloc mem size(%d) at %#x for jpeg header\n",
| ~~^
| |
| unsigned int
| %#llx
vim +5 include/linux/kern_levels.h
314ba3520e513a Joe Perches 2012-07-30 4
04d2c8c83d0e3a Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */
04d2c8c83d0e3a Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001'
04d2c8c83d0e3a Joe Perches 2012-07-30 7
:::::: The code at line 5 was first introduced by commit
:::::: 04d2c8c83d0e3ac5f78aeede51babb3236200112 printk: convert the format for KERN_<LEVEL> to a 2 byte pattern
:::::: TO: Joe Perches <joe(a)perches.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[hch-block:delete-write-same.5 7/8] drivers/block/loop.c:784:3: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors'
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git delete-write-same.5
head: e6a05a99f46ef909822031d28dfbcd1a7c9cfb56
commit: 4eeaaa4ec1e82312848c5bc48584de3247743df6 [7/8] block: remove REQ_OP_WRITE_SAME support
config: hexagon-randconfig-r045-20220113 (https://download.01.org/0day-ci/archive/20220115/202201150229.DHF8ezE1-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82c8aca93488730ce8f66101e0f3538f14b551dd)
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 remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block delete-write-same.5
git checkout 4eeaaa4ec1e82312848c5bc48584de3247743df6
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/block/
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 >>):
>> drivers/block/loop.c:784:3: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors' [-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(q, max_discard_sectors);
^
drivers/block/loop.c:789:3: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors' [-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(q, 0);
^
2 errors generated.
--
>> drivers/block/virtio_blk.c:938:3: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors' [-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(q, v ? v : UINT_MAX);
^
1 error generated.
--
>> drivers/block/rbd.c:4948:3: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors' [-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(q, objset_bytes >> SECTOR_SHIFT);
^
1 error generated.
--
>> drivers/block/zram/zram_drv.c:1983:3: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors' [-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(zram->disk->queue, UINT_MAX);
^
1 error generated.
vim +/blk_queue_max_write_zeroes_sectors +784 drivers/block/loop.c
ee86273062cbb3 Milan Broz 2010-08-23 746
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 747 static void loop_config_discard(struct loop_device *lo)
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 748 {
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 749 struct file *file = lo->lo_backing_file;
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 750 struct inode *inode = file->f_mapping->host;
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 751 struct request_queue *q = lo->lo_queue;
bcb21c8cc99472 Ming Lei 2020-08-17 752 u32 granularity, max_discard_sectors;
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 753
c52abf563049e7 Evan Green 2020-04-03 754 /*
c52abf563049e7 Evan Green 2020-04-03 755 * If the backing device is a block device, mirror its zeroing
c52abf563049e7 Evan Green 2020-04-03 756 * capability. Set the discard sectors to the block device's zeroing
c52abf563049e7 Evan Green 2020-04-03 757 * capabilities because loop discards result in blkdev_issue_zeroout(),
c52abf563049e7 Evan Green 2020-04-03 758 * not blkdev_issue_discard(). This maintains consistent behavior with
c52abf563049e7 Evan Green 2020-04-03 759 * file-backed loop devices: discarded regions read back as zero.
c52abf563049e7 Evan Green 2020-04-03 760 */
47e9624616c80c Christoph Hellwig 2021-10-19 761 if (S_ISBLK(inode->i_mode)) {
4e7b5671c6a883 Christoph Hellwig 2020-11-23 762 struct request_queue *backingq = bdev_get_queue(I_BDEV(inode));
c52abf563049e7 Evan Green 2020-04-03 763
bcb21c8cc99472 Ming Lei 2020-08-17 764 max_discard_sectors = backingq->limits.max_write_zeroes_sectors;
bcb21c8cc99472 Ming Lei 2020-08-17 765 granularity = backingq->limits.discard_granularity ?:
bcb21c8cc99472 Ming Lei 2020-08-17 766 queue_physical_block_size(backingq);
c52abf563049e7 Evan Green 2020-04-03 767
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 768 /*
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 769 * We use punch hole to reclaim the free space used by the
47e9624616c80c Christoph Hellwig 2021-10-19 770 * image a.k.a. discard.
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 771 */
47e9624616c80c Christoph Hellwig 2021-10-19 772 } else if (!file->f_op->fallocate) {
bcb21c8cc99472 Ming Lei 2020-08-17 773 max_discard_sectors = 0;
bcb21c8cc99472 Ming Lei 2020-08-17 774 granularity = 0;
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 775
c52abf563049e7 Evan Green 2020-04-03 776 } else {
bcb21c8cc99472 Ming Lei 2020-08-17 777 max_discard_sectors = UINT_MAX >> 9;
bcb21c8cc99472 Ming Lei 2020-08-17 778 granularity = inode->i_sb->s_blocksize;
c52abf563049e7 Evan Green 2020-04-03 779 }
c52abf563049e7 Evan Green 2020-04-03 780
bcb21c8cc99472 Ming Lei 2020-08-17 781 if (max_discard_sectors) {
bcb21c8cc99472 Ming Lei 2020-08-17 782 q->limits.discard_granularity = granularity;
bcb21c8cc99472 Ming Lei 2020-08-17 783 blk_queue_max_discard_sectors(q, max_discard_sectors);
bcb21c8cc99472 Ming Lei 2020-08-17 @784 blk_queue_max_write_zeroes_sectors(q, max_discard_sectors);
8b904b5b6b58b9 Bart Van Assche 2018-03-07 785 blk_queue_flag_set(QUEUE_FLAG_DISCARD, q);
bcb21c8cc99472 Ming Lei 2020-08-17 786 } else {
bcb21c8cc99472 Ming Lei 2020-08-17 787 q->limits.discard_granularity = 0;
bcb21c8cc99472 Ming Lei 2020-08-17 788 blk_queue_max_discard_sectors(q, 0);
bcb21c8cc99472 Ming Lei 2020-08-17 789 blk_queue_max_write_zeroes_sectors(q, 0);
c52abf563049e7 Evan Green 2020-04-03 790 blk_queue_flag_clear(QUEUE_FLAG_DISCARD, q);
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 791 }
bcb21c8cc99472 Ming Lei 2020-08-17 792 q->limits.discard_alignment = 0;
bcb21c8cc99472 Ming Lei 2020-08-17 793 }
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 794
:::::: The code at line 784 was first introduced by commit
:::::: bcb21c8cc9947286211327d663ace69f07d37a76 block: loop: set discard granularity and alignment for block device backed loop
:::::: TO: Ming Lei <ming.lei(a)redhat.com>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[hch-block:delete-write-same.5 7/8] drivers/nvme/host/core.c:1682:3: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors'
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git delete-write-same.5
head: e6a05a99f46ef909822031d28dfbcd1a7c9cfb56
commit: 4eeaaa4ec1e82312848c5bc48584de3247743df6 [7/8] block: remove REQ_OP_WRITE_SAME support
config: arm-randconfig-r022-20220113 (https://download.01.org/0day-ci/archive/20220115/202201150233.ahptDc1V-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82c8aca93488730ce8f66101e0f3538f14b551dd)
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
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block delete-write-same.5
git checkout 4eeaaa4ec1e82312848c5bc48584de3247743df6
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash block/ drivers/nvme/host/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> block/blk-settings.c:185:6: warning: no previous prototype for function 'blk_queue_max_write_zeroes_sectors' [-Wmissing-prototypes]
void blk_queue_max_write_zeroes_sectors(struct request_queue *q,
^
block/blk-settings.c:185:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void blk_queue_max_write_zeroes_sectors(struct request_queue *q,
^
static
1 warning generated.
--
>> drivers/nvme/host/core.c:1682:3: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors' [-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(queue, UINT_MAX);
^
drivers/nvme/host/core.c:1865:2: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors' [-Werror,-Wimplicit-function-declaration]
blk_queue_max_write_zeroes_sectors(disk->queue,
^
2 errors generated.
vim +/blk_queue_max_write_zeroes_sectors +1682 drivers/nvme/host/core.c
1673f1f08c8876 Christoph Hellwig 2015-11-26 1653
2631857160ecbe Christoph Hellwig 2019-03-13 1654 static void nvme_config_discard(struct gendisk *disk, struct nvme_ns *ns)
1673f1f08c8876 Christoph Hellwig 2015-11-26 1655 {
3831761eb859f5 Jens Axboe 2018-05-02 1656 struct nvme_ctrl *ctrl = ns->ctrl;
2631857160ecbe Christoph Hellwig 2019-03-13 1657 struct request_queue *queue = disk->queue;
30e5e929c7bfaf Christoph Hellwig 2017-11-02 1658 u32 size = queue_logical_block_size(queue);
30e5e929c7bfaf Christoph Hellwig 2017-11-02 1659
5befc7c26e5a98 Keith Busch 2021-03-24 1660 if (ctrl->max_discard_sectors == 0) {
3831761eb859f5 Jens Axboe 2018-05-02 1661 blk_queue_flag_clear(QUEUE_FLAG_DISCARD, queue);
3831761eb859f5 Jens Axboe 2018-05-02 1662 return;
3831761eb859f5 Jens Axboe 2018-05-02 1663 }
3831761eb859f5 Jens Axboe 2018-05-02 1664
3831761eb859f5 Jens Axboe 2018-05-02 1665 if (ctrl->nr_streams && ns->sws && ns->sgs)
3831761eb859f5 Jens Axboe 2018-05-02 1666 size *= ns->sws * ns->sgs;
08095e70783f1d Keith Busch 2016-03-04 1667
b35ba01ea69791 Christoph Hellwig 2017-02-08 1668 BUILD_BUG_ON(PAGE_SIZE / sizeof(struct nvme_dsm_range) <
b35ba01ea69791 Christoph Hellwig 2017-02-08 1669 NVME_DSM_MAX_RANGES);
b35ba01ea69791 Christoph Hellwig 2017-02-08 1670
b224f6134d72e3 David Disseldorp 2017-11-24 1671 queue->limits.discard_alignment = 0;
30e5e929c7bfaf Christoph Hellwig 2017-11-02 1672 queue->limits.discard_granularity = size;
f5d118406247ac Jens Axboe 2017-06-27 1673
3831761eb859f5 Jens Axboe 2018-05-02 1674 /* If discard is already enabled, don't reset queue limits */
3831761eb859f5 Jens Axboe 2018-05-02 1675 if (blk_queue_flag_test_and_set(QUEUE_FLAG_DISCARD, queue))
3831761eb859f5 Jens Axboe 2018-05-02 1676 return;
3831761eb859f5 Jens Axboe 2018-05-02 1677
5befc7c26e5a98 Keith Busch 2021-03-24 1678 blk_queue_max_discard_sectors(queue, ctrl->max_discard_sectors);
5befc7c26e5a98 Keith Busch 2021-03-24 1679 blk_queue_max_discard_segments(queue, ctrl->max_discard_segments);
e850fd16f751a6 Christoph Hellwig 2017-04-05 1680
e850fd16f751a6 Christoph Hellwig 2017-04-05 1681 if (ctrl->quirks & NVME_QUIRK_DEALLOCATE_ZEROES)
30e5e929c7bfaf Christoph Hellwig 2017-11-02 @1682 blk_queue_max_write_zeroes_sectors(queue, UINT_MAX);
1673f1f08c8876 Christoph Hellwig 2015-11-26 1683 }
1673f1f08c8876 Christoph Hellwig 2015-11-26 1684
:::::: The code at line 1682 was first introduced by commit
:::::: 30e5e929c7bfaf87a65f926715773ef14339b79f nvme: don't pass struct nvme_ns to nvme_config_discard
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
Re: [PATCH 2/2] usb: typec: rt1719: Add support for Richtek RT1719
by kernel test robot
Hi cy_huang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on robh/for-next v5.16 next-20220114]
[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/cy_huang/Add-Richtek-RT1719-USBP...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20220115/202201150209.qTlXJwWM-lk...)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/20efb31d7403b57c80a61a6c416d780ad...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review cy_huang/Add-Richtek-RT1719-USBPD-controller-support/20220115-000058
git checkout 20efb31d7403b57c80a61a6c416d780ad561a2bd
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/usb/
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/usb/typec/rt1719.c: In function 'rt1719_usbpd_request_voltage':
>> drivers/usb/typec/rt1719.c:492:65: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
492 | RT1719_EVALMODE_MASK | src_sel + 1);
| ~~~~~~~~^~~
vim +492 drivers/usb/typec/rt1719.c
437
438 static int rt1719_usbpd_request_voltage(struct rt1719_data *data)
439 {
440 u32 src_voltage;
441 int snk_sel, src_sel = -1;
442 int i, ret;
443
444 if (!data->attached || !data->pd_capable || data->spdo_sel <= 0)
445 return -EINVAL;
446
447 src_voltage = pdo_fixed_voltage(data->spdos[data->spdo_sel - 1]);
448 if (src_voltage == data->req_voltage)
449 return 0;
450
451 switch (data->req_voltage) {
452 case 5000:
453 snk_sel = RT1719_SNKCAP_5V;
454 break;
455 case 9000:
456 snk_sel = RT1719_SNKCAP_9V;
457 break;
458 case 12000:
459 snk_sel = RT1719_SNKCAP_12V;
460 break;
461 case 15000:
462 snk_sel = RT1719_SNKCAP_15V;
463 break;
464 case 20000:
465 snk_sel = RT1719_SNKCAP_20V;
466 break;
467 default:
468 return -EINVAL;
469 }
470
471 if (!(data->snkcaps[snk_sel] & RT1719_PSEL_SUPPORT))
472 return -EINVAL;
473
474 for (i = 0; i < data->spdo_num; i++) {
475 enum pd_pdo_type type = pdo_type(data->spdos[i]);
476
477 if (type != PDO_TYPE_FIXED)
478 continue;
479
480 src_voltage = pdo_fixed_voltage(data->spdos[i]);
481 if (src_voltage == data->req_voltage) {
482 src_sel = i;
483 break;
484 }
485 }
486
487 if (src_sel == -1)
488 return -ENOTSUPP;
489
490 ret = regmap_update_bits(data->regmap, RT1719_REG_TXCTRL1,
491 RT1719_EVALMODE_MASK | RT1719_REQSRCPDO_MASK,
> 492 RT1719_EVALMODE_MASK | src_sel + 1);
493 ret |= regmap_update_bits(data->regmap, RT1719_REG_TXCTRL2,
494 RT1719_TXSPDOREQ_MASK, RT1719_TXSPDOREQ_MASK);
495 if (ret)
496 return ret;
497
498 reinit_completion(&data->req_completion);
499 ret = wait_for_completion_timeout(&data->req_completion,
500 msecs_to_jiffies(400));
501 if (!ret)
502 return -ETIMEDOUT;
503
504 return 0;
505 }
506
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[hverkuil-media-tree:for-v5.18f 82/82] drivers/media/platform/aspeed-video.c:1836:30: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'}
by kernel test robot
tree: git://linuxtv.org/hverkuil/media_tree.git for-v5.18f
head: 97dd85f0caf1ad96c275147583c46f8ee12308fc
commit: 97dd85f0caf1ad96c275147583c46f8ee12308fc [82/82] f
config: nios2-allyesconfig (https://download.01.org/0day-ci/archive/20220115/202201150143.t4kto0kZ-lk...)
compiler: nios2-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add hverkuil-media-tree git://linuxtv.org/hverkuil/media_tree.git
git fetch --no-tags hverkuil-media-tree for-v5.18f
git checkout 97dd85f0caf1ad96c275147583c46f8ee12308fc
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/media/platform/
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 include/linux/device.h:15,
from drivers/media/platform/aspeed-video.c:9:
drivers/media/platform/aspeed-video.c: In function 'aspeed_video_init':
>> drivers/media/platform/aspeed-video.c:1836:30: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
1836 | dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/aspeed-video.c:1836:9: note: in expansion of macro 'dev_info'
1836 | dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n",
| ^~~~~~~~
drivers/media/platform/aspeed-video.c:1836:54: note: format string is defined here
1836 | dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n",
| ~^
| |
| void *
| %d
vim +1836 drivers/media/platform/aspeed-video.c
1780
1781 static int aspeed_video_init(struct aspeed_video *video)
1782 {
1783 int irq;
1784 int rc;
1785 struct device *dev = video->dev;
1786
1787 irq = irq_of_parse_and_map(dev->of_node, 0);
1788 if (!irq) {
1789 dev_err(dev, "Unable to find IRQ\n");
1790 return -ENODEV;
1791 }
1792
1793 rc = devm_request_threaded_irq(dev, irq, NULL, aspeed_video_irq,
1794 IRQF_ONESHOT, DEVICE_NAME, video);
1795 if (rc < 0) {
1796 dev_err(dev, "Unable to request IRQ %d\n", irq);
1797 return rc;
1798 }
1799 dev_info(video->dev, "irq %d\n", irq);
1800
1801 video->eclk = devm_clk_get(dev, "eclk");
1802 if (IS_ERR(video->eclk)) {
1803 dev_err(dev, "Unable to get ECLK\n");
1804 return PTR_ERR(video->eclk);
1805 }
1806
1807 rc = clk_prepare(video->eclk);
1808 if (rc)
1809 return rc;
1810
1811 video->vclk = devm_clk_get(dev, "vclk");
1812 if (IS_ERR(video->vclk)) {
1813 dev_err(dev, "Unable to get VCLK\n");
1814 rc = PTR_ERR(video->vclk);
1815 goto err_unprepare_eclk;
1816 }
1817
1818 rc = clk_prepare(video->vclk);
1819 if (rc)
1820 goto err_unprepare_eclk;
1821
1822 of_reserved_mem_device_init(dev);
1823
1824 rc = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
1825 if (rc) {
1826 dev_err(dev, "Failed to set DMA mask\n");
1827 goto err_release_reserved_mem;
1828 }
1829
1830 if (!aspeed_video_alloc_buf(video, &video->jpeg,
1831 VE_JPEG_HEADER_SIZE)) {
1832 dev_err(dev, "Failed to allocate DMA for JPEG header\n");
1833 rc = -ENOMEM;
1834 goto err_release_reserved_mem;
1835 }
> 1836 dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n",
1837 VE_JPEG_HEADER_SIZE, video->jpeg.dma);
1838
1839 aspeed_video_init_jpeg_table(video->jpeg.virt, video->yuv420);
1840
1841 return 0;
1842
1843 err_release_reserved_mem:
1844 of_reserved_mem_device_release(dev);
1845 clk_unprepare(video->vclk);
1846 err_unprepare_eclk:
1847 clk_unprepare(video->eclk);
1848
1849 return rc;
1850 }
1851
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[hverkuil-media-tree:for-v5.18f 82/82] drivers/media/platform/aspeed-video.c:1836:30: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'}
by kernel test robot
tree: git://linuxtv.org/hverkuil/media_tree.git for-v5.18f
head: 97dd85f0caf1ad96c275147583c46f8ee12308fc
commit: 97dd85f0caf1ad96c275147583c46f8ee12308fc [82/82] f
config: parisc-buildonly-randconfig-r002-20220113 (https://download.01.org/0day-ci/archive/20220115/202201150148.ScCRoG8b-lk...)
compiler: hppa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add hverkuil-media-tree git://linuxtv.org/hverkuil/media_tree.git
git fetch --no-tags hverkuil-media-tree for-v5.18f
git checkout 97dd85f0caf1ad96c275147583c46f8ee12308fc
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash drivers/media/platform/
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 include/linux/device.h:15,
from drivers/media/platform/aspeed-video.c:9:
drivers/media/platform/aspeed-video.c: In function 'aspeed_video_init':
>> drivers/media/platform/aspeed-video.c:1836:30: warning: format '%p' expects argument of type 'void *', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
1836 | dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/aspeed-video.c:1836:9: note: in expansion of macro 'dev_info'
1836 | dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n",
| ^~~~~~~~
drivers/media/platform/aspeed-video.c:1836:54: note: format string is defined here
1836 | dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n",
| ~^
| |
| void *
| %d
vim +1836 drivers/media/platform/aspeed-video.c
1780
1781 static int aspeed_video_init(struct aspeed_video *video)
1782 {
1783 int irq;
1784 int rc;
1785 struct device *dev = video->dev;
1786
1787 irq = irq_of_parse_and_map(dev->of_node, 0);
1788 if (!irq) {
1789 dev_err(dev, "Unable to find IRQ\n");
1790 return -ENODEV;
1791 }
1792
1793 rc = devm_request_threaded_irq(dev, irq, NULL, aspeed_video_irq,
1794 IRQF_ONESHOT, DEVICE_NAME, video);
1795 if (rc < 0) {
1796 dev_err(dev, "Unable to request IRQ %d\n", irq);
1797 return rc;
1798 }
1799 dev_info(video->dev, "irq %d\n", irq);
1800
1801 video->eclk = devm_clk_get(dev, "eclk");
1802 if (IS_ERR(video->eclk)) {
1803 dev_err(dev, "Unable to get ECLK\n");
1804 return PTR_ERR(video->eclk);
1805 }
1806
1807 rc = clk_prepare(video->eclk);
1808 if (rc)
1809 return rc;
1810
1811 video->vclk = devm_clk_get(dev, "vclk");
1812 if (IS_ERR(video->vclk)) {
1813 dev_err(dev, "Unable to get VCLK\n");
1814 rc = PTR_ERR(video->vclk);
1815 goto err_unprepare_eclk;
1816 }
1817
1818 rc = clk_prepare(video->vclk);
1819 if (rc)
1820 goto err_unprepare_eclk;
1821
1822 of_reserved_mem_device_init(dev);
1823
1824 rc = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
1825 if (rc) {
1826 dev_err(dev, "Failed to set DMA mask\n");
1827 goto err_release_reserved_mem;
1828 }
1829
1830 if (!aspeed_video_alloc_buf(video, &video->jpeg,
1831 VE_JPEG_HEADER_SIZE)) {
1832 dev_err(dev, "Failed to allocate DMA for JPEG header\n");
1833 rc = -ENOMEM;
1834 goto err_release_reserved_mem;
1835 }
> 1836 dev_info(video->dev, "alloc mem size(%d) at %pad for jpeg header\n",
1837 VE_JPEG_HEADER_SIZE, video->jpeg.dma);
1838
1839 aspeed_video_init_jpeg_table(video->jpeg.virt, video->yuv420);
1840
1841 return 0;
1842
1843 err_release_reserved_mem:
1844 of_reserved_mem_device_release(dev);
1845 clk_unprepare(video->vclk);
1846 err_unprepare_eclk:
1847 clk_unprepare(video->eclk);
1848
1849 return rc;
1850 }
1851
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[hch-block:delete-write-same.5 7/8] drivers/block/loop.c:784:17: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors'; did you mean 'blk_queue_max_zone_append_sectors'?
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git delete-write-same.5
head: e6a05a99f46ef909822031d28dfbcd1a7c9cfb56
commit: 4eeaaa4ec1e82312848c5bc48584de3247743df6 [7/8] block: remove REQ_OP_WRITE_SAME support
config: riscv-randconfig-r042-20220113 (https://download.01.org/0day-ci/archive/20220115/202201150150.oeDbdzye-lk...)
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block delete-write-same.5
git checkout 4eeaaa4ec1e82312848c5bc48584de3247743df6
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash drivers/block/ drivers/nvme/host/
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 >>):
drivers/block/loop.c: In function 'loop_config_discard':
>> drivers/block/loop.c:784:17: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors'; did you mean 'blk_queue_max_zone_append_sectors'? [-Werror=implicit-function-declaration]
784 | blk_queue_max_write_zeroes_sectors(q, max_discard_sectors);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| blk_queue_max_zone_append_sectors
cc1: some warnings being treated as errors
--
drivers/block/virtio_blk.c: In function 'virtblk_probe':
>> drivers/block/virtio_blk.c:938:17: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors'; did you mean 'blk_queue_max_zone_append_sectors'? [-Werror=implicit-function-declaration]
938 | blk_queue_max_write_zeroes_sectors(q, v ? v : UINT_MAX);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| blk_queue_max_zone_append_sectors
cc1: some warnings being treated as errors
--
drivers/nvme/host/core.c: In function 'nvme_config_discard':
>> drivers/nvme/host/core.c:1682:17: error: implicit declaration of function 'blk_queue_max_write_zeroes_sectors'; did you mean 'blk_queue_max_zone_append_sectors'? [-Werror=implicit-function-declaration]
1682 | blk_queue_max_write_zeroes_sectors(queue, UINT_MAX);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| blk_queue_max_zone_append_sectors
cc1: some warnings being treated as errors
vim +784 drivers/block/loop.c
ee86273062cbb3 Milan Broz 2010-08-23 746
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 747 static void loop_config_discard(struct loop_device *lo)
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 748 {
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 749 struct file *file = lo->lo_backing_file;
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 750 struct inode *inode = file->f_mapping->host;
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 751 struct request_queue *q = lo->lo_queue;
bcb21c8cc99472 Ming Lei 2020-08-17 752 u32 granularity, max_discard_sectors;
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 753
c52abf563049e7 Evan Green 2020-04-03 754 /*
c52abf563049e7 Evan Green 2020-04-03 755 * If the backing device is a block device, mirror its zeroing
c52abf563049e7 Evan Green 2020-04-03 756 * capability. Set the discard sectors to the block device's zeroing
c52abf563049e7 Evan Green 2020-04-03 757 * capabilities because loop discards result in blkdev_issue_zeroout(),
c52abf563049e7 Evan Green 2020-04-03 758 * not blkdev_issue_discard(). This maintains consistent behavior with
c52abf563049e7 Evan Green 2020-04-03 759 * file-backed loop devices: discarded regions read back as zero.
c52abf563049e7 Evan Green 2020-04-03 760 */
47e9624616c80c Christoph Hellwig 2021-10-19 761 if (S_ISBLK(inode->i_mode)) {
4e7b5671c6a883 Christoph Hellwig 2020-11-23 762 struct request_queue *backingq = bdev_get_queue(I_BDEV(inode));
c52abf563049e7 Evan Green 2020-04-03 763
bcb21c8cc99472 Ming Lei 2020-08-17 764 max_discard_sectors = backingq->limits.max_write_zeroes_sectors;
bcb21c8cc99472 Ming Lei 2020-08-17 765 granularity = backingq->limits.discard_granularity ?:
bcb21c8cc99472 Ming Lei 2020-08-17 766 queue_physical_block_size(backingq);
c52abf563049e7 Evan Green 2020-04-03 767
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 768 /*
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 769 * We use punch hole to reclaim the free space used by the
47e9624616c80c Christoph Hellwig 2021-10-19 770 * image a.k.a. discard.
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 771 */
47e9624616c80c Christoph Hellwig 2021-10-19 772 } else if (!file->f_op->fallocate) {
bcb21c8cc99472 Ming Lei 2020-08-17 773 max_discard_sectors = 0;
bcb21c8cc99472 Ming Lei 2020-08-17 774 granularity = 0;
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 775
c52abf563049e7 Evan Green 2020-04-03 776 } else {
bcb21c8cc99472 Ming Lei 2020-08-17 777 max_discard_sectors = UINT_MAX >> 9;
bcb21c8cc99472 Ming Lei 2020-08-17 778 granularity = inode->i_sb->s_blocksize;
c52abf563049e7 Evan Green 2020-04-03 779 }
c52abf563049e7 Evan Green 2020-04-03 780
bcb21c8cc99472 Ming Lei 2020-08-17 781 if (max_discard_sectors) {
bcb21c8cc99472 Ming Lei 2020-08-17 782 q->limits.discard_granularity = granularity;
bcb21c8cc99472 Ming Lei 2020-08-17 783 blk_queue_max_discard_sectors(q, max_discard_sectors);
bcb21c8cc99472 Ming Lei 2020-08-17 @784 blk_queue_max_write_zeroes_sectors(q, max_discard_sectors);
8b904b5b6b58b9 Bart Van Assche 2018-03-07 785 blk_queue_flag_set(QUEUE_FLAG_DISCARD, q);
bcb21c8cc99472 Ming Lei 2020-08-17 786 } else {
bcb21c8cc99472 Ming Lei 2020-08-17 787 q->limits.discard_granularity = 0;
bcb21c8cc99472 Ming Lei 2020-08-17 788 blk_queue_max_discard_sectors(q, 0);
bcb21c8cc99472 Ming Lei 2020-08-17 789 blk_queue_max_write_zeroes_sectors(q, 0);
c52abf563049e7 Evan Green 2020-04-03 790 blk_queue_flag_clear(QUEUE_FLAG_DISCARD, q);
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 791 }
bcb21c8cc99472 Ming Lei 2020-08-17 792 q->limits.discard_alignment = 0;
bcb21c8cc99472 Ming Lei 2020-08-17 793 }
dfaa2ef68e80c3 Lukas Czerner 2011-08-19 794
:::::: The code at line 784 was first introduced by commit
:::::: bcb21c8cc9947286211327d663ace69f07d37a76 block: loop: set discard granularity and alignment for block device backed loop
:::::: TO: Ming Lei <ming.lei(a)redhat.com>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[freescale-fslc:pr/521 1728/9999] drivers/net/imx-shmem-net.c:1175:9: error: implicit declaration of function 'imx_scu_irq_unregister_notifier'; did you mean 'netlink_unregister_notifier'?
by kernel test robot
Hi Nitin,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc pr/521
head: e1200a7e26459892adfac6cb313bd8458b21fa95
commit: 1730a5e196055cef89fe50dd63852ebc32cce135 [1728/9999] MLK-25346: net: add imx-shmem-net driver
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20220115/202201150115.7h4jcXMX-lk...)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/Freescale/linux-fslc/commit/1730a5e196055cef89fe50dd63...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/521
git checkout 1730a5e196055cef89fe50dd63852ebc32cce135
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash
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 include/linux/kernel.h:11,
from drivers/net/imx-shmem-net.c:19:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:50: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:9: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:17: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/net/imx-shmem-net.c: In function 'mu_enable_reset_irq':
drivers/net/imx-shmem-net.c:993:13: warning: unused variable 'sciErr' [-Wunused-variable]
993 | int sciErr;
| ^~~~~~
drivers/net/imx-shmem-net.c: In function 'imx_shm_net_probe':
>> drivers/net/imx-shmem-net.c:1175:9: error: implicit declaration of function 'imx_scu_irq_unregister_notifier'; did you mean 'netlink_unregister_notifier'? [-Werror=implicit-function-declaration]
1175 | imx_scu_irq_unregister_notifier(&in->pnotifier);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| netlink_unregister_notifier
At top level:
drivers/net/imx-shmem-net.c:887:12: warning: 'imx_shm_partition_notify' defined but not used [-Wunused-function]
887 | static int imx_shm_partition_notify(struct notifier_block *nb,
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES
Depends on DISCONTIGMEM || NUMA
Selected by
- SINGLE_MEMORY_CHUNK && MMU
vim +1175 drivers/net/imx-shmem-net.c
989
990 /* enable reset notification MU */
991 static int mu_enable_reset_irq(struct net_device *ndev)
992 {
> 993 int sciErr;
994 struct imx_shm_net *isndev;
995 struct device_node *np;
996
997 isndev = netdev_priv(ndev);
998 np = isndev->pdev->dev.of_node;
999
1000 /* Get muB partition id and enable irq in SCFW then */
1001 if (of_property_read_u32(np, "mub-partition",
1002 &isndev->mub_partition))
1003 isndev->mub_partition = IMX_SHM_NET_DEFAULT_PART;
1004 dev_dbg(&isndev->pdev->dev, "watching reset from partition %d\n",
1005 isndev->mub_partition);
1006
1007 #ifdef CONFIG_IMX_SCU
1008 /* Request for the partition reset interrupt. */
1009 sciErr = imx_scu_irq_group_enable(SC_IRQ_GROUP_REBOOTED,
1010 BIT(isndev->mub_partition), true);
1011 if (sciErr)
1012 dev_warn(&isndev->pdev->dev, "Cannot request partition reset interrupt\n");
1013
1014 isndev->pnotifier.notifier_call = imx_shm_partition_notify;
1015 sciErr = imx_scu_irq_register_notifier(&isndev->pnotifier);
1016 if (sciErr) {
1017 imx_scu_irq_group_enable(SC_IRQ_GROUP_REBOOTED,
1018 BIT(isndev->mub_partition), false);
1019 dev_warn(&isndev->pdev->dev, "Failed to register partition reset notifier\n");
1020 }
1021 #endif
1022 return 0;
1023 }
1024
1025 static const struct ethtool_ops imx_shm_net_ethtool_ops = {
1026 .get_sset_count = imx_shm_net_get_sset_count,
1027 .get_strings = imx_shm_net_get_strings,
1028 .get_ethtool_stats = imx_shm_net_get_ethtool_stats,
1029 .get_regs_len = imx_shm_net_get_regs_len,
1030 .get_regs = imx_shm_net_get_regs,
1031 };
1032
1033 static int imx_shm_net_probe(struct platform_device *pdev)
1034 {
1035 struct net_device *ndev = NULL;
1036 struct imx_shm_net *in;
1037 resource_size_t shmaddr;
1038 resource_size_t shmlen;
1039 char *device_name;
1040 void *shm = NULL;
1041 u32 ivpos;
1042 int ret;
1043
1044 /* check if 1st probe or another attempt after EAGAIN */
1045 if (pdev->dev.driver_data) {
1046 dev_dbg(&pdev->dev, "Retrying connection...\n");
1047 in = netdev_priv(platform_get_drvdata(pdev));
1048 goto retry;
1049 }
1050
1051 if (of_property_read_bool(pdev->dev.of_node, "rxfirst")) {
1052 ivpos = 1;
1053 dev_info(&pdev->dev, "queue position is RX first\n");
1054 } else {
1055 ivpos = 0;
1056 dev_info(&pdev->dev, "queue position is TX first\n");
1057 }
1058
1059 /* get shared coherent memory for buffers */
1060 if (of_reserved_mem_device_init(&pdev->dev)) {
1061 dev_err(&pdev->dev,
1062 "dev doesn't have specific DMA pool.\n");
1063 return -ENOMEM;
1064 }
1065 shmlen = IMX_SHM_NET_DMA_SIZE;
1066 shm = dma_alloc_coherent(&pdev->dev, IMX_SHM_NET_DMA_SIZE,
1067 &shmaddr, GFP_KERNEL);
1068 if (!shm || !shmaddr)
1069 return -ENOMEM;
1070
1071 dev_info(&pdev->dev, "allocated %d bytes in coherent mem @ 0x%x\n",
1072 (uint)shmlen, (uint)shmaddr);
1073
1074 device_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s[%s]", DRV_NAME,
1075 dev_name(&pdev->dev));
1076 if (!device_name) {
1077 ret = -ENOMEM;
1078 goto err_free_dma;
1079 }
1080
1081 ndev = alloc_etherdev(sizeof(*in));
1082 if (!ndev) {
1083 ret = -ENOMEM;
1084 goto err_free_dma;
1085 }
1086 dev_info(&pdev->dev, "allocated ethernet device %s\n", ndev->name);
1087
1088 platform_set_drvdata(pdev, ndev);
1089 SET_NETDEV_DEV(ndev, &pdev->dev);
1090
1091 /* get struct 'imx_shm_net' stored as private data in ndev */
1092 in = netdev_priv(ndev);
1093
1094 list_add(&in->isn_node, &imx_shm_net_head);
1095
1096 in->shm = shm;
1097 in->shmaddr = shmaddr;
1098 in->shmlen = shmlen;
1099 in->pdev = pdev;
1100 in->regs.ivpos = ivpos;
1101 in->regs.rstate = IMX_SHM_NET_STATE_RESET;
1102 in->remote_message = IMX_SHM_NET_STATE_RESET;
1103 spin_lock_init(&in->tx_free_lock);
1104 spin_lock_init(&in->tx_clean_lock);
1105 mutex_init(&in->state_lock);
1106
1107 /* enable peer's reset notification */
1108 ret = mu_enable_reset_irq(ndev);
1109 if (ret)
1110 goto err_free;
1111
1112 ret = imx_shm_net_calc_qsize(ndev);
1113 if (ret)
1114 goto err_reset_irq;
1115
1116 in->state_wq = alloc_ordered_workqueue(device_name, 0);
1117 if (!in->state_wq) {
1118 ret = -ENOMEM;
1119 goto err_reset_irq;
1120 }
1121
1122 INIT_WORK(&in->state_work, imx_shm_net_state_change);
1123
1124 eth_random_addr(ndev->dev_addr);
1125 ndev->netdev_ops = &imx_shm_net_ops;
1126 ndev->ethtool_ops = &imx_shm_net_ethtool_ops;
1127 ndev->mtu = min_t(u32, IMX_SHM_NET_MTU_DEF, in->qsize / 16);
1128 ndev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG;
1129 ndev->features = ndev->hw_features;
1130
1131 netif_carrier_off(ndev);
1132 netif_napi_add(ndev, &in->napi, imx_shm_net_poll, NAPI_POLL_WEIGHT);
1133
1134 ret = register_netdev(ndev);
1135 if (ret)
1136 goto err_wq;
1137
1138 /* initialize Mailbox for RX/TX */
1139 ret = imx_shm_xtr_channel_init(in);
1140 if (ret) {
1141 dev_err(&in->pdev->dev, "unable to initialize Mailbox.\n");
1142 /* MU may not be ready yet, need to try later on */
1143 ret = -EPROBE_DEFER;
1144 goto err_unregister;
1145 }
1146 dev_info(&in->pdev->dev,
1147 "Mailbox is ready for cross core communication!\n");
1148
1149 retry:
1150 /* notify reset */
1151 mutex_lock(&in->state_lock);
1152 in->regs.lstate = IMX_SHM_NET_STATE_RESET;
1153 in->message_state = MESS_STATE_NEW;
1154 mutex_unlock(&in->state_lock);
1155
1156 /* only device with queue position TXfirst sends the first message */
1157 if (!ivpos) {
1158 ret = mbox_send_message(in->tx_ch, &in->regs.lstate);
1159 if (ret < 0)
1160 dev_err(&pdev->dev, "%s first message error=%d!\n",
1161 __func__, ret);
1162
1163 dev_dbg(&pdev->dev, "%s sent first message\n", __func__);
1164 }
1165
1166 return 0;
1167
1168 err_unregister:
1169 unregister_netdev(ndev);
1170
1171 err_wq:
1172 destroy_workqueue(in->state_wq);
1173
1174 err_reset_irq:
> 1175 imx_scu_irq_unregister_notifier(&in->pnotifier);
1176
1177 err_free:
1178 list_del(&in->isn_node);
1179 free_netdev(ndev);
1180
1181 err_free_dma:
1182 dma_free_coherent(&pdev->dev, shmlen, shm, shmaddr);
1183
1184 return ret;
1185 }
1186
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week