Re: [RFC PATCH v5 7/8] mm: tlb: Pass struct mmu_gather to flush_tlb_range
by kbuild test robot
Hi Zhenyu,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.6]
[cannot apply to arm64/for-next/core linus/master arc/for-next next-20200331]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Zhenyu-Ye/arm64-tlb-add-support-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: nios2-3c120_defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/nios2/include/asm/pgtable.h:22,
from include/linux/mm.h:94,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/nios2/kernel/asm-offsets.c:9:
arch/nios2/include/asm/tlbflush.h: In function 'flush_tlb_page':
>> arch/nios2/include/asm/tlbflush.h:34:29: error: 'tlb_start' undeclared (first use in this function); did you mean 'va_start'?
34 | flush_tlb_range(NULL, vma, tlb_start, tlb_end);
| ^~~~~~~~~
| va_start
arch/nios2/include/asm/tlbflush.h:34:29: note: each undeclared identifier is reported only once for each function it appears in
>> arch/nios2/include/asm/tlbflush.h:34:40: error: 'tlb_end' undeclared (first use in this function); did you mean '_end'?
34 | flush_tlb_range(NULL, vma, tlb_start, tlb_end);
| ^~~~~~~
| _end
make[2]: *** [scripts/Makefile.build:101: arch/nios2/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1112: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:179: sub-make] Error 2
36 real 5 user 12 sys 50.66% cpu make prepare
vim +34 arch/nios2/include/asm/tlbflush.h
30
31 static inline void flush_tlb_page(struct vm_area_struct *vma,
32 unsigned long address)
33 {
> 34 flush_tlb_range(NULL, vma, tlb_start, tlb_end);
35 }
36
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
Re: [Intel-gfx] [PATCH 23/23] drm/i915: Ensure we hold the pin mutex
by kbuild test robot
Hi Maarten,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next tip/perf/core v5.6 next-20200331]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Maarten-Lankhorst/Revert-drm-i91...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-6) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/bug.h:83:0,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/irq.h:14,
from drivers/gpu/drm/i915/i915_pmu.c:7:
drivers/gpu/drm/i915/i915_vma.h: In function 'i915_vma_pin':
>> include/linux/dma-resv.h:80:28: error: implicit declaration of function 'lockdep_is_held'; did you mean 'lockdep_is_held_type'? [-Werror=implicit-function-declaration]
#define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
^
include/asm-generic/bug.h:151:27: note: in definition of macro 'WARN_ONCE'
int __ret_warn_once = !!(condition); \
^~~~~~~~~
drivers/gpu/drm/i915/i915_vma.h:245:2: note: in expansion of macro 'WARN_ON_ONCE'
WARN_ON_ONCE(vma->resv && dma_resv_held(vma->resv));
^~~~~~~~~~~~
drivers/gpu/drm/i915/i915_vma.h:245:28: note: in expansion of macro 'dma_resv_held'
WARN_ON_ONCE(vma->resv && dma_resv_held(vma->resv));
^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +80 include/linux/dma-resv.h
786d7257e537da0 include/linux/reservation.h Maarten Lankhorst 2013-06-27 79
52791eeec1d9f4a include/linux/dma-resv.h Christian König 2019-08-11 @80 #define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
52791eeec1d9f4a include/linux/dma-resv.h Christian König 2019-08-11 81 #define dma_resv_assert_held(obj) lockdep_assert_held(&(obj)->lock.base)
04a5faa8cbe5a8e include/linux/reservation.h Maarten Lankhorst 2014-07-01 82
:::::: The code at line 80 was first introduced by commit
:::::: 52791eeec1d9f4a7e7fe08aaba0b1553149d93bc dma-buf: rename reservation_object to dma_resv
:::::: TO: Christian König <christian.koenig(a)amd.com>
:::::: CC: Christian König <christian.koenig(a)amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
[linux-review:UPDATE-20200401-004844/Hui-Zhu/virtio_balloon-Add-VIRTIO_BALLOON_F_THP_ORDER-to-handle-THP-spilt-issue/20200312-225611 1/1] drivers/virtio/virtio_balloon.c:192:11: error: implicit declaration of function 'MIN'
by kbuild test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20200401-004844/Hui-Zhu/v...
head: f5980925629358176d8b0d635e1be2307a5d91c1
commit: f5980925629358176d8b0d635e1be2307a5d91c1 [1/1] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue
config: riscv-randconfig-a001-20200331 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout f5980925629358176d8b0d635e1be2307a5d91c1
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/riscv/include/asm/hugetlb.h:5,
from include/linux/hugetlb.h:537,
from include/linux/migrate.h:8,
from include/linux/balloon_compaction.h:41,
from drivers/virtio/virtio_balloon.c:16:
include/asm-generic/hugetlb.h: In function 'mk_huge_pte':
include/asm-generic/hugetlb.h:7:9: error: implicit declaration of function 'mk_pte' [-Werror=implicit-function-declaration]
7 | return mk_pte(page, pgprot);
| ^~~~~~
include/asm-generic/hugetlb.h:7:9: error: incompatible types when returning type 'int' but 'pte_t' {aka 'struct <anonymous>'} was expected
7 | return mk_pte(page, pgprot);
| ^~~~~~~~~~~~~~~~~~~~
include/asm-generic/hugetlb.h: In function 'huge_pte_write':
include/asm-generic/hugetlb.h:12:9: error: implicit declaration of function 'pte_write'; did you mean 'pgd_write'? [-Werror=implicit-function-declaration]
12 | return pte_write(pte);
| ^~~~~~~~~
| pgd_write
include/asm-generic/hugetlb.h: In function 'huge_pte_dirty':
include/asm-generic/hugetlb.h:17:9: error: implicit declaration of function 'pte_dirty' [-Werror=implicit-function-declaration]
17 | return pte_dirty(pte);
| ^~~~~~~~~
include/asm-generic/hugetlb.h: In function 'huge_pte_mkwrite':
include/asm-generic/hugetlb.h:22:9: error: implicit declaration of function 'pte_mkwrite'; did you mean 'pgd_write'? [-Werror=implicit-function-declaration]
22 | return pte_mkwrite(pte);
| ^~~~~~~~~~~
| pgd_write
include/asm-generic/hugetlb.h:22:9: error: incompatible types when returning type 'int' but 'pte_t' {aka 'struct <anonymous>'} was expected
22 | return pte_mkwrite(pte);
| ^~~~~~~~~~~~~~~~
include/asm-generic/hugetlb.h: In function 'huge_pte_mkdirty':
include/asm-generic/hugetlb.h:27:9: error: implicit declaration of function 'pte_mkdirty'; did you mean 'huge_pte_mkdirty'? [-Werror=implicit-function-declaration]
27 | return pte_mkdirty(pte);
| ^~~~~~~~~~~
| huge_pte_mkdirty
include/asm-generic/hugetlb.h:27:9: error: incompatible types when returning type 'int' but 'pte_t' {aka 'struct <anonymous>'} was expected
27 | return pte_mkdirty(pte);
| ^~~~~~~~~~~~~~~~
include/asm-generic/hugetlb.h: In function 'huge_pte_modify':
include/asm-generic/hugetlb.h:32:9: error: implicit declaration of function 'pte_modify'; did you mean 'lease_modify'? [-Werror=implicit-function-declaration]
32 | return pte_modify(pte, newprot);
| ^~~~~~~~~~
| lease_modify
include/asm-generic/hugetlb.h:32:9: error: incompatible types when returning type 'int' but 'pte_t' {aka 'struct <anonymous>'} was expected
32 | return pte_modify(pte, newprot);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/hugetlb.h: In function 'huge_pte_clear':
include/asm-generic/hugetlb.h:39:2: error: implicit declaration of function 'pte_clear'; did you mean 'pud_clear'? [-Werror=implicit-function-declaration]
39 | pte_clear(mm, addr, ptep);
| ^~~~~~~~~
| pud_clear
include/asm-generic/hugetlb.h: In function 'set_huge_pte_at':
include/asm-generic/hugetlb.h:56:2: error: implicit declaration of function 'set_pte_at'; did you mean 'set_huge_pte_at'? [-Werror=implicit-function-declaration]
56 | set_pte_at(mm, addr, ptep, pte);
| ^~~~~~~~~~
| set_huge_pte_at
include/asm-generic/hugetlb.h: In function 'huge_ptep_get_and_clear':
include/asm-generic/hugetlb.h:64:9: error: implicit declaration of function 'ptep_get_and_clear'; did you mean 'huge_ptep_get_and_clear'? [-Werror=implicit-function-declaration]
64 | return ptep_get_and_clear(mm, addr, ptep);
| ^~~~~~~~~~~~~~~~~~
| huge_ptep_get_and_clear
include/asm-generic/hugetlb.h:64:9: error: incompatible types when returning type 'int' but 'pte_t' {aka 'struct <anonymous>'} was expected
64 | return ptep_get_and_clear(mm, addr, ptep);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/hugetlb.h: In function 'huge_ptep_clear_flush':
include/asm-generic/hugetlb.h:72:2: error: implicit declaration of function 'ptep_clear_flush'; did you mean 'huge_ptep_clear_flush'? [-Werror=implicit-function-declaration]
72 | ptep_clear_flush(vma, addr, ptep);
| ^~~~~~~~~~~~~~~~
| huge_ptep_clear_flush
include/asm-generic/hugetlb.h: In function 'huge_pte_none':
include/asm-generic/hugetlb.h:79:9: error: implicit declaration of function 'pte_none'; did you mean 'pud_none'? [-Werror=implicit-function-declaration]
79 | return pte_none(pte);
| ^~~~~~~~
| pud_none
include/asm-generic/hugetlb.h: In function 'huge_pte_wrprotect':
include/asm-generic/hugetlb.h:86:9: error: implicit declaration of function 'pte_wrprotect'; did you mean 'huge_pte_wrprotect'? [-Werror=implicit-function-declaration]
86 | return pte_wrprotect(pte);
| ^~~~~~~~~~~~~
| huge_pte_wrprotect
include/asm-generic/hugetlb.h:86:9: error: incompatible types when returning type 'int' but 'pte_t' {aka 'struct <anonymous>'} was expected
86 | return pte_wrprotect(pte);
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/hugetlb.h: In function 'huge_ptep_set_wrprotect':
include/asm-generic/hugetlb.h:109:2: error: implicit declaration of function 'ptep_set_wrprotect'; did you mean 'huge_ptep_set_wrprotect'? [-Werror=implicit-function-declaration]
109 | ptep_set_wrprotect(mm, addr, ptep);
| ^~~~~~~~~~~~~~~~~~
| huge_ptep_set_wrprotect
include/asm-generic/hugetlb.h: In function 'huge_ptep_set_access_flags':
include/asm-generic/hugetlb.h:118:9: error: implicit declaration of function 'ptep_set_access_flags'; did you mean 'huge_ptep_set_access_flags'? [-Werror=implicit-function-declaration]
118 | return ptep_set_access_flags(vma, addr, ptep, pte, dirty);
| ^~~~~~~~~~~~~~~~~~~~~
| huge_ptep_set_access_flags
drivers/virtio/virtio_balloon.c: In function 'fill_balloon':
>> drivers/virtio/virtio_balloon.c:192:11: error: implicit declaration of function 'MIN' [-Werror=implicit-function-declaration]
192 | order = MIN(order,
| ^~~
>> drivers/virtio/virtio_balloon.c:217:11: error: implicit declaration of function 'page_order'; did you mean 'page_index'? [-Werror=implicit-function-declaration]
217 | order = page_order(page);
| ^~~~~~~~~~
| page_index
cc1: some warnings being treated as errors
vim +/MIN +192 drivers/virtio/virtio_balloon.c
171
172 static unsigned fill_balloon(struct virtio_balloon *vb, size_t num)
173 {
174 unsigned num_allocated_pages;
175 int order = MAX_ORDER - 1;
176 unsigned num_pfns;
177 struct page *page;
178 LIST_HEAD(pages);
179
180 /* We can only do one array worth at a time. */
181 num = min(num, ARRAY_SIZE(vb->pfns));
182
183 /*
184 * Note: we will currently never allocate more than 1MB due to the
185 * pfn array size, so we will not allocate MAX_ORDER - 1 ...
186 */
187
188 for (num_pfns = 0; num_pfns < num;
189 num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE * (1 << order)) {
190 const unsigned long remaining = num - num_pfns;
191
> 192 order = MIN(order,
193 get_order(remaining << VIRTIO_BALLOON_PFN_SHIFT));
194 if ((1 << order) * VIRTIO_BALLOON_PAGES_PER_PAGE > remaining)
195 order--;
196 page = balloon_pages_alloc(order);
197
198 if (!page) {
199 dev_info_ratelimited(&vb->vdev->dev,
200 "Out of puff! Can't get %u pages\n",
201 VIRTIO_BALLOON_PAGES_PER_PAGE);
202 /* Sleep for at least 1/5 of a second before retry. */
203 msleep(200);
204 break;
205 }
206
207 /* Continue with the actual order that succeeded. */
208 order = page_private(page);
209 balloon_page_push(&pages, page);
210 }
211
212 mutex_lock(&vb->balloon_lock);
213
214 vb->num_pfns = 0;
215
216 while ((page = balloon_page_pop(&pages))) {
> 217 order = page_order(page);
218 /* enqueuing will split the page and clear the order */
219 balloon_page_enqueue(&vb->vb_dev_info, page);
220
221 set_page_pfns(vb, vb->pfns + vb->num_pfns, page, order);
222 vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE * (1 << order);
223 if (!virtio_has_feature(vb->vdev,
224 VIRTIO_BALLOON_F_DEFLATE_ON_OOM))
225 adjust_managed_page_count(page, -1 * (1 << order));
226 vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE * (1 << order);
227 }
228
229 num_allocated_pages = vb->num_pfns;
230 /* Did we get any? */
231 if (vb->num_pfns != 0)
232 tell_host(vb, vb->inflate_vq);
233 mutex_unlock(&vb->balloon_lock);
234
235 return num_allocated_pages;
236 }
237
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
[linux-review:UPDATE-20200401-004844/Hui-Zhu/virtio_balloon-Add-VIRTIO_BALLOON_F_THP_ORDER-to-handle-THP-spilt-issue/20200312-225611 1/1] drivers/virtio/virtio_balloon.c:217:11: error: implicit declaration of function 'page_order'
by kbuild test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20200401-004844/Hui-Zhu/v...
head: f5980925629358176d8b0d635e1be2307a5d91c1
commit: f5980925629358176d8b0d635e1be2307a5d91c1 [1/1] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue
config: mips-randconfig-a001-20200331 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 5.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout f5980925629358176d8b0d635e1be2307a5d91c1
# save the attached .config to linux build tree
GCC_VERSION=5.5.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/virtio/virtio_balloon.c: In function 'fill_balloon':
drivers/virtio/virtio_balloon.c:192:11: error: implicit declaration of function 'MIN' [-Werror=implicit-function-declaration]
order = MIN(order,
^
>> drivers/virtio/virtio_balloon.c:217:11: error: implicit declaration of function 'page_order' [-Werror=implicit-function-declaration]
order = page_order(page);
^
cc1: some warnings being treated as errors
vim +/page_order +217 drivers/virtio/virtio_balloon.c
171
172 static unsigned fill_balloon(struct virtio_balloon *vb, size_t num)
173 {
174 unsigned num_allocated_pages;
175 int order = MAX_ORDER - 1;
176 unsigned num_pfns;
177 struct page *page;
178 LIST_HEAD(pages);
179
180 /* We can only do one array worth at a time. */
181 num = min(num, ARRAY_SIZE(vb->pfns));
182
183 /*
184 * Note: we will currently never allocate more than 1MB due to the
185 * pfn array size, so we will not allocate MAX_ORDER - 1 ...
186 */
187
188 for (num_pfns = 0; num_pfns < num;
189 num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE * (1 << order)) {
190 const unsigned long remaining = num - num_pfns;
191
192 order = MIN(order,
193 get_order(remaining << VIRTIO_BALLOON_PFN_SHIFT));
194 if ((1 << order) * VIRTIO_BALLOON_PAGES_PER_PAGE > remaining)
195 order--;
196 page = balloon_pages_alloc(order);
197
198 if (!page) {
199 dev_info_ratelimited(&vb->vdev->dev,
200 "Out of puff! Can't get %u pages\n",
201 VIRTIO_BALLOON_PAGES_PER_PAGE);
202 /* Sleep for at least 1/5 of a second before retry. */
203 msleep(200);
204 break;
205 }
206
207 /* Continue with the actual order that succeeded. */
208 order = page_private(page);
209 balloon_page_push(&pages, page);
210 }
211
212 mutex_lock(&vb->balloon_lock);
213
214 vb->num_pfns = 0;
215
216 while ((page = balloon_page_pop(&pages))) {
> 217 order = page_order(page);
218 /* enqueuing will split the page and clear the order */
219 balloon_page_enqueue(&vb->vb_dev_info, page);
220
221 set_page_pfns(vb, vb->pfns + vb->num_pfns, page, order);
222 vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE * (1 << order);
223 if (!virtio_has_feature(vb->vdev,
224 VIRTIO_BALLOON_F_DEFLATE_ON_OOM))
225 adjust_managed_page_count(page, -1 * (1 << order));
226 vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE * (1 << order);
227 }
228
229 num_allocated_pages = vb->num_pfns;
230 /* Did we get any? */
231 if (vb->num_pfns != 0)
232 tell_host(vb, vb->inflate_vq);
233 mutex_unlock(&vb->balloon_lock);
234
235 return num_allocated_pages;
236 }
237
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
Re: [PATCH] x86/perf: Add hardware performance events support for Zhaoxin CPU.
by kbuild test robot
Hi CodyYao-oc,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/perf/core]
[also build test WARNING on tip/auto-latest tip/x86/core v5.6 next-20200331]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/CodyYao-oc/x86-perf-Add-hardware...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 629b3df7ecb01fddfdf71cb5d3c563d143117c33
config: x86_64-randconfig-d003-20200331 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 5227fa0c72ce55927cf4849160acb00442489937)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/x86/events/zhaoxin/core.c:362:6: warning: variable 'is_zxc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (boot_cpu_data.x86 == 0x06 &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/events/zhaoxin/core.c:369:6: note: uninitialized use occurs here
if (is_zxc)
^~~~~~
arch/x86/events/zhaoxin/core.c:362:2: note: remove the 'if' if its condition is always true
if (boot_cpu_data.x86 == 0x06 &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/events/zhaoxin/core.c:362:6: warning: variable 'is_zxc' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
if (boot_cpu_data.x86 == 0x06 &&
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/events/zhaoxin/core.c:369:6: note: uninitialized use occurs here
if (is_zxc)
^~~~~~
arch/x86/events/zhaoxin/core.c:362:6: note: remove the '&&' if its condition is always true
if (boot_cpu_data.x86 == 0x06 &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/events/zhaoxin/core.c:352:13: note: initialize the variable 'is_zxc' to silence this warning
bool is_zxc;
^
= 0
2 warnings generated.
vim +362 arch/x86/events/zhaoxin/core.c
341
342 /*
343 * This handler is triggered by the local APIC, so the APIC IRQ handling
344 * rules apply:
345 */
346 static int zhaoxin_pmu_handle_irq(struct pt_regs *regs)
347 {
348 struct perf_sample_data data;
349 struct cpu_hw_events *cpuc;
350 int bit;
351 u64 status;
352 bool is_zxc;
353 int handled = 0;
354
355 cpuc = this_cpu_ptr(&cpu_hw_events);
356 apic_write(APIC_LVTPC, APIC_DM_NMI);
357 zhaoxin_pmu_disable_all();
358 status = zhaoxin_pmu_get_status();
359 if (!status)
360 goto done;
361
> 362 if (boot_cpu_data.x86 == 0x06 &&
363 (boot_cpu_data.x86_model == 0x0f ||
364 boot_cpu_data.x86_model == 0x19))
365 is_zxc = true;
366 again:
367
368 /*Clearing status works only if the global control is enable on zxc.*/
369 if (is_zxc)
370 wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, x86_pmu.intel_ctrl);
371
372 zhaoxin_pmu_ack_status(status);
373
374 if (is_zxc)
375 wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, 0);
376
377 inc_irq_stat(apic_perf_irqs);
378
379 /*
380 * CondChgd bit 63 doesn't mean any overflow status. Ignore
381 * and clear the bit.
382 */
383 if (__test_and_clear_bit(63, (unsigned long *)&status)) {
384 if (!status)
385 goto done;
386 }
387
388 for_each_set_bit(bit, (unsigned long *)&status, X86_PMC_IDX_MAX) {
389 struct perf_event *event = cpuc->events[bit];
390
391 handled++;
392
393 if (!test_bit(bit, cpuc->active_mask))
394 continue;
395
396 x86_perf_event_update(event);
397 perf_sample_data_init(&data, 0, event->hw.last_period);
398
399 if (!x86_perf_event_set_period(event))
400 continue;
401
402 if (perf_event_overflow(event, &data, regs))
403 x86_pmu_stop(event, 0);
404 }
405
406 /*
407 * Repeat if there is more work to be done:
408 */
409 status = zhaoxin_pmu_get_status();
410 if (status)
411 goto again;
412
413 done:
414 zhaoxin_pmu_enable_all(0);
415 return handled;
416 }
417
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
Re: [PATCH 1/3] kernel/sysctl: support setting sysctl parameters from kernel command line
by kbuild test robot
Hi Vlastimil,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kees/for-next/pstore]
[also build test WARNING on linus/master linux/master v5.6 next-20200330]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Vlastimil-Babka/support-setting-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore
config: um-i386_defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-6) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=um SUBARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/sysctl.h:25,
from fs/proc/proc_sysctl.c:6:
fs/proc/proc_sysctl.c: In function 'process_sysctl_arg':
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'ssize_t {aka int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^~~~~~~~
include/linux/printk.h:304:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~
>> fs/proc/proc_sysctl.c:1798:3: note: in expansion of macro 'pr_err'
pr_err("Wrote only %ld bytes of %d writing to proc file %s to set sysctl parameter '%s=%s'",
^~~~~~
fs/proc/proc_sysctl.c:1798:24: note: format string is defined here
pr_err("Wrote only %ld bytes of %d writing to proc file %s to set sysctl parameter '%s=%s'",
~~^
%d
vim +/pr_err +1798 fs/proc/proc_sysctl.c
1729
1730 /* Set sysctl value passed on kernel command line. */
1731 static int process_sysctl_arg(char *param, char *val,
1732 const char *unused, void *arg)
1733 {
1734 char *path;
1735 struct vfsmount *proc_mnt = *((struct vfsmount **)arg);
1736 struct file_system_type *proc_fs_type;
1737 struct file *file;
1738 int len;
1739 int err;
1740 loff_t pos = 0;
1741 ssize_t wret;
1742
1743 if (strncmp(param, "sysctl", sizeof("sysctl") - 1))
1744 return 0;
1745
1746 param += sizeof("sysctl") - 1;
1747
1748 if (param[0] != '/' && param[0] != '.')
1749 return 0;
1750
1751 param++;
1752
1753 if (!proc_mnt) {
1754 proc_fs_type = get_fs_type("proc");
1755 if (!proc_fs_type) {
1756 pr_err("Failed to find procfs to set sysctl from command line");
1757 return 0;
1758 }
1759 proc_mnt = kern_mount(proc_fs_type);
1760 put_filesystem(proc_fs_type);
1761 if (IS_ERR(proc_mnt)) {
1762 pr_err("Failed to mount procfs to set sysctl from command line");
1763 return 0;
1764 }
1765 *((struct vfsmount **)arg) = proc_mnt;
1766 }
1767
1768 path = kasprintf(GFP_KERNEL, "sys/%s", param);
1769 if (!path)
1770 panic("%s: Failed to allocate path for %s\n", __func__, param);
1771 strreplace(path, '.', '/');
1772
1773 file = file_open_root(proc_mnt->mnt_root, proc_mnt, path, O_WRONLY, 0);
1774 if (IS_ERR(file)) {
1775 err = PTR_ERR(file);
1776 if (err == -ENOENT)
1777 pr_err("Failed to set sysctl parameter '%s=%s': parameter not found",
1778 param, val);
1779 else if (err == -EACCES)
1780 pr_err("Failed to set sysctl parameter '%s=%s': permission denied (read-only?)",
1781 param, val);
1782 else
1783 pr_err("Error %pe opening proc file to set sysctl parameter '%s=%s'",
1784 file, param, val);
1785 goto out;
1786 }
1787 len = strlen(val);
1788 wret = kernel_write(file, val, len, &pos);
1789 if (wret < 0) {
1790 err = wret;
1791 if (err == -EINVAL)
1792 pr_err("Failed to set sysctl parameter '%s=%s': invalid value",
1793 param, val);
1794 else
1795 pr_err("Error %pe writing to proc file to set sysctl parameter '%s=%s'",
1796 ERR_PTR(err), param, val);
1797 } else if (wret != len) {
> 1798 pr_err("Wrote only %ld bytes of %d writing to proc file %s to set sysctl parameter '%s=%s'",
1799 wret, len, path, param, val);
1800 }
1801
1802 err = filp_close(file, NULL);
1803 if (err)
1804 pr_err("Error %pe closing proc file to set sysctl parameter '%s=%s'",
1805 ERR_PTR(err), param, val);
1806 out:
1807 kfree(path);
1808 return 0;
1809 }
1810
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
[chao-linux:compression 7/7] fs/f2fs/data.c:2100: undefined reference to `__divdi3'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git compression
head: 1f78b0122255807d0aaf3c76a3d73761bc115bf1
commit: 1f78b0122255807d0aaf3c76a3d73761bc115bf1 [7/7] f2fs: use round_up()/DIV_ROUND_UP()
config: h8300-randconfig-a001-20200331 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 1f78b0122255807d0aaf3c76a3d73761bc115bf1
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
h8300-linux-ld: fs/f2fs/data.o: in function `f2fs_read_multi_pages':
>> fs/f2fs/data.c:2100: undefined reference to `__divdi3'
h8300-linux-ld: fs/f2fs/data.o: in function `f2fs_read_single_page':
fs/f2fs/data.c:1981: undefined reference to `__divdi3'
vim +2100 fs/f2fs/data.c
2081
2082 #ifdef CONFIG_F2FS_FS_COMPRESSION
2083 int f2fs_read_multi_pages(struct compress_ctx *cc, struct bio **bio_ret,
2084 unsigned nr_pages, sector_t *last_block_in_bio,
2085 bool is_readahead, bool for_write)
2086 {
2087 struct dnode_of_data dn;
2088 struct inode *inode = cc->inode;
2089 struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
2090 struct bio *bio = *bio_ret;
2091 unsigned int start_idx = cc->cluster_idx << cc->log_cluster_size;
2092 sector_t last_block_in_file;
2093 const unsigned blocksize = 1 << inode->i_blkbits;
2094 struct decompress_io_ctx *dic = NULL;
2095 int i;
2096 int ret = 0;
2097
2098 f2fs_bug_on(sbi, f2fs_cluster_is_empty(cc));
2099
> 2100 last_block_in_file = DIV_ROUND_UP(f2fs_readpage_limit(inode),
2101 blocksize);
2102
2103 /* get rid of pages beyond EOF */
2104 for (i = 0; i < cc->cluster_size; i++) {
2105 struct page *page = cc->rpages[i];
2106
2107 if (!page)
2108 continue;
2109 if ((sector_t)page->index >= last_block_in_file) {
2110 zero_user_segment(page, 0, PAGE_SIZE);
2111 if (!PageUptodate(page))
2112 SetPageUptodate(page);
2113 } else if (!PageUptodate(page)) {
2114 continue;
2115 }
2116 unlock_page(page);
2117 cc->rpages[i] = NULL;
2118 cc->nr_rpages--;
2119 }
2120
2121 /* we are done since all pages are beyond EOF */
2122 if (f2fs_cluster_is_empty(cc))
2123 goto out;
2124
2125 set_new_dnode(&dn, inode, NULL, NULL, 0);
2126 ret = f2fs_get_dnode_of_data(&dn, start_idx, LOOKUP_NODE);
2127 if (ret)
2128 goto out;
2129
2130 /* cluster was overwritten as normal cluster */
2131 if (dn.data_blkaddr != COMPRESS_ADDR)
2132 goto out;
2133
2134 for (i = 1; i < cc->cluster_size; i++) {
2135 block_t blkaddr;
2136
2137 blkaddr = data_blkaddr(dn.inode, dn.node_page,
2138 dn.ofs_in_node + i);
2139
2140 if (!__is_valid_data_blkaddr(blkaddr))
2141 break;
2142
2143 if (!f2fs_is_valid_blkaddr(sbi, blkaddr, DATA_GENERIC)) {
2144 ret = -EFAULT;
2145 goto out_put_dnode;
2146 }
2147 cc->nr_cpages++;
2148 }
2149
2150 /* nothing to decompress */
2151 if (cc->nr_cpages == 0) {
2152 ret = 0;
2153 goto out_put_dnode;
2154 }
2155
2156 dic = f2fs_alloc_dic(cc);
2157 if (IS_ERR(dic)) {
2158 ret = PTR_ERR(dic);
2159 goto out_put_dnode;
2160 }
2161
2162 for (i = 0; i < dic->nr_cpages; i++) {
2163 struct page *page = dic->cpages[i];
2164 block_t blkaddr;
2165
2166 blkaddr = data_blkaddr(dn.inode, dn.node_page,
2167 dn.ofs_in_node + i + 1);
2168
2169 if (bio && !page_is_mergeable(sbi, bio,
2170 *last_block_in_bio, blkaddr)) {
2171 submit_and_realloc:
2172 __submit_bio(sbi, bio, DATA);
2173 bio = NULL;
2174 }
2175
2176 if (!bio) {
2177 bio = f2fs_grab_read_bio(inode, blkaddr, nr_pages,
2178 is_readahead ? REQ_RAHEAD : 0,
2179 page->index, for_write);
2180 if (IS_ERR(bio)) {
2181 ret = PTR_ERR(bio);
2182 bio = NULL;
2183 dic->failed = true;
2184 if (refcount_sub_and_test(dic->nr_cpages - i,
2185 &dic->ref))
2186 f2fs_decompress_end_io(dic->rpages,
2187 cc->cluster_size, true,
2188 false);
2189 f2fs_free_dic(dic);
2190 f2fs_put_dnode(&dn);
2191 *bio_ret = bio;
2192 return ret;
2193 }
2194 }
2195
2196 f2fs_wait_on_block_writeback(inode, blkaddr);
2197
2198 if (bio_add_page(bio, page, blocksize, 0) < blocksize)
2199 goto submit_and_realloc;
2200
2201 inc_page_count(sbi, F2FS_RD_DATA);
2202 ClearPageError(page);
2203 *last_block_in_bio = blkaddr;
2204 }
2205
2206 f2fs_put_dnode(&dn);
2207
2208 *bio_ret = bio;
2209 return 0;
2210
2211 out_put_dnode:
2212 f2fs_put_dnode(&dn);
2213 out:
2214 f2fs_decompress_end_io(cc->rpages, cc->cluster_size, true, false);
2215 *bio_ret = bio;
2216 return ret;
2217 }
2218 #endif
2219
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
[omap-audio:peter/linux-next-wip 9/82] drivers/misc/ovv_dmaengine.c:258:2: error: implicit declaration of function 'omap_dma_set_global_params'
by kbuild test robot
tree: https://github.com/omap-audio/linux-audio peter/linux-next-wip
head: 7bb1fe808d86ae4e08cb3e63d8967ccfccfa0441
commit: abf5c0234029b81b2b4b07014b07c8cca0db8897 [9/82] misc: omap_video_vrfb test for dmaengine conversion HACK
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout abf5c0234029b81b2b4b07014b07c8cca0db8897
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/misc/ovv_dmaengine.c: In function 'omap_vout_prepare_vrfb':
>> drivers/misc/ovv_dmaengine.c:258:2: error: implicit declaration of function 'omap_dma_set_global_params' [-Werror=implicit-function-declaration]
258 | omap_dma_set_global_params(DMA_DEFAULT_ARB_RATE, 0x20, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
At top level:
drivers/misc/ovv_dmaengine.c:148:13: warning: 'ovv_dump_50_item_from' defined but not used [-Wunused-function]
148 | static void ovv_dump_50_item_from(struct omap_vout_device *vout, int start)
| ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/omap_dma_set_global_params +258 drivers/misc/ovv_dmaengine.c
206
207 static int omap_vout_prepare_vrfb(struct omap_vout_device *vout,
208 struct videobuf_buffer *vb)
209 {
210 dma_addr_t dmabuf;
211 struct vid_vrfb_dma *tx;
212 u32 dest_frame_index = 0, src_element_index = 0;
213 u32 dest_element_index = 0, src_frame_index = 0;
214 u32 elem_count = 0, frame_count = 0, pixsize = 2;
215
216 if (!is_rotation_enabled(vout))
217 return 0;
218
219 dmabuf = vout->buf_phy_addr[vb->i];
220 /* If rotation is enabled, copy input buffer into VRFB
221 * memory space using DMA. We are copying input buffer
222 * into VRFB memory space of desired angle and DSS will
223 * read image VRFB memory for 0 degree angle
224 */
225 pixsize = vout->bpp * vout->vrfb_bpp;
226 /*
227 * DMA transfer in double index mode
228 */
229
230 /* Frame index */
231 dest_frame_index = ((MAX_PIXELS_PER_LINE * pixsize) -
232 (vout->pix.width * vout->bpp)) + 1;
233
234 /* Source and destination parameters */
235 src_element_index = 0;
236 src_frame_index = 0;
237 dest_element_index = 1;
238 /* Number of elements per frame */
239 elem_count = vout->pix.width * vout->bpp;
240 frame_count = vout->pix.height;
241 tx = &vout->vrfb_dma_tx;
242 tx->tx_status = 0;
243 omap_set_dma_transfer_params(tx->dma_ch, OMAP_DMA_DATA_TYPE_S32,
244 (elem_count / 4), frame_count, OMAP_DMA_SYNC_ELEMENT,
245 tx->dev_id, 0x0);
246 /* src_port required only for OMAP1 */
247 omap_set_dma_src_params(tx->dma_ch, 0, OMAP_DMA_AMODE_POST_INC,
248 dmabuf, src_element_index, src_frame_index);
249 /*set dma source burst mode for VRFB */
250 omap_set_dma_src_burst_mode(tx->dma_ch, OMAP_DMA_DATA_BURST_16);
251
252 /* dest_port required only for OMAP1 */
253 omap_set_dma_dest_params(tx->dma_ch, 0, OMAP_DMA_AMODE_DOUBLE_IDX,
254 vout->vrfb_context[vb->i].paddr[0], dest_element_index,
255 dest_frame_index);
256 /*set dma dest burst mode for VRFB */
257 omap_set_dma_dest_burst_mode(tx->dma_ch, OMAP_DMA_DATA_BURST_16);
> 258 omap_dma_set_global_params(DMA_DEFAULT_ARB_RATE, 0x20, 0);
259
260 omap_start_dma(tx->dma_ch);
261 wait_event_interruptible_timeout(tx->wait, tx->tx_status == 1,
262 VRFB_TX_TIMEOUT);
263
264 if (tx->tx_status == 0) {
265 omap_stop_dma(tx->dma_ch);
266 return -EINVAL;
267 }
268
269 return 0;
270 }
271
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
[android-goldfish:android-3.18 86/90] net/batman-adv/originator.c:552:2: note: in expansion of macro 'hlist_for_each_entry_safe'
by kbuild test robot
tree: https://android.googlesource.com/kernel/goldfish android-3.18
head: 68de96e73bfbcffd6819eefc52442db60e2eb256
commit: 32a8ee87ec4074fea6b32eff05e49450d07d76b1 [86/90] batman-adv: Fix orig_node_vlan leak on orig_node_release
config: m68k-randconfig-a001-20200331 (attached as .config)
compiler: m68k-linux-gcc (GCC) 5.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 32a8ee87ec4074fea6b32eff05e49450d07d76b1
# save the attached .config to linux build tree
GCC_VERSION=5.5.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: the android-goldfish/android-3.18 HEAD c38e40a88755e12543e796f28c1f7b81497da50d builds fine.
It only hurts bisectibility.
All error/warnings (new ones prefixed by >>):
In file included from include/linux/mutex.h:14:0,
from net/batman-adv/main.h:167,
from net/batman-adv/originator.c:18:
net/batman-adv/originator.c: In function 'batadv_orig_node_release':
>> include/linux/list.h:753:36: error: 'struct list_head' has no member named 'first'
for (pos = hlist_entry_safe((head)->first, typeof(*pos), member);\
^
include/linux/list.h:711:12: note: in definition of macro 'hlist_entry_safe'
({ typeof(ptr) ____ptr = (ptr); \
^
>> net/batman-adv/originator.c:552:2: note: in expansion of macro 'hlist_for_each_entry_safe'
hlist_for_each_entry_safe(vlan, node_tmp, &orig_node->vlan_list, list) {
^
>> include/linux/list.h:753:36: error: 'struct list_head' has no member named 'first'
for (pos = hlist_entry_safe((head)->first, typeof(*pos), member);\
^
include/linux/list.h:711:28: note: in definition of macro 'hlist_entry_safe'
({ typeof(ptr) ____ptr = (ptr); \
^
>> net/batman-adv/originator.c:552:2: note: in expansion of macro 'hlist_for_each_entry_safe'
hlist_for_each_entry_safe(vlan, node_tmp, &orig_node->vlan_list, list) {
^
In file included from include/linux/list.h:8:0,
from include/linux/mutex.h:14,
from net/batman-adv/main.h:167,
from net/batman-adv/originator.c:18:
>> include/linux/kernel.h:796:48: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
^
>> include/linux/list.h:701:40: note: in expansion of macro 'container_of'
#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
^
>> include/linux/list.h:712:15: note: in expansion of macro 'hlist_entry'
____ptr ? hlist_entry(____ptr, type, member) : NULL; \
^
>> include/linux/list.h:753:13: note: in expansion of macro 'hlist_entry_safe'
for (pos = hlist_entry_safe((head)->first, typeof(*pos), member);\
^
>> net/batman-adv/originator.c:552:2: note: in expansion of macro 'hlist_for_each_entry_safe'
hlist_for_each_entry_safe(vlan, node_tmp, &orig_node->vlan_list, list) {
^
In file included from include/linux/mutex.h:14:0,
from net/batman-adv/main.h:167,
from net/batman-adv/originator.c:18:
>> include/linux/list.h:754:19: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
pos && ({ n = pos->member.next; 1; }); \
^
>> net/batman-adv/originator.c:552:2: note: in expansion of macro 'hlist_for_each_entry_safe'
hlist_for_each_entry_safe(vlan, node_tmp, &orig_node->vlan_list, list) {
^
In file included from include/linux/list.h:8:0,
from include/linux/mutex.h:14,
from net/batman-adv/main.h:167,
from net/batman-adv/originator.c:18:
>> include/linux/kernel.h:796:48: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
^
>> include/linux/list.h:701:40: note: in expansion of macro 'container_of'
#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
^
>> include/linux/list.h:712:15: note: in expansion of macro 'hlist_entry'
____ptr ? hlist_entry(____ptr, type, member) : NULL; \
^
include/linux/list.h:755:13: note: in expansion of macro 'hlist_entry_safe'
pos = hlist_entry_safe(n, typeof(*pos), member))
^
>> net/batman-adv/originator.c:552:2: note: in expansion of macro 'hlist_for_each_entry_safe'
hlist_for_each_entry_safe(vlan, node_tmp, &orig_node->vlan_list, list) {
^
>> net/batman-adv/originator.c:553:17: warning: passing argument 1 of 'hlist_del_rcu' from incompatible pointer type [-Wincompatible-pointer-types]
hlist_del_rcu(&vlan->list);
^
In file included from include/linux/netdevice.h:38:0,
from net/batman-adv/main.h:169,
from net/batman-adv/originator.c:18:
include/linux/rculist.h:341:20: note: expected 'struct hlist_node *' but argument is of type 'struct list_head *'
static inline void hlist_del_rcu(struct hlist_node *n)
^
vim +/hlist_for_each_entry_safe +552 net/batman-adv/originator.c
522
523 /**
524 * batadv_orig_node_release - release orig_node from lists and queue for
525 * free after rcu grace period
526 * @orig_node: the orig node to free
527 */
528 static void batadv_orig_node_release(struct batadv_orig_node *orig_node)
529 {
530 struct hlist_node *node_tmp;
531 struct batadv_neigh_node *neigh_node;
532 struct batadv_orig_ifinfo *orig_ifinfo;
533 struct batadv_orig_node_vlan *vlan;
534
535 spin_lock_bh(&orig_node->neigh_list_lock);
536
537 /* for all neighbors towards this originator ... */
538 hlist_for_each_entry_safe(neigh_node, node_tmp,
539 &orig_node->neigh_list, list) {
540 hlist_del_rcu(&neigh_node->list);
541 batadv_neigh_node_free_ref(neigh_node);
542 }
543
544 hlist_for_each_entry_safe(orig_ifinfo, node_tmp,
545 &orig_node->ifinfo_list, list) {
546 hlist_del_rcu(&orig_ifinfo->list);
547 batadv_orig_ifinfo_free_ref(orig_ifinfo);
548 }
549 spin_unlock_bh(&orig_node->neigh_list_lock);
550
551 spin_lock_bh(&orig_node->vlan_list_lock);
> 552 hlist_for_each_entry_safe(vlan, node_tmp, &orig_node->vlan_list, list) {
> 553 hlist_del_rcu(&vlan->list);
554 batadv_orig_node_vlan_free_ref(vlan);
555 }
556 spin_unlock_bh(&orig_node->vlan_list_lock);
557
558 /* Free nc_nodes */
559 batadv_nc_purge_orig(orig_node->bat_priv, orig_node, NULL);
560
561 call_rcu(&orig_node->rcu, batadv_orig_node_free_rcu);
562 }
563
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months