[vgupta-arc:topic-zol-remove 79/188] mm/memory.c:3717:21: error: no previous prototype for function 'do_anonymous_page'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git topic-zol-remove
head: 5d273f5d5109b942d3be84a4db0ffe05feb901d4
commit: 94f784d9992cf0c171122f44767c549fa4f353cb [79/188] xxx: disable address space randomization, fault around
config: riscv-buildonly-randconfig-r005-20211016 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
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/vgupta/arc.git/commit/?id...
git remote add vgupta-arc https://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git
git fetch --no-tags vgupta-arc topic-zol-remove
git checkout 94f784d9992cf0c171122f44767c549fa4f353cb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
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:3717:21: error: no previous prototype for function 'do_anonymous_page' [-Werror,-Wmissing-prototypes]
noinline vm_fault_t do_anonymous_page(struct vm_fault *vmf)
^
mm/memory.c:3717:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t do_anonymous_page(struct vm_fault *vmf)
^
static
>> mm/memory.c:3833:21: error: no previous prototype for function '__do_fault' [-Werror,-Wmissing-prototypes]
noinline vm_fault_t __do_fault(struct vm_fault *vmf)
^
mm/memory.c:3833:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t __do_fault(struct vm_fault *vmf)
^
static
>> mm/memory.c:4157:21: error: no previous prototype for function 'do_read_fault' [-Werror,-Wmissing-prototypes]
noinline vm_fault_t do_read_fault(struct vm_fault *vmf)
^
mm/memory.c:4157:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t do_read_fault(struct vm_fault *vmf)
^
static
>> mm/memory.c:4186:21: error: no previous prototype for function 'do_cow_fault' [-Werror,-Wmissing-prototypes]
noinline vm_fault_t do_cow_fault(struct vm_fault *vmf)
^
mm/memory.c:4186:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t do_cow_fault(struct vm_fault *vmf)
^
static
>> mm/memory.c:4224:21: error: no previous prototype for function 'do_shared_fault' [-Werror,-Wmissing-prototypes]
noinline vm_fault_t do_shared_fault(struct vm_fault *vmf)
^
mm/memory.c:4224:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t do_shared_fault(struct vm_fault *vmf)
^
static
>> mm/memory.c:4267:21: error: no previous prototype for function 'do_fault' [-Werror,-Wmissing-prototypes]
noinline vm_fault_t do_fault(struct vm_fault *vmf)
^
mm/memory.c:4267:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t do_fault(struct vm_fault *vmf)
^
static
>> mm/memory.c:4506:21: error: no previous prototype for function 'handle_pte_fault' [-Werror,-Wmissing-prototypes]
noinline vm_fault_t handle_pte_fault(struct vm_fault *vmf)
^
mm/memory.c:4506:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t handle_pte_fault(struct vm_fault *vmf)
^
static
>> mm/memory.c:4610:21: error: no previous prototype for function '__handle_mm_fault' [-Werror,-Wmissing-prototypes]
noinline vm_fault_t __handle_mm_fault(struct vm_area_struct *vma,
^
mm/memory.c:4610:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline vm_fault_t __handle_mm_fault(struct vm_area_struct *vma,
^
static
8 errors generated.
vim +/do_anonymous_page +3717 mm/memory.c
3711
3712 /*
3713 * We enter with non-exclusive mmap_lock (to exclude vma changes,
3714 * but allow concurrent faults), and pte mapped but not yet locked.
3715 * We return with mmap_lock still held, but pte unmapped and unlocked.
3716 */
> 3717 noinline vm_fault_t do_anonymous_page(struct vm_fault *vmf)
3718 {
3719 struct vm_area_struct *vma = vmf->vma;
3720 struct page *page;
3721 vm_fault_t ret = 0;
3722 pte_t entry;
3723
3724 /* File mapping without ->vm_ops ? */
3725 if (vma->vm_flags & VM_SHARED)
3726 return VM_FAULT_SIGBUS;
3727
3728 /*
3729 * Use pte_alloc() instead of pte_alloc_map(). We can't run
3730 * pte_offset_map() on pmds where a huge pmd might be created
3731 * from a different thread.
3732 *
3733 * pte_alloc_map() is safe to use under mmap_write_lock(mm) or when
3734 * parallel threads are excluded by other means.
3735 *
3736 * Here we only have mmap_read_lock(mm).
3737 */
3738 if (pte_alloc(vma->vm_mm, vmf->pmd))
3739 return VM_FAULT_OOM;
3740
3741 /* See comment in handle_pte_fault() */
3742 if (unlikely(pmd_trans_unstable(vmf->pmd)))
3743 return 0;
3744
3745 /* Use the zero-page for reads */
3746 if (!(vmf->flags & FAULT_FLAG_WRITE) &&
3747 !mm_forbids_zeropage(vma->vm_mm)) {
3748 entry = pte_mkspecial(pfn_pte(my_zero_pfn(vmf->address),
3749 vma->vm_page_prot));
3750 vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd,
3751 vmf->address, &vmf->ptl);
3752 if (!pte_none(*vmf->pte)) {
3753 update_mmu_tlb(vma, vmf->address, vmf->pte);
3754 goto unlock;
3755 }
3756 ret = check_stable_address_space(vma->vm_mm);
3757 if (ret)
3758 goto unlock;
3759 /* Deliver the page fault to userland, check inside PT lock */
3760 if (userfaultfd_missing(vma)) {
3761 pte_unmap_unlock(vmf->pte, vmf->ptl);
3762 return handle_userfault(vmf, VM_UFFD_MISSING);
3763 }
3764 goto setpte;
3765 }
3766
3767 /* Allocate our own private page. */
3768 if (unlikely(anon_vma_prepare(vma)))
3769 goto oom;
3770 page = alloc_zeroed_user_highpage_movable(vma, vmf->address);
3771 if (!page)
3772 goto oom;
3773
3774 if (mem_cgroup_charge(page, vma->vm_mm, GFP_KERNEL))
3775 goto oom_free_page;
3776 cgroup_throttle_swaprate(page, GFP_KERNEL);
3777
3778 /*
3779 * The memory barrier inside __SetPageUptodate makes sure that
3780 * preceding stores to the page contents become visible before
3781 * the set_pte_at() write.
3782 */
3783 __SetPageUptodate(page);
3784
3785 entry = mk_pte(page, vma->vm_page_prot);
3786 entry = pte_sw_mkyoung(entry);
3787 if (vma->vm_flags & VM_WRITE)
3788 entry = pte_mkwrite(pte_mkdirty(entry));
3789
3790 vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd, vmf->address,
3791 &vmf->ptl);
3792 if (!pte_none(*vmf->pte)) {
3793 update_mmu_cache(vma, vmf->address, vmf->pte);
3794 goto release;
3795 }
3796
3797 ret = check_stable_address_space(vma->vm_mm);
3798 if (ret)
3799 goto release;
3800
3801 /* Deliver the page fault to userland, check inside PT lock */
3802 if (userfaultfd_missing(vma)) {
3803 pte_unmap_unlock(vmf->pte, vmf->ptl);
3804 put_page(page);
3805 return handle_userfault(vmf, VM_UFFD_MISSING);
3806 }
3807
3808 inc_mm_counter_fast(vma->vm_mm, MM_ANONPAGES);
3809 page_add_new_anon_rmap(page, vma, vmf->address, false);
3810 lru_cache_add_inactive_or_unevictable(page, vma);
3811 setpte:
3812 set_pte_at(vma->vm_mm, vmf->address, vmf->pte, entry);
3813
3814 /* No need to invalidate - it was non-present before */
3815 update_mmu_cache(vma, vmf->address, vmf->pte);
3816 unlock:
3817 pte_unmap_unlock(vmf->pte, vmf->ptl);
3818 return ret;
3819 release:
3820 put_page(page);
3821 goto unlock;
3822 oom_free_page:
3823 put_page(page);
3824 oom:
3825 return VM_FAULT_OOM;
3826 }
3827
3828 /*
3829 * The mmap_lock must have been held on entry, and may have been
3830 * released depending on flags and vma->vm_ops->fault() return value.
3831 * See filemap_fault() and __lock_page_retry().
3832 */
> 3833 noinline vm_fault_t __do_fault(struct vm_fault *vmf)
3834 {
3835 struct vm_area_struct *vma = vmf->vma;
3836 vm_fault_t ret;
3837
3838 /*
3839 * Preallocate pte before we take page_lock because this might lead to
3840 * deadlocks for memcg reclaim which waits for pages under writeback:
3841 * lock_page(A)
3842 * SetPageWriteback(A)
3843 * unlock_page(A)
3844 * lock_page(B)
3845 * lock_page(B)
3846 * pte_alloc_one
3847 * shrink_page_list
3848 * wait_on_page_writeback(A)
3849 * SetPageWriteback(B)
3850 * unlock_page(B)
3851 * # flush A, B to clear the writeback
3852 */
3853 if (pmd_none(*vmf->pmd) && !vmf->prealloc_pte) {
3854 vmf->prealloc_pte = pte_alloc_one(vma->vm_mm);
3855 if (!vmf->prealloc_pte)
3856 return VM_FAULT_OOM;
3857 smp_wmb(); /* See comment in __pte_alloc() */
3858 }
3859
3860 ret = vma->vm_ops->fault(vmf);
3861 if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY |
3862 VM_FAULT_DONE_COW)))
3863 return ret;
3864
3865 if (unlikely(PageHWPoison(vmf->page))) {
3866 if (ret & VM_FAULT_LOCKED)
3867 unlock_page(vmf->page);
3868 put_page(vmf->page);
3869 vmf->page = NULL;
3870 return VM_FAULT_HWPOISON;
3871 }
3872
3873 if (unlikely(!(ret & VM_FAULT_LOCKED)))
3874 lock_page(vmf->page);
3875 else
3876 VM_BUG_ON_PAGE(!PageLocked(vmf->page), vmf->page);
3877
3878 return ret;
3879 }
3880
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[shawnguo:imx/drivers 10/12] drivers/soc/imx/imx8m-blk-ctrl.c:401:3: error: use of undeclared identifier 'IMX8MM_VPUBLK_PD_G1'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git imx/drivers
head: 72949f76565c9ea9f4231c977774a31d4713c386
commit: 2684ac05a8c4d2d5c49e6c11eb6206b30a284813 [10/12] soc: imx: add i.MX8M blk-ctrl driver
config: hexagon-randconfig-r045-20211014 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project acb3b187c4c88650a6a717a1bcb234d27d0d7f54)
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/shawnguo/linux.git/commit...
git remote add shawnguo https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
git fetch --no-tags shawnguo imx/drivers
git checkout 2684ac05a8c4d2d5c49e6c11eb6206b30a284813
# save the attached .config 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
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/soc/imx/imx8m-blk-ctrl.c:401:3: error: use of undeclared identifier 'IMX8MM_VPUBLK_PD_G1'
[IMX8MM_VPUBLK_PD_G1] = {
^
>> drivers/soc/imx/imx8m-blk-ctrl.c:409:3: error: use of undeclared identifier 'IMX8MM_VPUBLK_PD_G2'
[IMX8MM_VPUBLK_PD_G2] = {
^
>> drivers/soc/imx/imx8m-blk-ctrl.c:417:3: error: use of undeclared identifier 'IMX8MM_VPUBLK_PD_H1'
[IMX8MM_VPUBLK_PD_H1] = {
^
>> drivers/soc/imx/imx8m-blk-ctrl.c:431:17: error: invalid application of 'sizeof' to an incomplete type 'const struct imx8m_blk_ctrl_domain_data []'
.num_domains = ARRAY_SIZE(imx8mm_vpu_blk_ctl_domain_data),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:44:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
4 errors generated.
vim +/IMX8MM_VPUBLK_PD_G1 +401 drivers/soc/imx/imx8m-blk-ctrl.c
399
400 static const struct imx8m_blk_ctrl_domain_data imx8mm_vpu_blk_ctl_domain_data[] = {
> 401 [IMX8MM_VPUBLK_PD_G1] = {
402 .name = "vpublk-g1",
403 .clk_names = (const char *[]){ "g1", },
404 .num_clks = 1,
405 .gpc_name = "g1",
406 .rst_mask = BIT(1),
407 .clk_mask = BIT(1),
408 },
> 409 [IMX8MM_VPUBLK_PD_G2] = {
410 .name = "vpublk-g2",
411 .clk_names = (const char *[]){ "g2", },
412 .num_clks = 1,
413 .gpc_name = "g2",
414 .rst_mask = BIT(0),
415 .clk_mask = BIT(0),
416 },
> 417 [IMX8MM_VPUBLK_PD_H1] = {
418 .name = "vpublk-h1",
419 .clk_names = (const char *[]){ "h1", },
420 .num_clks = 1,
421 .gpc_name = "h1",
422 .rst_mask = BIT(2),
423 .clk_mask = BIT(2),
424 },
425 };
426
427 static const struct imx8m_blk_ctrl_data imx8mm_vpu_blk_ctl_dev_data = {
428 .max_reg = 0x18,
429 .power_notifier_fn = imx8mm_vpu_power_notifier,
430 .domains = imx8mm_vpu_blk_ctl_domain_data,
> 431 .num_domains = ARRAY_SIZE(imx8mm_vpu_blk_ctl_domain_data),
432 };
433
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[jimc:dd-drm-next 15/19] lib/dynamic_debug.c:771:27: error: use of undeclared identifier '_DPRINTK_FLAGS_PRINT_TRACE'
by kernel test robot
tree: https://github.com/jimc/linux.git dd-drm-next
head: 599fc12dacf513227ee5c9815a16a3aaa1300f27
commit: bccba5dbb682b2ea4691ac5bf88c0976bc806165 [15/19] more-emit-cleanups
config: hexagon-randconfig-r041-20211015 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
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/jimc/linux/commit/bccba5dbb682b2ea4691ac5bf88c0976bc80...
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm-next
git checkout bccba5dbb682b2ea4691ac5bf88c0976bc806165
# save the attached .config 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
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 >>):
lib/dynamic_debug.c:441:3: error: expected expression
WARN_ONCE("cannot enable T, CONFIG_TRACE=n\n");
^
include/asm-generic/bug.h:150:29: note: expanded from macro 'WARN_ONCE'
DO_ONCE_LITE_IF(condition, WARN, 1, format)
^
lib/dynamic_debug.c:743:3: error: implicit declaration of function 'trace_array_printk' [-Werror,-Wimplicit-function-declaration]
trace_array_printk(trace_arr, _THIS_IP_, "%s%pV", buf, &vaf);
^
lib/dynamic_debug.c:743:3: note: did you mean 'trace_printk'?
include/linux/kernel.h:467:5: note: 'trace_printk' declared here
int trace_printk(const char *fmt, ...)
^
>> lib/dynamic_debug.c:771:27: error: use of undeclared identifier '_DPRINTK_FLAGS_PRINT_TRACE'
if (descriptor->flags & _DPRINTK_FLAGS_PRINT_TRACE)
^
lib/dynamic_debug.c:772:4: error: implicit declaration of function 'trace_array_printk' [-Werror,-Wimplicit-function-declaration]
trace_array_printk(trace_arr, _THIS_IP_, "%s%pV", buf, &vaf);
^
4 errors generated.
vim +/_DPRINTK_FLAGS_PRINT_TRACE +771 lib/dynamic_debug.c
748
749 void __dynamic_dev_dbg(struct _ddebug *descriptor,
750 const struct device *dev, const char *fmt, ...)
751 {
752 struct va_format vaf;
753 va_list args;
754 char buf[PREFIX_SIZE] = "";
755
756 BUG_ON(!descriptor);
757 BUG_ON(!fmt);
758
759 va_start(args, fmt);
760
761 vaf.fmt = fmt;
762 vaf.va = &args;
763
764 if (descriptor->flags & _DPRINTK_ENABLED)
765 dynamic_emit_prefix(descriptor, buf);
766
767 if (!dev) {
768 if (descriptor->flags & _DPRINTK_FLAGS_PRINT)
769 printk(KERN_DEBUG "(NULL device *): %pV", &vaf);
770
> 771 if (descriptor->flags & _DPRINTK_FLAGS_PRINT_TRACE)
772 trace_array_printk(trace_arr, _THIS_IP_, "%s%pV", buf, &vaf);
773 } else {
774 dev_printk_emit(LOGLEVEL_DEBUG, dev, "%s%s %s: %pV",
775 buf, dev_driver_string(dev), dev_name(dev), &vaf);
776 }
777
778 va_end(args);
779 }
780 EXPORT_SYMBOL(__dynamic_dev_dbg);
781
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[jimc:dd-drm-next 18/19] drivers/gpu/drm/drm_print.c:60:2: error: unterminated conditional directive
by kernel test robot
tree: https://github.com/jimc/linux.git dd-drm-next
head: 599fc12dacf513227ee5c9815a16a3aaa1300f27
commit: d2840196f63f48d2ef2bdf7fe96c1ee9f85ac293 [18/19] drm: use DEFINE_DYNAMIC_DEBUG_TRACE_CATEGORIES in drm
config: x86_64-randconfig-a015-20211016 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
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/jimc/linux/commit/d2840196f63f48d2ef2bdf7fe96c1ee9f85a...
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm-next
git checkout d2840196f63f48d2ef2bdf7fe96c1ee9f85ac293
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/
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/gpu/drm/drm_print.c:60:2: error: unterminated conditional directive
#if !defined(CONFIG_DRM_USE_DYNAMIC_DEBUG)
^
1 error generated.
vim +60 drivers/gpu/drm/drm_print.c
2d4d3ed562aa8f Jim Cromie 2020-08-17 59
2d4d3ed562aa8f Jim Cromie 2020-08-17 @60 #if !defined(CONFIG_DRM_USE_DYNAMIC_DEBUG)
2d4d3ed562aa8f Jim Cromie 2020-08-17 61 MODULE_PARM_DESC(debug, DRM_DEBUG_DESC);
2d4d3ed562aa8f Jim Cromie 2020-08-17 62 module_param_named(debug, __drm_debug, ulong, 0600);
2d4d3ed562aa8f Jim Cromie 2020-08-17 63 #else
2d4d3ed562aa8f Jim Cromie 2020-08-17 64 #include <linux/dynamic_debug.h>
2d4d3ed562aa8f Jim Cromie 2020-08-17 65 DEFINE_DYNAMIC_DEBUG_CATEGORIES(debug, __drm_debug,
2d4d3ed562aa8f Jim Cromie 2020-08-17 66 DRM_DEBUG_DESC,
2d4d3ed562aa8f Jim Cromie 2020-08-17 67 [0] = { DRM_DBG_CAT_CORE },
2d4d3ed562aa8f Jim Cromie 2020-08-17 68 [1] = { DRM_DBG_CAT_DRIVER },
2d4d3ed562aa8f Jim Cromie 2020-08-17 69 [2] = { DRM_DBG_CAT_KMS },
2d4d3ed562aa8f Jim Cromie 2020-08-17 70 [3] = { DRM_DBG_CAT_PRIME },
2d4d3ed562aa8f Jim Cromie 2020-08-17 71 [4] = { DRM_DBG_CAT_ATOMIC },
2d4d3ed562aa8f Jim Cromie 2020-08-17 72 [5] = { DRM_DBG_CAT_VBL },
2d4d3ed562aa8f Jim Cromie 2020-08-17 73 [6] = { DRM_DBG_CAT_STATE },
2d4d3ed562aa8f Jim Cromie 2020-08-17 74 [7] = { DRM_DBG_CAT_LEASE },
2d4d3ed562aa8f Jim Cromie 2020-08-17 75 [8] = { DRM_DBG_CAT_DP },
2d4d3ed562aa8f Jim Cromie 2020-08-17 76 [9] = { DRM_DBG_CAT_DRMRES });
d2840196f63f48 Jim Cromie 2021-10-05 77
:::::: The code at line 60 was first introduced by commit
:::::: 2d4d3ed562aa8feb1da40b1105369d4c16b544cc drm_print: add choice to use dynamic debug in drm-debug
:::::: TO: Jim Cromie <jim.cromie(a)gmail.com>
:::::: CC: Jim Cromie <jim.cromie(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[frank-w-bpi-r2-4.14:5.15-bpi-r2-pro-drm 89/89] drivers/gpu/drm/drm_fourcc.c:102:4: error: implicit declaration of function 'printable_char'
by kernel test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.15-bpi-r2-pro-drm
head: a958b73296c6541778093db348b18f9e3fe047bf
commit: a958b73296c6541778093db348b18f9e3fe047bf [89/89] drm: fourcc: add drm_get_format_name
config: hexagon-randconfig-r041-20211015 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
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/frank-w/BPI-R2-4.14/commit/a958b73296c6541778093db348b...
git remote add frank-w-bpi-r2-4.14 https://github.com/frank-w/BPI-R2-4.14
git fetch --no-tags frank-w-bpi-r2-4.14 5.15-bpi-r2-pro-drm
git checkout a958b73296c6541778093db348b18f9e3fe047bf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
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/gpu/drm/drm_fourcc.c:102:4: error: implicit declaration of function 'printable_char' [-Werror,-Wimplicit-function-declaration]
printable_char(format & 0xff),
^
1 error generated.
vim +/printable_char +102 drivers/gpu/drm/drm_fourcc.c
92
93 /**
94 * drm_get_format_name - fill a string with a drm fourcc format's name
95 * @format: format to compute name of
96 * @buf: caller-supplied buffer
97 */
98 const char *drm_get_format_name(uint32_t format, struct drm_format_name_buf *buf)
99 {
100 snprintf(buf->str, sizeof(buf->str),
101 "%c%c%c%c %s-endian (0x%08x)",
> 102 printable_char(format & 0xff),
103 printable_char((format >> 8) & 0xff),
104 printable_char((format >> 16) & 0xff),
105 printable_char((format >> 24) & 0x7f),
106 format & DRM_FORMAT_BIG_ENDIAN ? "big" : "little",
107 format);
108
109 return buf->str;
110 }
111 EXPORT_SYMBOL(drm_get_format_name);
112
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH 4/5] ALSA: hda: Simplify DMIC-in-NHLT check
by kernel test robot
Hi Cezary,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on broonie-sound/for-next]
[also build test ERROR on tiwai-sound/for-next v5.15-rc5 next-20211015]
[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/Cezary-Rojewski/ALSA-hda-New-NHL...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: riscv-randconfig-r042-20211016 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6069a6a5049497a32a50a49661c2f4169078bdba)
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://github.com/0day-ci/linux/commit/2d319eabf52e504c98ef5c0fdd812347b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cezary-Rojewski/ALSA-hda-New-NHLT-functions-and-cleanup/20211016-004154
git checkout 2d319eabf52e504c98ef5c0fdd812347b41edd00
# save the attached .config 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 sound/hda/
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 sound/hda/intel-dsp-config.c:13:
include/sound/intel-nhlt.h:159:6: warning: no previous prototype for function 'intel_nhlt_has_endpoint_type' [-Wmissing-prototypes]
bool intel_nhlt_has_endpoint_type(struct acpi_table_nhlt *nhlt, u8 link_type)
^
include/sound/intel-nhlt.h:159:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool intel_nhlt_has_endpoint_type(struct acpi_table_nhlt *nhlt, u8 link_type)
^
static
include/sound/intel-nhlt.h:165:1: warning: no previous prototype for function 'intel_nhlt_get_endpoint_blob' [-Wmissing-prototypes]
intel_nhlt_get_endpoint_blob(struct acpi_table_nhlt *nhlt,
^
include/sound/intel-nhlt.h:164:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct nhlt_specific_cfg *
^
static
>> sound/hda/intel-dsp-config.c:387:42: error: use of undeclared identifier 'NHLT_LINK_DMIC'
if (intel_nhlt_has_endpoint_type(nhlt, NHLT_LINK_DMIC))
^
>> sound/hda/intel-dsp-config.c:387:42: error: use of undeclared identifier 'NHLT_LINK_DMIC'
>> sound/hda/intel-dsp-config.c:387:42: error: use of undeclared identifier 'NHLT_LINK_DMIC'
2 warnings and 3 errors generated.
vim +/NHLT_LINK_DMIC +387 sound/hda/intel-dsp-config.c
379
380 static int snd_intel_dsp_check_dmic(struct pci_dev *pci)
381 {
382 struct acpi_table_nhlt *nhlt;
383 int ret = 0;
384
385 nhlt = intel_nhlt_init();
386 if (nhlt) {
> 387 if (intel_nhlt_has_endpoint_type(nhlt, NHLT_LINK_DMIC))
388 ret = 1;
389 intel_nhlt_free(nhlt);
390 }
391 return ret;
392 }
393
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH v1] ath10k: fetch (pre-)calibration data via nvmem subsystem
by kernel test robot
Hi Christian,
I love your patch! Perhaps something to improve:
[auto build test WARNING on kvalo-ath/ath-next]
[also build test WARNING on kvalo-wireless-drivers-next/master kvalo-wireless-drivers/master v5.15-rc5 next-20211015]
[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/Christian-Lamparter/ath10k-fetch...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: i386-randconfig-c001-20211015 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6069a6a5049497a32a50a49661c2f4169078bdba)
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/9a08dd8f5ae4d035f503db3a64ed4c686...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christian-Lamparter/ath10k-fetch-pre-calibration-data-via-nvmem-subsystem/20211016-041140
git checkout 9a08dd8f5ae4d035f503db3a64ed4c6869b038e3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
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/net/wireless/ath/ath10k/core.c:1879:19: warning: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
cell_name, len, ar->hw_params.cal_data_len);
^~~
1 warning generated.
vim +1879 drivers/net/wireless/ath/ath10k/core.c
1858
1859 static int ath10k_download_cal_nvmem(struct ath10k *ar, const char *cell_name)
1860 {
1861 struct nvmem_cell *cell;
1862 void *buf;
1863 size_t len;
1864 int ret;
1865
1866 cell = devm_nvmem_cell_get(ar->dev, cell_name);
1867 if (IS_ERR(cell)) {
1868 ret = PTR_ERR(cell);
1869 return ret;
1870 }
1871
1872 buf = nvmem_cell_read(cell, &len);
1873 if (IS_ERR(buf))
1874 return PTR_ERR(buf);
1875
1876 if (ar->hw_params.cal_data_len != len) {
1877 kfree(buf);
1878 ath10k_warn(ar, "invalid calibration data length in nvmem-cell '%s': %ld != %d\n",
> 1879 cell_name, len, ar->hw_params.cal_data_len);
1880 return -EMSGSIZE;
1881 }
1882
1883 ret = ath10k_download_board_data(ar, buf, len);
1884 kfree(buf);
1885 if (ret)
1886 ath10k_warn(ar, "failed to download calibration data from nvmem-cell '%s': %d\n",
1887 cell_name, ret);
1888
1889 return ret;
1890 }
1891
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH] mt76: mt7921: get rid of unused variable in mt7921_tx_complete_skb
by kernel test robot
Hi Lorenzo,
I love your patch! Yet something to improve:
[auto build test ERROR on kvalo-wireless-drivers-next/master]
[also build test ERROR on kvalo-wireless-drivers/master v5.15-rc5 next-20211015]
[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/Lorenzo-Bianconi/mt76-mt7921-get...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-ne... master
config: x86_64-randconfig-a004-20211015 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
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/91d7fb264668cb286a961b82b9052e2e2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Lorenzo-Bianconi/mt76-mt7921-get-rid-of-unused-variable-in-mt7921_tx_complete_skb/20211016-060448
git checkout 91d7fb264668cb286a961b82b9052e2e23a78f99
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/wireless/mediatek/mt76/mt7921/
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/wireless/mediatek/mt76/mt7921/mac.c:1115:26: error: use of undeclared identifier 'dev'
wcid = rcu_dereference(dev->mt76.wcid[cb->wcid]);
^
>> drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1115:26: error: use of undeclared identifier 'dev'
>> drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1115:26: error: use of undeclared identifier 'dev'
>> drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1115:8: error: assigning to 'struct mt76_wcid *' from incompatible type 'void'
wcid = rcu_dereference(dev->mt76.wcid[cb->wcid]);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
vim +/dev +1115 drivers/net/wireless/mediatek/mt76/mt7921/mac.c
163f4d22c118d4 Sean Wang 2021-01-28 1091
163f4d22c118d4 Sean Wang 2021-01-28 1092 void mt7921_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue_entry *e)
163f4d22c118d4 Sean Wang 2021-01-28 1093 {
163f4d22c118d4 Sean Wang 2021-01-28 1094 if (!e->txwi) {
163f4d22c118d4 Sean Wang 2021-01-28 1095 dev_kfree_skb_any(e->skb);
163f4d22c118d4 Sean Wang 2021-01-28 1096 return;
163f4d22c118d4 Sean Wang 2021-01-28 1097 }
163f4d22c118d4 Sean Wang 2021-01-28 1098
163f4d22c118d4 Sean Wang 2021-01-28 1099 /* error path */
163f4d22c118d4 Sean Wang 2021-01-28 1100 if (e->skb == DMA_DUMMY_DATA) {
163f4d22c118d4 Sean Wang 2021-01-28 1101 struct mt76_txwi_cache *t;
163f4d22c118d4 Sean Wang 2021-01-28 1102 struct mt7921_txp_common *txp;
163f4d22c118d4 Sean Wang 2021-01-28 1103 u16 token;
163f4d22c118d4 Sean Wang 2021-01-28 1104
163f4d22c118d4 Sean Wang 2021-01-28 1105 txp = mt7921_txwi_to_txp(mdev, e->txwi);
163f4d22c118d4 Sean Wang 2021-01-28 1106 token = le16_to_cpu(txp->hw.msdu_id[0]) & ~MT_MSDU_ID_VALID;
d089692bc7938a Lorenzo Bianconi 2021-04-20 1107 t = mt76_token_put(mdev, token);
163f4d22c118d4 Sean Wang 2021-01-28 1108 e->skb = t ? t->skb : NULL;
163f4d22c118d4 Sean Wang 2021-01-28 1109 }
163f4d22c118d4 Sean Wang 2021-01-28 1110
163f4d22c118d4 Sean Wang 2021-01-28 1111 if (e->skb) {
163f4d22c118d4 Sean Wang 2021-01-28 1112 struct mt76_tx_cb *cb = mt76_tx_skb_cb(e->skb);
163f4d22c118d4 Sean Wang 2021-01-28 1113 struct mt76_wcid *wcid;
163f4d22c118d4 Sean Wang 2021-01-28 1114
163f4d22c118d4 Sean Wang 2021-01-28 @1115 wcid = rcu_dereference(dev->mt76.wcid[cb->wcid]);
163f4d22c118d4 Sean Wang 2021-01-28 1116
163f4d22c118d4 Sean Wang 2021-01-28 1117 mt7921_tx_complete_status(mdev, e->skb, wcid_to_sta(wcid), 0,
163f4d22c118d4 Sean Wang 2021-01-28 1118 NULL);
163f4d22c118d4 Sean Wang 2021-01-28 1119 }
163f4d22c118d4 Sean Wang 2021-01-28 1120 }
163f4d22c118d4 Sean Wang 2021-01-28 1121
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[jimc:dd-drm-next 14/19] lib/dynamic_debug.c:441:3: error: expected expression
by kernel test robot
tree: https://github.com/jimc/linux.git dd-drm-next
head: 599fc12dacf513227ee5c9815a16a3aaa1300f27
commit: 510a0561d60eb462dc8762e0482ec7439731b9bb [14/19] dyndbg: add print-to-tracefs, selftest with it - RFC
config: hexagon-randconfig-r041-20211015 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
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/jimc/linux/commit/510a0561d60eb462dc8762e0482ec7439731...
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm-next
git checkout 510a0561d60eb462dc8762e0482ec7439731b9bb
# save the attached .config 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
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 >>):
>> lib/dynamic_debug.c:441:3: error: expected expression
WARN_ONCE("cannot enable T, CONFIG_TRACE=n\n");
^
include/asm-generic/bug.h:150:29: note: expanded from macro 'WARN_ONCE'
DO_ONCE_LITE_IF(condition, WARN, 1, format)
^
>> lib/dynamic_debug.c:743:3: error: implicit declaration of function 'trace_array_printk' [-Werror,-Wimplicit-function-declaration]
trace_array_printk(trace_arr, _THIS_IP_, "%s%pV", buf, &vaf);
^
lib/dynamic_debug.c:743:3: note: did you mean 'trace_printk'?
include/linux/kernel.h:467:5: note: 'trace_printk' declared here
int trace_printk(const char *fmt, ...)
^
2 errors generated.
vim +441 lib/dynamic_debug.c
435
436
437 static int ddebug_validate_flags(struct flag_settings *modifiers)
438 {
439 #if !defined(CONFIG_TRACING)
440 if (modifiers->flags & _DPRINTK_FLAGS_TRACE) {
> 441 WARN_ONCE("cannot enable T, CONFIG_TRACE=n\n");
442 return -EINVAL;
443 }
444 #endif
445 return 0;
446 }
447 /*
448 * Parse `str' as a flags specification, format [-+=][p]+.
449 * Sets up *maskp and *flagsp to be used when changing the
450 * flags fields of matched _ddebug's. Returns 0 on success
451 * or <0 on error.
452 */
453 static int ddebug_parse_flags(const char *str, struct flag_settings *modifiers)
454 {
455 int op, i;
456
457 switch (*str) {
458 case '+':
459 case '-':
460 case '=':
461 op = *str++;
462 break;
463 default:
464 pr_err("bad flag-op %c, at start of %s\n", *str, str);
465 return -EINVAL;
466 }
467 v3pr_info("op=<%c>\n", op);
468
469 for (; *str ; ++str) {
470 for (i = ARRAY_SIZE(opt_array) - 1; i >= 0; i--) {
471 if (*str == opt_array[i].opt_char) {
472 modifiers->flags |= opt_array[i].flag;
473 break;
474 }
475 }
476 if (i < 0) {
477 pr_err("unknown flag '%c'\n", *str);
478 return -EINVAL;
479 }
480 }
481 v3pr_info("flags=0x%x\n", modifiers->flags);
482
483 /* calculate final flags, mask based upon op */
484 switch (op) {
485 case '=':
486 /* modifiers->flags already set */
487 modifiers->mask = 0;
488 break;
489 case '+':
490 modifiers->mask = ~0U;
491 break;
492 case '-':
493 modifiers->mask = ~modifiers->flags;
494 modifiers->flags = 0;
495 break;
496 }
497 v3pr_info("*flagsp=0x%x *maskp=0x%x\n", modifiers->flags, modifiers->mask);
498
499 return ddebug_validate_flags(modifiers);
500 }
501
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH v3 net-next 6/7] net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC
by kernel test robot
Hi "Alvin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Alvin-ipraga/net-dsa-add-support...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 295711fa8fec42a55623bf6997d05a21d7855132
config: i386-randconfig-a005-20211015 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
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/94c375779207a23a0a8731a4cc3b29338...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alvin-ipraga/net-dsa-add-support-for-RTL8365MB-VC/20211016-011352
git checkout 94c375779207a23a0a8731a4cc3b29338f91cb32
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
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/net/dsa/rtl8365mb.c:1597:24: warning: variable 'irq' is uninitialized when used here [-Wuninitialized]
irq_set_parent(virq, irq);
^~~
drivers/net/dsa/rtl8365mb.c:1569:9: note: initialize the variable 'irq' to silence this warning
int irq;
^
= 0
1 warning generated.
vim +/irq +1597 drivers/net/dsa/rtl8365mb.c
1562
1563 static int rtl8365mb_irq_setup(struct realtek_smi *smi)
1564 {
1565 struct rtl8365mb *mb = smi->chip_data;
1566 struct device_node *intc;
1567 u32 irq_trig;
1568 int virq;
1569 int irq;
1570 u32 val;
1571 int ret;
1572 int i;
1573
1574 intc = of_get_child_by_name(smi->dev->of_node, "interrupt-controller");
1575 if (!intc) {
1576 dev_err(smi->dev, "missing child interrupt-controller node\n");
1577 return -EINVAL;
1578 }
1579
1580 smi->irqdomain = irq_domain_add_linear(intc, smi->num_ports,
1581 &rtl8365mb_irqdomain_ops, smi);
1582 if (!smi->irqdomain) {
1583 dev_err(smi->dev, "failed to add irq domain\n");
1584 ret = -ENOMEM;
1585 goto out_put_node;
1586 }
1587
1588 for (i = 0; i < smi->num_ports; i++) {
1589 virq = irq_create_mapping(smi->irqdomain, i);
1590 if (!virq) {
1591 dev_err(smi->dev,
1592 "failed to create irq domain mapping\n");
1593 ret = -EINVAL;
1594 goto out_remove_irqdomain;
1595 }
1596
> 1597 irq_set_parent(virq, irq);
1598 }
1599
1600 /* rtl8365mb IRQs cascade off this one */
1601 irq = of_irq_get(intc, 0);
1602 if (irq <= 0) {
1603 if (irq != -EPROBE_DEFER)
1604 dev_err(smi->dev, "failed to get parent irq: %d\n",
1605 irq);
1606 ret = irq ? irq : -EINVAL;
1607 goto out_remove_irqdomain;
1608 }
1609
1610 /* Configure chip interrupt signal polarity */
1611 irq_trig = irqd_get_trigger_type(irq_get_irq_data(irq));
1612 switch (irq_trig) {
1613 case IRQF_TRIGGER_RISING:
1614 case IRQF_TRIGGER_HIGH:
1615 val = RTL8365MB_INTR_POLARITY_HIGH;
1616 break;
1617 case IRQF_TRIGGER_FALLING:
1618 case IRQF_TRIGGER_LOW:
1619 val = RTL8365MB_INTR_POLARITY_LOW;
1620 break;
1621 default:
1622 dev_err(smi->dev, "unsupported irq trigger type %u\n",
1623 irq_trig);
1624 ret = -EINVAL;
1625 goto out_remove_irqdomain;
1626 }
1627
1628 ret = regmap_update_bits(smi->map, RTL8365MB_INTR_POLARITY_REG,
1629 RTL8365MB_INTR_POLARITY_MASK,
1630 FIELD_PREP(RTL8365MB_INTR_POLARITY_MASK, val));
1631 if (ret)
1632 goto out_remove_irqdomain;
1633
1634 /* Disable the interrupt in case the chip has it enabled on reset */
1635 ret = rtl8365mb_irq_disable(smi);
1636 if (ret)
1637 goto out_remove_irqdomain;
1638
1639 /* Clear the interrupt status register */
1640 ret = regmap_write(smi->map, RTL8365MB_INTR_STATUS_REG,
1641 RTL8365MB_INTR_ALL_MASK);
1642 if (ret)
1643 goto out_remove_irqdomain;
1644
1645 ret = request_threaded_irq(irq, NULL, rtl8365mb_irq, IRQF_ONESHOT,
1646 "rtl8365mb", smi);
1647 if (ret) {
1648 dev_err(smi->dev, "failed to request irq: %d\n", ret);
1649 goto out_remove_irqdomain;
1650 }
1651
1652 /* Store the irq so that we know to free it during teardown */
1653 mb->irq = irq;
1654
1655 ret = rtl8365mb_irq_enable(smi);
1656 if (ret)
1657 goto out_free_irq;
1658
1659 of_node_put(intc);
1660
1661 return 0;
1662
1663 out_free_irq:
1664 free_irq(mb->irq, smi);
1665 mb->irq = 0;
1666
1667 out_remove_irqdomain:
1668 for (i = 0; i < smi->num_ports; i++) {
1669 virq = irq_find_mapping(smi->irqdomain, i);
1670 irq_dispose_mapping(virq);
1671 }
1672
1673 irq_domain_remove(smi->irqdomain);
1674 smi->irqdomain = NULL;
1675
1676 out_put_node:
1677 of_node_put(intc);
1678
1679 return ret;
1680 }
1681
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week