drivers/hid/hid-nintendo.c:403:29: error: 'JC_RUMBLE_ZERO_AMP_PKT_CNT' defined but not used
by kernel test robot
Hi Daniel,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b81b1829e7e39f6cebdf6e4d5484eacbceda8554
commit: dad74e18f72a852ae40ad7b4246841a1b7e196b5 HID: nintendo: prevent needless queueing of the rumble worker
date: 4 months ago
config: parisc-randconfig-r024-20220213 (https://download.01.org/0day-ci/archive/20220214/202202140412.ltmfle7c-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
# 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 dad74e18f72a852ae40ad7b4246841a1b7e196b5
# 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/hid/ fs/notify/fanotify/
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/hid/hid-nintendo.c:403:29: error: 'JC_RUMBLE_ZERO_AMP_PKT_CNT' defined but not used [-Werror=unused-const-variable=]
403 | static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:401:18: error: 'JC_RUMBLE_DFLT_HIGH_FREQ' defined but not used [-Werror=unused-const-variable=]
401 | static const u16 JC_RUMBLE_DFLT_HIGH_FREQ = 320;
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:400:18: error: 'JC_RUMBLE_DFLT_LOW_FREQ' defined but not used [-Werror=unused-const-variable=]
400 | static const u16 JC_RUMBLE_DFLT_LOW_FREQ = 160;
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:254:44: error: 'joycon_rumble_amplitudes' defined but not used [-Werror=unused-const-variable=]
254 | static const struct joycon_rumble_amp_data joycon_rumble_amplitudes[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:196:45: error: 'joycon_rumble_frequencies' defined but not used [-Werror=unused-const-variable=]
196 | static const struct joycon_rumble_freq_data joycon_rumble_frequencies[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:99:17: error: 'JC_USB_SEND_UART' defined but not used [-Werror=unused-const-variable=]
99 | static const u8 JC_USB_SEND_UART = 0x92;
| ^~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:98:17: error: 'JC_USB_PRE_HANDSHAKE' defined but not used [-Werror=unused-const-variable=]
98 | static const u8 JC_USB_PRE_HANDSHAKE = 0x91;
| ^~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:97:17: error: 'JC_USB_RESET' defined but not used [-Werror=unused-const-variable=]
97 | static const u8 JC_USB_RESET = 0x06;
| ^~~~~~~~~~~~
drivers/hid/hid-nintendo.c:96:17: error: 'JC_USB_CMD_EN_TIMEOUT' defined but not used [-Werror=unused-const-variable=]
96 | static const u8 JC_USB_CMD_EN_TIMEOUT = 0x05;
| ^~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:92:17: error: 'JC_USB_CMD_CONN_STATUS' defined but not used [-Werror=unused-const-variable=]
92 | static const u8 JC_USB_CMD_CONN_STATUS = 0x01;
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:89:17: error: 'JC_FEATURE_LAUNCH' defined but not used [-Werror=unused-const-variable=]
89 | static const u8 JC_FEATURE_LAUNCH = 0x75;
| ^~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:88:17: error: 'JC_FEATURE_MEM_WRITE' defined but not used [-Werror=unused-const-variable=]
88 | static const u8 JC_FEATURE_MEM_WRITE = 0x74;
| ^~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:87:17: error: 'JC_FEATURE_ERASE_MEM_SECTOR' defined but not used [-Werror=unused-const-variable=]
87 | static const u8 JC_FEATURE_ERASE_MEM_SECTOR = 0x73;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:86:17: error: 'JC_FEATURE_MEM_READ' defined but not used [-Werror=unused-const-variable=]
86 | static const u8 JC_FEATURE_MEM_READ = 0x72;
| ^~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:85:17: error: 'JC_FEATURE_SETUP_MEM_READ' defined but not used [-Werror=unused-const-variable=]
85 | static const u8 JC_FEATURE_SETUP_MEM_READ = 0x71;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:84:17: error: 'JC_FEATURE_OTA_FW_UPGRADE' defined but not used [-Werror=unused-const-variable=]
84 | static const u8 JC_FEATURE_OTA_FW_UPGRADE = 0x70;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:83:17: error: 'JC_FEATURE_LAST_SUBCMD' defined but not used [-Werror=unused-const-variable=]
83 | static const u8 JC_FEATURE_LAST_SUBCMD = 0x02;
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:76:17: error: 'JC_INPUT_BUTTON_EVENT' defined but not used [-Werror=unused-const-variable=]
76 | static const u8 JC_INPUT_BUTTON_EVENT = 0x3F;
| ^~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:73:17: error: 'JC_SUBCMD_GET_REGULATED_VOLTAGE' defined but not used [-Werror=unused-const-variable=]
73 | static const u8 JC_SUBCMD_GET_REGULATED_VOLTAGE = 0x50;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:71:17: error: 'JC_SUBCMD_READ_IMU_REG' defined but not used [-Werror=unused-const-variable=]
71 | static const u8 JC_SUBCMD_READ_IMU_REG = 0x43;
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:70:17: error: 'JC_SUBCMD_WRITE_IMU_REG' defined but not used [-Werror=unused-const-variable=]
70 | static const u8 JC_SUBCMD_WRITE_IMU_REG = 0x42;
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:69:17: error: 'JC_SUBCMD_SET_IMU_SENSITIVITY' defined but not used [-Werror=unused-const-variable=]
69 | static const u8 JC_SUBCMD_SET_IMU_SENSITIVITY = 0x41;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:66:17: error: 'JC_SUBCMD_GET_PLAYER_LIGHTS' defined but not used [-Werror=unused-const-variable=]
66 | static const u8 JC_SUBCMD_GET_PLAYER_LIGHTS = 0x31;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:64:17: error: 'JC_SUBCMD_SET_MCU_STATE' defined but not used [-Werror=unused-const-variable=]
64 | static const u8 JC_SUBCMD_SET_MCU_STATE = 0x22;
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:63:17: error: 'JC_SUBCMD_SET_MCU_CONFIG' defined but not used [-Werror=unused-const-variable=]
63 | static const u8 JC_SUBCMD_SET_MCU_CONFIG = 0x21;
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:62:17: error: 'JC_SUBCMD_RESET_MCU' defined but not used [-Werror=unused-const-variable=]
62 | static const u8 JC_SUBCMD_RESET_MCU = 0x20;
| ^~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:61:17: error: 'JC_SUBCMD_SPI_FLASH_WRITE' defined but not used [-Werror=unused-const-variable=]
61 | static const u8 JC_SUBCMD_SPI_FLASH_WRITE = 0x11;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:59:17: error: 'JC_SUBCMD_LOW_POWER_MODE' defined but not used [-Werror=unused-const-variable=]
59 | static const u8 JC_SUBCMD_LOW_POWER_MODE = 0x08;
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:58:17: error: 'JC_SUBCMD_RESET_PAIRING_INFO' defined but not used [-Werror=unused-const-variable=]
58 | static const u8 JC_SUBCMD_RESET_PAIRING_INFO = 0x07;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:57:17: error: 'JC_SUBCMD_SET_HCI_STATE' defined but not used [-Werror=unused-const-variable=]
57 | static const u8 JC_SUBCMD_SET_HCI_STATE = 0x06;
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:56:17: error: 'JC_SUBCMD_GET_PAGE_LIST_STATE' defined but not used [-Werror=unused-const-variable=]
56 | static const u8 JC_SUBCMD_GET_PAGE_LIST_STATE = 0x05;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:55:17: error: 'JC_SUBCMD_TRIGGERS_ELAPSED' defined but not used [-Werror=unused-const-variable=]
55 | static const u8 JC_SUBCMD_TRIGGERS_ELAPSED = 0x04;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:52:17: error: 'JC_SUBCMD_MANUAL_BT_PAIRING' defined but not used [-Werror=unused-const-variable=]
52 | static const u8 JC_SUBCMD_MANUAL_BT_PAIRING = 0x01;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-nintendo.c:51:17: error: 'JC_SUBCMD_STATE' defined but not used [-Werror=unused-const-variable=]
51 | static const u8 JC_SUBCMD_STATE /*= 0x00*/;
vim +/JC_RUMBLE_ZERO_AMP_PKT_CNT +403 drivers/hid/hid-nintendo.c
399
400 static const u16 JC_RUMBLE_DFLT_LOW_FREQ = 160;
401 static const u16 JC_RUMBLE_DFLT_HIGH_FREQ = 320;
402 static const u16 JC_RUMBLE_PERIOD_MS = 50;
> 403 static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
404
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
coreboot_table.c:undefined reference to `memremap'
by kernel test robot
Hi Arnd,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c5d9ae265b105d9a67575fb67bd4650a6fc08e25
commit: 951cd3a0866d29cb9c01ebc1d9c17590e598226e firmware: include drivers/firmware/Kconfig unconditionally
date: 4 months ago
config: s390-randconfig-r023-20220216 (https://download.01.org/0day-ci/archive/20220216/202202162338.iHngg0KZ-lk...)
compiler: s390-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/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 951cd3a0866d29cb9c01ebc1d9c17590e598226e
# 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=s390 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 >>):
s390-linux-ld: drivers/clk/clk-fixed-mmio.o: in function `fixed_mmio_clk_setup':
clk-fixed-mmio.c:(.text+0x96): undefined reference to `of_iomap'
s390-linux-ld: clk-fixed-mmio.c:(.text+0x118): undefined reference to `iounmap'
s390-linux-ld: drivers/dma/fsl-edma.o: in function `fsl_edma_probe':
fsl-edma.c:(.text+0x10ee): undefined reference to `devm_ioremap_resource'
s390-linux-ld: fsl-edma.c:(.text+0x181c): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/dma/idma64.o: in function `idma64_platform_probe':
idma64.c:(.text+0x38bc): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/dma/qcom/hidma.o: in function `hidma_probe':
hidma.c:(.text+0x28ec): undefined reference to `devm_ioremap_resource'
s390-linux-ld: hidma.c:(.text+0x2934): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/char/xillybus/xillybus_of.o: in function `xilly_drv_probe':
xillybus_of.c:(.text+0x2c0): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/net/ethernet/altera/altera_tse_main.o: in function `request_and_map':
altera_tse_main.c:(.text+0x1b98): undefined reference to `devm_ioremap'
s390-linux-ld: drivers/firmware/google/coreboot_table.o: in function `coreboot_table_probe':
>> coreboot_table.c:(.text+0x596): undefined reference to `memremap'
>> s390-linux-ld: coreboot_table.c:(.text+0x646): undefined reference to `memunmap'
>> s390-linux-ld: coreboot_table.c:(.text+0x692): undefined reference to `memremap'
s390-linux-ld: coreboot_table.c:(.text+0x6dc): undefined reference to `memunmap'
s390-linux-ld: drivers/firmware/google/memconsole-coreboot.o: in function `memconsole_probe':
>> memconsole-coreboot.c:(.text+0x2f6): undefined reference to `memremap'
>> s390-linux-ld: memconsole-coreboot.c:(.text+0x3ca): undefined reference to `devm_memremap'
>> s390-linux-ld: memconsole-coreboot.c:(.text+0x3da): undefined reference to `memunmap'
s390-linux-ld: drivers/firmware/google/vpd.o: in function `vpd_section_destroy.isra.0':
vpd.c:(.text+0x812): undefined reference to `memunmap'
s390-linux-ld: drivers/firmware/google/vpd.o: in function `vpd_section_init':
vpd.c:(.text+0x986): undefined reference to `memremap'
s390-linux-ld: vpd.c:(.text+0xc04): undefined reference to `memunmap'
s390-linux-ld: drivers/firmware/google/vpd.o: in function `vpd_probe':
vpd.c:(.text+0xe0c): undefined reference to `memremap'
s390-linux-ld: vpd.c:(.text+0xe32): undefined reference to `memunmap'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[jpirko-mlxsw:jiri_devel_linecards 28/43] drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:1023:23: error: initialization of 'void (*)(struct mlxsw_core *, u8, void *, void *)' {aka 'void (*)(struct mlxsw_core *, unsigned char, void *, void *)'} from incompatible pointer type 'void (*)(struct...
by kernel test robot
tree: https://github.com/jpirko/linux_mlxsw jiri_devel_linecards
head: 5cb021512c3be7e03591497caeab474ecccfcd21
commit: 37b9b28d9ef1e71cb5a449450fbc2ca9e9d6d667 [28/43] mlxsw: core_thermal: Add interfaces for line card initialization and de-initialization
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220216/202202162311.zXdLiZmj-lk...)
compiler: powerpc-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/jpirko/linux_mlxsw/commit/37b9b28d9ef1e71cb5a449450fbc...
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw jiri_devel_linecards
git checkout 37b9b28d9ef1e71cb5a449450fbc2ca9e9d6d667
# 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=powerpc SHELL=/bin/bash drivers/net/ethernet/mellanox/mlxsw/
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/net/ethernet/mellanox/mlxsw/core_thermal.c:1023:23: error: initialization of 'void (*)(struct mlxsw_core *, u8, void *, void *)' {aka 'void (*)(struct mlxsw_core *, unsigned char, void *, void *)'} from incompatible pointer type 'void (*)(struct mlxsw_core *, u8, const struct mlxsw_linecard *, void *)' {aka 'void (*)(struct mlxsw_core *, unsigned char, const struct mlxsw_linecard *, void *)'} [-Werror=incompatible-pointer-types]
1023 | .got_active = mlxsw_thermal_got_active,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:1023:23: note: (near initialization for 'mlxsw_thermal_event_ops.got_active')
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:1024:25: error: initialization of 'void (*)(struct mlxsw_core *, u8, void *, void *)' {aka 'void (*)(struct mlxsw_core *, unsigned char, void *, void *)'} from incompatible pointer type 'void (*)(struct mlxsw_core *, u8, const struct mlxsw_linecard *, void *)' {aka 'void (*)(struct mlxsw_core *, unsigned char, const struct mlxsw_linecard *, void *)'} [-Werror=incompatible-pointer-types]
1024 | .got_inactive = mlxsw_thermal_got_inactive,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:1024:25: note: (near initialization for 'mlxsw_thermal_event_ops.got_inactive')
cc1: some warnings being treated as errors
vim +1023 drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
1021
1022 static struct mlxsw_linecards_event_ops mlxsw_thermal_event_ops = {
> 1023 .got_active = mlxsw_thermal_got_active,
1024 .got_inactive = mlxsw_thermal_got_inactive,
1025 };
1026
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[ogabbay:numa_debug_5.17 4/4] mm/memory.c:3319:7: error: too many arguments to function 'reuse_swap_page'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git numa_debug_5.17
head: fe86c77005a1cce384156fe165c7a6df42c6bc92
commit: fe86c77005a1cce384156fe165c7a6df42c6bc92 [4/4] Revert "mm: do_wp_page() simplification"
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220216/202202162225.nfqEMkRv-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/...
git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
git fetch --no-tags ogabbay numa_debug_5.17
git checkout fe86c77005a1cce384156fe165c7a6df42c6bc92
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=i386 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 >>):
mm/memory.c: In function 'do_wp_page':
>> mm/memory.c:3319:7: error: too many arguments to function 'reuse_swap_page'
3319 | if (reuse_swap_page(vmf->page, &total_map_swapcount)) {
| ^~~~~~~~~~~~~~~
In file included from include/linux/mm_inline.h:7,
from mm/memory.c:44:
include/linux/swap.h:517:13: note: declared here
517 | extern bool reuse_swap_page(struct page *);
| ^~~~~~~~~~~~~~~
vim +/reuse_swap_page +3319 mm/memory.c
3232
3233 /*
3234 * This routine handles present pages, when users try to write
3235 * to a shared page. It is done by copying the page to a new address
3236 * and decrementing the shared-page counter for the old page.
3237 *
3238 * Note that this routine assumes that the protection checks have been
3239 * done by the caller (the low-level page fault routine in most cases).
3240 * Thus we can safely just mark it writable once we've done any necessary
3241 * COW.
3242 *
3243 * We also mark the page dirty at this point even though the page will
3244 * change only once the write actually happens. This avoids a few races,
3245 * and potentially makes it more efficient.
3246 *
3247 * We enter with non-exclusive mmap_lock (to exclude vma changes,
3248 * but allow concurrent faults), with pte both mapped and locked.
3249 * We return with mmap_lock still held, but pte unmapped and unlocked.
3250 */
3251 static vm_fault_t do_wp_page(struct vm_fault *vmf)
3252 __releases(vmf->ptl)
3253 {
3254 struct vm_area_struct *vma = vmf->vma;
3255
3256 if (userfaultfd_pte_wp(vma, *vmf->pte)) {
3257 pte_unmap_unlock(vmf->pte, vmf->ptl);
3258 return handle_userfault(vmf, VM_UFFD_WP);
3259 }
3260
3261 /*
3262 * Userfaultfd write-protect can defer flushes. Ensure the TLB
3263 * is flushed in this case before copying.
3264 */
3265 if (unlikely(userfaultfd_wp(vmf->vma) &&
3266 mm_tlb_flush_pending(vmf->vma->vm_mm)))
3267 flush_tlb_page(vmf->vma, vmf->address);
3268
3269 vmf->page = vm_normal_page(vma, vmf->address, vmf->orig_pte);
3270 if (!vmf->page) {
3271 /*
3272 * VM_MIXEDMAP !pfn_valid() case, or VM_SOFTDIRTY clear on a
3273 * VM_PFNMAP VMA.
3274 *
3275 * We should not cow pages in a shared writeable mapping.
3276 * Just mark the pages writable and/or call ops->pfn_mkwrite.
3277 */
3278 if ((vma->vm_flags & (VM_WRITE|VM_SHARED)) ==
3279 (VM_WRITE|VM_SHARED))
3280 return wp_pfn_shared(vmf);
3281
3282 pte_unmap_unlock(vmf->pte, vmf->ptl);
3283 return wp_page_copy(vmf);
3284 }
3285
3286 /*
3287 * Take out anonymous pages first, anonymous shared vmas are
3288 * not dirty accountable.
3289 */
3290 if (PageAnon(vmf->page)) {
3291 int total_map_swapcount;
3292 if (PageKsm(vmf->page) && (PageSwapCache(vmf->page) ||
3293 page_count(vmf->page) != 1))
3294 goto copy;
3295 if (!trylock_page(vmf->page)) {
3296 get_page(vmf->page);
3297 pte_unmap_unlock(vmf->pte, vmf->ptl);
3298 lock_page(vmf->page);
3299 vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd,
3300 vmf->address, &vmf->ptl);
3301 if (!pte_same(*vmf->pte, vmf->orig_pte)) {
3302 update_mmu_tlb(vma, vmf->address, vmf->pte);
3303 unlock_page(vmf->page);
3304 pte_unmap_unlock(vmf->pte, vmf->ptl);
3305 put_page(vmf->page);
3306 return 0;
3307 }
3308 put_page(vmf->page);
3309 }
3310 if (PageKsm(vmf->page)) {
3311 bool reused = reuse_ksm_page(vmf->page, vmf->vma,
3312 vmf->address);
3313 unlock_page(vmf->page);
3314 if (!reused)
3315 goto copy;
3316 wp_page_reuse(vmf);
3317 return VM_FAULT_WRITE;
3318 }
> 3319 if (reuse_swap_page(vmf->page, &total_map_swapcount)) {
3320 if (total_map_swapcount == 1) {
3321 /*
3322 * The page is all ours. Move it to
3323 * our anon_vma so the rmap code will
3324 * not search our parent or siblings.
3325 * Protected against the rmap code by
3326 * the page lock.
3327 */
3328 page_move_anon_rmap(vmf->page, vma);
3329 }
3330 unlock_page(vmf->page);
3331 wp_page_reuse(vmf);
3332 return VM_FAULT_WRITE;
3333 }
3334 unlock_page(vmf->page);
3335 } else if (unlikely((vma->vm_flags & (VM_WRITE|VM_SHARED)) ==
3336 (VM_WRITE|VM_SHARED))) {
3337 return wp_page_shared(vmf);
3338 }
3339 copy:
3340 /*
3341 * Ok, we need to copy. Oh, well..
3342 */
3343 get_page(vmf->page);
3344
3345 pte_unmap_unlock(vmf->pte, vmf->ptl);
3346 return wp_page_copy(vmf);
3347 }
3348
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
Re: [RFC PATCH V1 2/5] mm/damon: Add 'damon_region' NUMA fault simulation support
by kernel test robot
Hi Xin,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.17-rc4 next-20220216]
[cannot apply to hnaz-mm/master rostedt-trace/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Xin-Hao/mm-damon-Add-NUMA-access...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c5d9ae265b105d9a67575fb67bd4650a6fc08e25
config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220216/202202162241.DMvnC744-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/a771208a72268cd66099adbc319a42f9d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xin-Hao/mm-damon-Add-NUMA-access-statistics-function-support/20220216-163243
git checkout a771208a72268cd66099adbc319a42f9d511219e
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 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 >>):
mm/damon/paddr.c: In function '__damon_pa_mk_set':
>> mm/damon/paddr.c:36:6: error: implicit declaration of function 'flush_tlb_page'; did you mean 'flush_anon_page'? [-Werror=implicit-function-declaration]
36 | flush_tlb_page(vma, addr);
| ^~~~~~~~~~~~~~
| flush_anon_page
>> mm/damon/paddr.c:45:6: error: implicit declaration of function 'flush_tlb_range'; did you mean 'flush_pmd_tlb_range'? [-Werror=implicit-function-declaration]
45 | flush_tlb_range(vma, haddr, haddr + HPAGE_PMD_SIZE);
| ^~~~~~~~~~~~~~~
| flush_pmd_tlb_range
cc1: some warnings being treated as errors
vim +36 mm/damon/paddr.c
18
19 static bool __damon_pa_mk_set(struct page *page, struct vm_area_struct *vma,
20 unsigned long addr, void *arg)
21 {
22 bool result = false;
23 struct page_vma_mapped_walk pvmw = {
24 .page = page,
25 .vma = vma,
26 .address = addr,
27 };
28
29 while (page_vma_mapped_walk(&pvmw)) {
30 addr = pvmw.address;
31 if (pvmw.pte) {
32 damon_ptep_mkold(pvmw.pte, vma->vm_mm, addr);
33 if (nr_online_nodes > 1) {
34 result = damon_ptep_mknone(pvmw.pte, vma, addr);
35 if (result)
> 36 flush_tlb_page(vma, addr);
37 }
38 } else {
39 damon_pmdp_mkold(pvmw.pmd, vma->vm_mm, addr);
40 if (nr_online_nodes > 1) {
41 result = damon_pmdp_mknone(pvmw.pmd, vma, addr);
42 if (result) {
43 unsigned long haddr = addr & HPAGE_PMD_MASK;
44
> 45 flush_tlb_range(vma, haddr, haddr + HPAGE_PMD_SIZE);
46 }
47 }
48 }
49 }
50 return true;
51 }
52
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[jpirko-mlxsw:jiri_devel_linecards 27/43] drivers/net/ethernet/mellanox/mlxsw/core_env.c:1249:23: error: initialization of 'void (*)(struct mlxsw_core *, u8, void *, void *)' {aka 'void (*)(struct mlxsw_core *, unsigned char, void *, void *)'} from incompatible pointer type 'void (*)(struct mlx...
by kernel test robot
tree: https://github.com/jpirko/linux_mlxsw jiri_devel_linecards
head: 5cb021512c3be7e03591497caeab474ecccfcd21
commit: 08ac493598146680137ed7a81dc108b837018125 [27/43] mlxsw: core: Add interfaces for line card initialization and de-initialization
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220216/202202162243.YGWLhWv3-lk...)
compiler: powerpc-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/jpirko/linux_mlxsw/commit/08ac493598146680137ed7a81dc1...
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw jiri_devel_linecards
git checkout 08ac493598146680137ed7a81dc108b837018125
# 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=powerpc SHELL=/bin/bash drivers/net/ethernet/mellanox/mlxsw/
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/net/ethernet/mellanox/mlxsw/core_env.c:1249:23: error: initialization of 'void (*)(struct mlxsw_core *, u8, void *, void *)' {aka 'void (*)(struct mlxsw_core *, unsigned char, void *, void *)'} from incompatible pointer type 'void (*)(struct mlxsw_core *, u8, const struct mlxsw_linecard *, void *)' {aka 'void (*)(struct mlxsw_core *, unsigned char, const struct mlxsw_linecard *, void *)'} [-Werror=incompatible-pointer-types]
1249 | .got_active = mlxsw_env_got_active,
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/core_env.c:1249:23: note: (near initialization for 'mlxsw_env_event_ops.got_active')
drivers/net/ethernet/mellanox/mlxsw/core_env.c:1250:25: error: initialization of 'void (*)(struct mlxsw_core *, u8, void *, void *)' {aka 'void (*)(struct mlxsw_core *, unsigned char, void *, void *)'} from incompatible pointer type 'void (*)(struct mlxsw_core *, u8, const struct mlxsw_linecard *, void *)' {aka 'void (*)(struct mlxsw_core *, unsigned char, const struct mlxsw_linecard *, void *)'} [-Werror=incompatible-pointer-types]
1250 | .got_inactive = mlxsw_env_got_inactive,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/core_env.c:1250:25: note: (near initialization for 'mlxsw_env_event_ops.got_inactive')
cc1: some warnings being treated as errors
vim +1249 drivers/net/ethernet/mellanox/mlxsw/core_env.c
1247
1248 static struct mlxsw_linecards_event_ops mlxsw_env_event_ops = {
> 1249 .got_active = mlxsw_env_got_active,
1250 .got_inactive = mlxsw_env_got_inactive,
1251 };
1252
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[jpirko-mlxsw:jiri_devel_linecards 19/43] drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:129:79: error: passing argument 3 of 'devlink_linecard_device_create' from incompatible pointer type
by kernel test robot
tree: https://github.com/jpirko/linux_mlxsw jiri_devel_linecards
head: 5cb021512c3be7e03591497caeab474ecccfcd21
commit: ddbc2cda5873d87ed1bf101a45620504bfc99a5a [19/43] devlink: allow driver to pass flash component name for line card device
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220216/202202162255.qkZEHFMQ-lk...)
compiler: powerpc-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/jpirko/linux_mlxsw/commit/ddbc2cda5873d87ed1bf101a4562...
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw jiri_devel_linecards
git checkout ddbc2cda5873d87ed1bf101a45620504bfc99a5a
# 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=powerpc SHELL=/bin/bash drivers/net/ethernet/mellanox/mlxsw/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the jpirko-mlxsw/jiri_devel_linecards HEAD 5cb021512c3be7e03591497caeab474ecccfcd21 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c: In function 'mlxsw_linecard_device_attach':
>> drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:129:79: error: passing argument 3 of 'devlink_linecard_device_create' from incompatible pointer type [-Werror=incompatible-pointer-types]
129 | device_index, device);
| ^~~~~~
| |
| struct mlxsw_linecard_device *
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:15,
from drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:15:
include/net/devlink.h:1579:44: note: expected 'const char *' but argument is of type 'struct mlxsw_linecard_device *'
1579 | const char *flash_component, void *priv);
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:128:34: error: too few arguments to function 'devlink_linecard_device_create'
128 | device->devlink_device = devlink_linecard_device_create(linecard->devlink_linecard,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:15,
from drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:15:
include/net/devlink.h:1577:1: note: declared here
1577 | devlink_linecard_device_create(struct devlink_linecard *linecard,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/devlink_linecard_device_create +129 drivers/net/ethernet/mellanox/mlxsw/core_linecards.c
c075259346e402e Jiri Pirko 2022-02-04 14
c075259346e402e Jiri Pirko 2022-02-04 @15 #include "core.h"
c075259346e402e Jiri Pirko 2022-02-04 16
c075259346e402e Jiri Pirko 2022-02-04 17 struct mlxsw_linecard_ini_file {
c075259346e402e Jiri Pirko 2022-02-04 18 __le16 size;
c075259346e402e Jiri Pirko 2022-02-04 19 union {
c075259346e402e Jiri Pirko 2022-02-04 20 u8 data[0];
c075259346e402e Jiri Pirko 2022-02-04 21 struct {
c075259346e402e Jiri Pirko 2022-02-04 22 __be16 hw_revision;
c075259346e402e Jiri Pirko 2022-02-04 23 __be16 ini_version;
c075259346e402e Jiri Pirko 2022-02-04 24 u8 __dontcare[3];
c075259346e402e Jiri Pirko 2022-02-04 25 u8 type;
c075259346e402e Jiri Pirko 2022-02-04 26 u8 name[20];
c075259346e402e Jiri Pirko 2022-02-04 27 } format;
c075259346e402e Jiri Pirko 2022-02-04 28 };
c075259346e402e Jiri Pirko 2022-02-04 29 };
c075259346e402e Jiri Pirko 2022-02-04 30
c075259346e402e Jiri Pirko 2022-02-04 31 struct mlxsw_linecard_types_info {
c075259346e402e Jiri Pirko 2022-02-04 32 struct mlxsw_linecard_ini_file **ini_files;
c075259346e402e Jiri Pirko 2022-02-04 33 unsigned int count;
c075259346e402e Jiri Pirko 2022-02-04 34 size_t data_size;
c075259346e402e Jiri Pirko 2022-02-04 35 char *data;
c075259346e402e Jiri Pirko 2022-02-04 36 };
c075259346e402e Jiri Pirko 2022-02-04 37
c075259346e402e Jiri Pirko 2022-02-04 38 #define MLXSW_LINECARD_STATUS_EVENT_TO (10 * MSEC_PER_SEC)
c075259346e402e Jiri Pirko 2022-02-04 39
c075259346e402e Jiri Pirko 2022-02-04 40 static void
c075259346e402e Jiri Pirko 2022-02-04 41 mlxsw_linecard_status_event_to_schedule(struct mlxsw_linecard *linecard,
c075259346e402e Jiri Pirko 2022-02-04 42 enum mlxsw_linecard_status_event_type status_event_type)
c075259346e402e Jiri Pirko 2022-02-04 43 {
c075259346e402e Jiri Pirko 2022-02-04 44 cancel_delayed_work_sync(&linecard->status_event_to_dw);
c075259346e402e Jiri Pirko 2022-02-04 45 linecard->status_event_type_to = status_event_type;
c075259346e402e Jiri Pirko 2022-02-04 46 mlxsw_core_schedule_dw(&linecard->status_event_to_dw,
c075259346e402e Jiri Pirko 2022-02-04 47 msecs_to_jiffies(MLXSW_LINECARD_STATUS_EVENT_TO));
c075259346e402e Jiri Pirko 2022-02-04 48 }
c075259346e402e Jiri Pirko 2022-02-04 49
c075259346e402e Jiri Pirko 2022-02-04 50 static void
c075259346e402e Jiri Pirko 2022-02-04 51 mlxsw_linecard_status_event_done(struct mlxsw_linecard *linecard,
c075259346e402e Jiri Pirko 2022-02-04 52 enum mlxsw_linecard_status_event_type status_event_type)
c075259346e402e Jiri Pirko 2022-02-04 53 {
c075259346e402e Jiri Pirko 2022-02-04 54 if (linecard->status_event_type_to == status_event_type)
c075259346e402e Jiri Pirko 2022-02-04 55 cancel_delayed_work_sync(&linecard->status_event_to_dw);
c075259346e402e Jiri Pirko 2022-02-04 56 }
c075259346e402e Jiri Pirko 2022-02-04 57
c075259346e402e Jiri Pirko 2022-02-04 58 static const char *
c075259346e402e Jiri Pirko 2022-02-04 59 mlxsw_linecard_types_lookup(struct mlxsw_linecards *linecards, u8 card_type)
c075259346e402e Jiri Pirko 2022-02-04 60 {
c075259346e402e Jiri Pirko 2022-02-04 61 struct mlxsw_linecard_types_info *types_info;
c075259346e402e Jiri Pirko 2022-02-04 62 struct mlxsw_linecard_ini_file *ini_file;
c075259346e402e Jiri Pirko 2022-02-04 63 int i;
c075259346e402e Jiri Pirko 2022-02-04 64
c075259346e402e Jiri Pirko 2022-02-04 65 types_info = linecards->types_info;
c075259346e402e Jiri Pirko 2022-02-04 66 if (!types_info)
c075259346e402e Jiri Pirko 2022-02-04 67 return NULL;
c075259346e402e Jiri Pirko 2022-02-04 68 for (i = 0; i < types_info->count; i++) {
c075259346e402e Jiri Pirko 2022-02-04 69 ini_file = linecards->types_info->ini_files[i];
c075259346e402e Jiri Pirko 2022-02-04 70 if (ini_file->format.type == card_type)
c075259346e402e Jiri Pirko 2022-02-04 71 return ini_file->format.name;
c075259346e402e Jiri Pirko 2022-02-04 72 }
c075259346e402e Jiri Pirko 2022-02-04 73 return NULL;
c075259346e402e Jiri Pirko 2022-02-04 74 }
c075259346e402e Jiri Pirko 2022-02-04 75
c075259346e402e Jiri Pirko 2022-02-04 76 static const char *mlxsw_linecard_type_name(struct mlxsw_linecard *linecard)
c075259346e402e Jiri Pirko 2022-02-04 77 {
c075259346e402e Jiri Pirko 2022-02-04 78 struct mlxsw_core *mlxsw_core = linecard->linecards->mlxsw_core;
c075259346e402e Jiri Pirko 2022-02-04 79 char mddq_pl[MLXSW_REG_MDDQ_LEN];
c075259346e402e Jiri Pirko 2022-02-04 80 int err;
c075259346e402e Jiri Pirko 2022-02-04 81
c075259346e402e Jiri Pirko 2022-02-04 82 mlxsw_reg_mddq_slot_name_pack(mddq_pl, linecard->slot_index);
c075259346e402e Jiri Pirko 2022-02-04 83 err = mlxsw_reg_query(mlxsw_core, MLXSW_REG(mddq), mddq_pl);
c075259346e402e Jiri Pirko 2022-02-04 84 if (err)
c075259346e402e Jiri Pirko 2022-02-04 85 return ERR_PTR(err);
c075259346e402e Jiri Pirko 2022-02-04 86 mlxsw_reg_mddq_slot_name_unpack(mddq_pl, linecard->name);
c075259346e402e Jiri Pirko 2022-02-04 87 return linecard->name;
c075259346e402e Jiri Pirko 2022-02-04 88 }
c075259346e402e Jiri Pirko 2022-02-04 89
8978a4235a849b8 Jiri Pirko 2021-06-10 90 struct mlxsw_linecard_device_info {
8978a4235a849b8 Jiri Pirko 2021-06-10 91 u16 fw_major;
8978a4235a849b8 Jiri Pirko 2021-06-10 92 u16 fw_minor;
8978a4235a849b8 Jiri Pirko 2021-06-10 93 u16 fw_sub_minor;
8978a4235a849b8 Jiri Pirko 2021-06-10 94 };
8978a4235a849b8 Jiri Pirko 2021-06-10 95
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 96 struct mlxsw_linecard_device {
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 97 struct list_head list;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 98 u8 index;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 99 struct mlxsw_linecard *linecard;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 100 struct devlink_linecard_device *devlink_device;
8978a4235a849b8 Jiri Pirko 2021-06-10 101 struct mlxsw_linecard_device_info info;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 102 };
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 103
8978a4235a849b8 Jiri Pirko 2021-06-10 104 static struct mlxsw_linecard_device *
8978a4235a849b8 Jiri Pirko 2021-06-10 105 mlxsw_linecard_device_lookup(struct mlxsw_linecard *linecard, u8 index)
8978a4235a849b8 Jiri Pirko 2021-06-10 106 {
8978a4235a849b8 Jiri Pirko 2021-06-10 107 struct mlxsw_linecard_device *device;
8978a4235a849b8 Jiri Pirko 2021-06-10 108
8978a4235a849b8 Jiri Pirko 2021-06-10 109 list_for_each_entry(device, &linecard->device_list, list)
8978a4235a849b8 Jiri Pirko 2021-06-10 110 if (device->index == index)
8978a4235a849b8 Jiri Pirko 2021-06-10 111 return device;
8978a4235a849b8 Jiri Pirko 2021-06-10 112 return NULL;
8978a4235a849b8 Jiri Pirko 2021-06-10 113 }
8978a4235a849b8 Jiri Pirko 2021-06-10 114
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 115 static int mlxsw_linecard_device_attach(struct mlxsw_core *mlxsw_core,
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 116 struct mlxsw_linecard *linecard,
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 117 u8 device_index, bool flash_owner)
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 118 {
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 119 struct mlxsw_linecard_device *device;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 120 int err;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 121
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 122 device = kzalloc(sizeof(*device), GFP_KERNEL);
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 123 if (!device)
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 124 return -ENOMEM;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 125 device->index = device_index;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 126 device->linecard = linecard;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 127
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 @128 device->devlink_device = devlink_linecard_device_create(linecard->devlink_linecard,
8978a4235a849b8 Jiri Pirko 2021-06-10 @129 device_index, device);
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 130 if (IS_ERR(device->devlink_device)) {
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 131 err = PTR_ERR(device->devlink_device);
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 132 goto err_devlink_linecard_device_attach;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 133 }
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 134
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 135 list_add_tail(&device->list, &linecard->device_list);
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 136 return 0;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 137
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 138 err_devlink_linecard_device_attach:
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 139 kfree(device);
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 140 return err;
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 141 }
d6c4ce1acc9e393 Jiri Pirko 2021-02-26 142
:::::: The code at line 129 was first introduced by commit
:::::: 8978a4235a849b8e4afae8b58287fe199459128d mlxsw: core_linecards: Expose device FW version over device info
:::::: TO: Jiri Pirko <jiri(a)nvidia.com>
:::::: CC: Jiri Pirko <jiri(a)nvidia.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[ls-zhu:shared_irq_v4 3/3] drivers/vdpa/ifcvf/ifcvf_main.c:94:6: warning: variable 'max_intr' set but not used
by kernel test robot
tree: https://github.com/ls-zhu/linux shared_irq_v4
head: 25e932e005734a4b8924e41bbedafa9dd394aead
commit: 25e932e005734a4b8924e41bbedafa9dd394aead [3/3] vDPA/ifcvf: implement device MSIX vector allocator
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220216/202202162136.H3NDPxQe-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0e628a783b935c70c80815db6c061ec84f884af5)
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/ls-zhu/linux/commit/25e932e005734a4b8924e41bbedafa9dd3...
git remote add ls-zhu https://github.com/ls-zhu/linux
git fetch --no-tags ls-zhu shared_irq_v4
git checkout 25e932e005734a4b8924e41bbedafa9dd394aead
# 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=i386 SHELL=/bin/bash drivers/vdpa/ifcvf/
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/vdpa/ifcvf/ifcvf_main.c:94:6: warning: variable 'max_intr' set but not used [-Wunused-but-set-variable]
u16 max_intr;
^
1 warning generated.
vim +/max_intr +94 drivers/vdpa/ifcvf/ifcvf_main.c
88
89 static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
90 {
91 struct pci_dev *pdev = adapter->pdev;
92 struct ifcvf_hw *vf = &adapter->vf;
93 int vector, nvectors, i, ret, irq;
> 94 u16 max_intr;
95
96 nvectors = ifcvf_alloc_vectors(adapter);
97 if (nvectors <=0)
98 return nvectors;
99
100 max_intr = vf->nr_vring + 1;
101 snprintf(vf->config_msix_name, 256, "ifcvf[%s]-config\n",
102 pci_name(pdev));
103 vector = 0;
104 vf->config_irq = pci_irq_vector(pdev, vector);
105 ret = devm_request_irq(&pdev->dev, vf->config_irq,
106 ifcvf_config_changed, 0,
107 vf->config_msix_name, vf);
108 if (ret) {
109 IFCVF_ERR(pdev, "Failed to request config irq\n");
110 return ret;
111 }
112
113 for (i = 0; i < vf->nr_vring; i++) {
114 snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n",
115 pci_name(pdev), i);
116 vector = i + IFCVF_MSI_QUEUE_OFF;
117 irq = pci_irq_vector(pdev, vector);
118 ret = devm_request_irq(&pdev->dev, irq,
119 ifcvf_intr_handler, 0,
120 vf->vring[i].msix_name,
121 &vf->vring[i]);
122 if (ret) {
123 IFCVF_ERR(pdev,
124 "Failed to request irq for vq %d\n", i);
125 ifcvf_free_irq(adapter, i);
126
127 return ret;
128 }
129
130 vf->vring[i].irq = irq;
131 }
132
133 return 0;
134 }
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[ls-zhu:shared_irq_v4 3/3] drivers/vdpa/ifcvf/ifcvf_main.c:94:13: warning: variable 'max_intr' set but not used
by kernel test robot
tree: https://github.com/ls-zhu/linux shared_irq_v4
head: 25e932e005734a4b8924e41bbedafa9dd394aead
commit: 25e932e005734a4b8924e41bbedafa9dd394aead [3/3] vDPA/ifcvf: implement device MSIX vector allocator
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220216/202202162105.kmic72fi-lk...)
compiler: powerpc-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/ls-zhu/linux/commit/25e932e005734a4b8924e41bbedafa9dd3...
git remote add ls-zhu https://github.com/ls-zhu/linux
git fetch --no-tags ls-zhu shared_irq_v4
git checkout 25e932e005734a4b8924e41bbedafa9dd394aead
# 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=powerpc SHELL=/bin/bash drivers/vdpa/ifcvf/
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/vdpa/ifcvf/ifcvf_main.c: In function 'ifcvf_request_irq':
>> drivers/vdpa/ifcvf/ifcvf_main.c:94:13: warning: variable 'max_intr' set but not used [-Wunused-but-set-variable]
94 | u16 max_intr;
| ^~~~~~~~
vim +/max_intr +94 drivers/vdpa/ifcvf/ifcvf_main.c
88
89 static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
90 {
91 struct pci_dev *pdev = adapter->pdev;
92 struct ifcvf_hw *vf = &adapter->vf;
93 int vector, nvectors, i, ret, irq;
> 94 u16 max_intr;
95
96 nvectors = ifcvf_alloc_vectors(adapter);
97 if (nvectors <=0)
98 return nvectors;
99
100 max_intr = vf->nr_vring + 1;
101 snprintf(vf->config_msix_name, 256, "ifcvf[%s]-config\n",
102 pci_name(pdev));
103 vector = 0;
104 vf->config_irq = pci_irq_vector(pdev, vector);
105 ret = devm_request_irq(&pdev->dev, vf->config_irq,
106 ifcvf_config_changed, 0,
107 vf->config_msix_name, vf);
108 if (ret) {
109 IFCVF_ERR(pdev, "Failed to request config irq\n");
110 return ret;
111 }
112
113 for (i = 0; i < vf->nr_vring; i++) {
114 snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n",
115 pci_name(pdev), i);
116 vector = i + IFCVF_MSI_QUEUE_OFF;
117 irq = pci_irq_vector(pdev, vector);
118 ret = devm_request_irq(&pdev->dev, irq,
119 ifcvf_intr_handler, 0,
120 vf->vring[i].msix_name,
121 &vf->vring[i]);
122 if (ret) {
123 IFCVF_ERR(pdev,
124 "Failed to request irq for vq %d\n", i);
125 ifcvf_free_irq(adapter, i);
126
127 return ret;
128 }
129
130 vf->vring[i].irq = irq;
131 }
132
133 return 0;
134 }
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months