[radeon-alex:amd-mainline-dkms-5.2 2071/2647] include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail'
by kbuild test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head: b027ed8d9051470f4ed6bc071fcde172fe1fc595
commit: 034972ea50d821bd2596276c956b39f0ed9ca2dd [2071/2647] drm/amdkcl: Test whether list_bulk_move_tail() is available
config: x86_64-randconfig-g002-201943 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 034972ea50d821bd2596276c956b39f0ed9ca2dd
# 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 >>):
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_drv.h:739:6: note: previous declaration of 'drm_dev_put' was here
void drm_dev_put(struct drm_device *dev);
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'drm_dev_put':
include/kcl/kcl_drm.h:539:9: error: implicit declaration of function 'drm_dev_unref'; did you mean 'drm_dev_enter'? [-Werror=implicit-function-declaration]
return drm_dev_unref(dev);
^~~~~~~~~~~~~
drm_dev_enter
include/kcl/kcl_drm.h:539:9: warning: 'return' with a value, in function returning void
return drm_dev_unref(dev);
^~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:537:20: note: declared here
static inline void drm_dev_put(struct drm_device *dev)
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h: At top level:
include/kcl/kcl_mm.h:65:21: error: redefinition of 'kvmalloc'
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:635:21: note: previous definition of 'kvmalloc' was here
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:75:21: error: redefinition of 'kvzalloc'
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:643:21: note: previous definition of 'kvzalloc' was here
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:85:20: error: static declaration of 'kvfree' follows non-static declaration
static inline void kvfree(const void *addr)
^~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here
extern void kvfree(const void *addr);
^~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:105:21: error: redefinition of 'kvmalloc_array'
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:118:21: error: redefinition of 'kvcalloc'
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error'
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:58:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status'
fence->status = error;
^~
In file included from drivers/gpu/drm/ttm/backport/backport.h:10:0,
from <command-line>:0:
include/kcl/kcl_list.h: At top level:
>> include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail'
static inline void list_bulk_move_tail(struct list_head *head,
^~~~~~~~~~~~~~~~~~~
In file included from include/linux/preempt.h:11:0,
from include/linux/rcupdate.h:27,
from include/linux/rbtree.h:34,
from include/drm/drm_mm.h:41,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/list.h:212:20: note: previous definition of 'list_bulk_move_tail' was here
static inline void list_bulk_move_tail(struct list_head *head,
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_drv.h:739:6: note: previous declaration of 'drm_dev_put' was here
void drm_dev_put(struct drm_device *dev);
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'drm_dev_put':
include/kcl/kcl_drm.h:539:9: error: implicit declaration of function 'drm_dev_unref'; did you mean 'drm_dev_enter'? [-Werror=implicit-function-declaration]
return drm_dev_unref(dev);
^~~~~~~~~~~~~
drm_dev_enter
include/kcl/kcl_drm.h:539:9: warning: 'return' with a value, in function returning void
return drm_dev_unref(dev);
^~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:537:20: note: declared here
static inline void drm_dev_put(struct drm_device *dev)
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h: At top level:
include/kcl/kcl_mm.h:65:21: error: redefinition of 'kvmalloc'
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:635:21: note: previous definition of 'kvmalloc' was here
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:75:21: error: redefinition of 'kvzalloc'
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:643:21: note: previous definition of 'kvzalloc' was here
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:85:20: error: static declaration of 'kvfree' follows non-static declaration
static inline void kvfree(const void *addr)
^~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here
extern void kvfree(const void *addr);
^~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:105:21: error: redefinition of 'kvmalloc_array'
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:118:21: error: redefinition of 'kvcalloc'
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error'
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:58:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status'
fence->status = error;
^~
In file included from drivers/gpu/drm/ttm/backport/backport.h:10:0,
from <command-line>:0:
include/kcl/kcl_list.h: At top level:
>> include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail'
static inline void list_bulk_move_tail(struct list_head *head,
^~~~~~~~~~~~~~~~~~~
In file included from include/linux/preempt.h:11:0,
from include/linux/rcupdate.h:27,
from include/linux/rbtree.h:34,
from include/drm/drm_mm.h:41,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/list.h:212:20: note: previous definition of 'list_bulk_move_tail' was here
static inline void list_bulk_move_tail(struct list_head *head,
^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_bo.c: In function 'ttm_bo_mem_space_debug':
drivers/gpu/drm/ttm/ttm_bo.c:101:25: error: invalid initializer
struct drm_printer p = drm_debug_printer(TTM_PFX);
^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_drv.h:739:6: note: previous declaration of 'drm_dev_put' was here
void drm_dev_put(struct drm_device *dev);
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'drm_dev_put':
include/kcl/kcl_drm.h:539:9: error: implicit declaration of function 'drm_dev_unref'; did you mean 'drm_dev_enter'? [-Werror=implicit-function-declaration]
return drm_dev_unref(dev);
^~~~~~~~~~~~~
drm_dev_enter
include/kcl/kcl_drm.h:539:9: warning: 'return' with a value, in function returning void
return drm_dev_unref(dev);
^~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:537:20: note: declared here
static inline void drm_dev_put(struct drm_device *dev)
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h: At top level:
include/kcl/kcl_mm.h:65:21: error: redefinition of 'kvmalloc'
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:635:21: note: previous definition of 'kvmalloc' was here
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:75:21: error: redefinition of 'kvzalloc'
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:643:21: note: previous definition of 'kvzalloc' was here
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:85:20: error: static declaration of 'kvfree' follows non-static declaration
static inline void kvfree(const void *addr)
^~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here
extern void kvfree(const void *addr);
^~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:105:21: error: redefinition of 'kvmalloc_array'
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:118:21: error: redefinition of 'kvcalloc'
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error'
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:58:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status'
fence->status = error;
^~
In file included from drivers/gpu/drm/ttm/backport/backport.h:10:0,
from <command-line>:0:
include/kcl/kcl_list.h: At top level:
>> include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail'
static inline void list_bulk_move_tail(struct list_head *head,
^~~~~~~~~~~~~~~~~~~
In file included from include/linux/preempt.h:11:0,
from include/linux/rcupdate.h:27,
from include/linux/rbtree.h:34,
from include/drm/drm_mm.h:41,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/list.h:212:20: note: previous definition of 'list_bulk_move_tail' was here
static inline void list_bulk_move_tail(struct list_head *head,
^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_bo_manager.c: In function 'ttm_bo_man_debug':
drivers/gpu/drm/ttm/ttm_bo_manager.c:145:26: error: passing argument 2 of 'drm_mm_print' from incompatible pointer type [-Werror=incompatible-pointer-types]
drm_mm_print(&rman->mm, printer);
^~~~~~~
In file included from include/drm/drm_vma_manager.h:26:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/drm/drm_mm.h:547:6: note: expected 'struct drm_printer *' but argument is of type 'struct drm_printer *'
void drm_mm_print(const struct drm_mm *mm, struct drm_printer *p);
^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/list_bulk_move_tail +6 include/kcl/kcl_list.h
3
4 #if !defined(HAVE_LIST_BULK_MOVE_TAIL)
5 #include <linux/list.h>
> 6 static inline void list_bulk_move_tail(struct list_head *head,
7 struct list_head *first,
8 struct list_head *last)
9 {
10 first->prev->next = last->next;
11 last->next->prev = first->prev;
12
13 head->prev->next = first;
14 first->prev = head->prev;
15
16 last->next = head;
17 head->prev = last;
18 }
19 #endif
20
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
1 year, 5 months
[wsa:renesas/i2c/new_probed_device 1/12] include/linux/export.h:88:20: error: redefinition of '__kstrtab_i2c_new_device'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/i2c/new_probed_device
head: 2aec438429c19f714e86cf949dd63a7cfd39a898
commit: 493db84af56830ddec68dfe6faf60728e676acbc [1/12] i2c: replace i2c_new_probed_device with an ERR_PTR variant
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.4.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 493db84af56830ddec68dfe6faf60728e676acbc
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/linux/list.h:9,
from include/linux/kobject.h:19,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/i2c/i2c-core-base.c:16:
>> include/linux/export.h:88:20: error: redefinition of '__kstrtab_i2c_new_device'
static const char __kstrtab_##sym[] \
^
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
>> drivers/i2c/i2c-core-base.c:2332:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
include/linux/export.h:88:20: note: previous definition of '__kstrtab_i2c_new_device' was here
static const char __kstrtab_##sym[] \
^
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers/i2c/i2c-core-base.c:823:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
>> include/linux/export.h:91:20: error: redefinition of '__kstrtabns_i2c_new_device'
static const char __kstrtabns_##sym[] \
^
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
>> drivers/i2c/i2c-core-base.c:2332:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
include/linux/export.h:91:20: note: previous definition of '__kstrtabns_i2c_new_device' was here
static const char __kstrtabns_##sym[] \
^
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers/i2c/i2c-core-base.c:823:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
include/linux/export.h:66:36: error: redefinition of '__ksymtab_i2c_new_device'
static const struct kernel_symbol __ksymtab_##sym \
^
include/linux/export.h:94:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
>> drivers/i2c/i2c-core-base.c:2332:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
include/linux/export.h:66:36: note: previous definition of '__ksymtab_i2c_new_device' was here
static const struct kernel_symbol __ksymtab_##sym \
^
include/linux/export.h:94:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers/i2c/i2c-core-base.c:823:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
--
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/linux/list.h:9,
from include/linux/kobject.h:19,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers//i2c/i2c-core-base.c:16:
>> include/linux/export.h:88:20: error: redefinition of '__kstrtab_i2c_new_device'
static const char __kstrtab_##sym[] \
^
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers//i2c/i2c-core-base.c:2332:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
include/linux/export.h:88:20: note: previous definition of '__kstrtab_i2c_new_device' was here
static const char __kstrtab_##sym[] \
^
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers//i2c/i2c-core-base.c:823:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
>> include/linux/export.h:91:20: error: redefinition of '__kstrtabns_i2c_new_device'
static const char __kstrtabns_##sym[] \
^
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers//i2c/i2c-core-base.c:2332:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
include/linux/export.h:91:20: note: previous definition of '__kstrtabns_i2c_new_device' was here
static const char __kstrtabns_##sym[] \
^
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers//i2c/i2c-core-base.c:823:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
include/linux/export.h:66:36: error: redefinition of '__ksymtab_i2c_new_device'
static const struct kernel_symbol __ksymtab_##sym \
^
include/linux/export.h:94:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers//i2c/i2c-core-base.c:2332:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
include/linux/export.h:66:36: note: previous definition of '__ksymtab_i2c_new_device' was here
static const struct kernel_symbol __ksymtab_##sym \
^
include/linux/export.h:94:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
include/linux/export.h:133:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
>> include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers//i2c/i2c-core-base.c:823:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
vim +/__kstrtab_i2c_new_device +88 include/linux/export.h
69a94abb82eed2 Masahiro Yamada 2019-09-09 83
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 84 /* For every exported symbol, place a struct in the __ksymtab section */
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 85 #define ___EXPORT_SYMBOL(sym, sec, ns) \
f50169324df4ad Paul Gortmaker 2011-05-23 86 extern typeof(sym) sym; \
8651ec01daedad Matthias Maennich 2019-09-06 87 __CRC_SYMBOL(sym, sec); \
f50169324df4ad Paul Gortmaker 2011-05-23 @88 static const char __kstrtab_##sym[] \
7290d58095712a Ard Biesheuvel 2018-08-21 89 __attribute__((section("__ksymtab_strings"), used, aligned(1))) \
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 90 = #sym; \
fa6643cdc5cd72 Masahiro Yamada 2019-10-03 @91 static const char __kstrtabns_##sym[] \
8651ec01daedad Matthias Maennich 2019-09-06 92 __attribute__((section("__ksymtab_strings"), used, aligned(1))) \
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 93 = ns; \
7290d58095712a Ard Biesheuvel 2018-08-21 94 __KSYMTAB_ENTRY(sym, sec)
f50169324df4ad Paul Gortmaker 2011-05-23 95
69a94abb82eed2 Masahiro Yamada 2019-09-09 96 #endif
69a94abb82eed2 Masahiro Yamada 2019-09-09 97
69a94abb82eed2 Masahiro Yamada 2019-09-09 98 #if !defined(CONFIG_MODULES) || defined(__DISABLE_EXPORTS)
f922c4abdf7648 Ard Biesheuvel 2018-08-21 99
f922c4abdf7648 Ard Biesheuvel 2018-08-21 100 /*
f922c4abdf7648 Ard Biesheuvel 2018-08-21 101 * Allow symbol exports to be disabled completely so that C code may
f922c4abdf7648 Ard Biesheuvel 2018-08-21 102 * be reused in other execution contexts such as the UEFI stub or the
f922c4abdf7648 Ard Biesheuvel 2018-08-21 103 * decompressor.
f922c4abdf7648 Ard Biesheuvel 2018-08-21 104 */
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 105 #define __EXPORT_SYMBOL(sym, sec, ns)
f922c4abdf7648 Ard Biesheuvel 2018-08-21 106
bbda5ec671d3fe Masahiro Yamada 2018-11-30 107 #elif defined(CONFIG_TRIM_UNUSED_KSYMS)
bbda5ec671d3fe Masahiro Yamada 2018-11-30 108
bbda5ec671d3fe Masahiro Yamada 2018-11-30 109 #include <generated/autoksyms.h>
c1a95fda2a40ae Nicolas Pitre 2016-01-22 110
c1a95fda2a40ae Nicolas Pitre 2016-01-22 111 /*
c1a95fda2a40ae Nicolas Pitre 2016-01-22 112 * For fine grained build dependencies, we want to tell the build system
c1a95fda2a40ae Nicolas Pitre 2016-01-22 113 * about each possible exported symbol even if they're not actually exported.
bbda5ec671d3fe Masahiro Yamada 2018-11-30 114 * We use a symbol pattern __ksym_marker_<symbol> that the build system filters
bbda5ec671d3fe Masahiro Yamada 2018-11-30 115 * from the $(NM) output (see scripts/gen_ksymdeps.sh). These symbols are
bbda5ec671d3fe Masahiro Yamada 2018-11-30 116 * discarded in the final link stage.
c1a95fda2a40ae Nicolas Pitre 2016-01-22 117 */
bbda5ec671d3fe Masahiro Yamada 2018-11-30 118 #define __ksym_marker(sym) \
bbda5ec671d3fe Masahiro Yamada 2018-11-30 119 static int __ksym_marker_##sym[0] __section(".discard.ksym") __used
f235541699bcf1 Nicolas Pitre 2016-01-22 120
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 121 #define __EXPORT_SYMBOL(sym, sec, ns) \
bbda5ec671d3fe Masahiro Yamada 2018-11-30 122 __ksym_marker(sym); \
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 123 __cond_export_sym(sym, sec, ns, __is_defined(__KSYM_##sym))
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 124 #define __cond_export_sym(sym, sec, ns, conf) \
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 125 ___cond_export_sym(sym, sec, ns, conf)
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 126 #define ___cond_export_sym(sym, sec, ns, enabled) \
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 127 __cond_export_sym_##enabled(sym, sec, ns)
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 128 #define __cond_export_sym_1(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 129 #define __cond_export_sym_0(sym, sec, ns) /* nothing */
8651ec01daedad Matthias Maennich 2019-09-06 130
f235541699bcf1 Nicolas Pitre 2016-01-22 131 #else
f235541699bcf1 Nicolas Pitre 2016-01-22 132
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 133 #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
f50169324df4ad Paul Gortmaker 2011-05-23 134
69a94abb82eed2 Masahiro Yamada 2019-09-09 135 #endif /* CONFIG_MODULES */
f50169324df4ad Paul Gortmaker 2011-05-23 136
8e2adc6a00cd96 Matthias Maennich 2019-09-06 137 #ifdef DEFAULT_SYMBOL_NAMESPACE
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 138 #include <linux/stringify.h>
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 139 #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, __stringify(DEFAULT_SYMBOL_NAMESPACE))
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 140 #else
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 @141 #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
8e2adc6a00cd96 Matthias Maennich 2019-09-06 142 #endif
8e2adc6a00cd96 Matthias Maennich 2019-09-06 143
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 144 #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 @145 #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 146 #define EXPORT_SYMBOL_GPL_FUTURE(sym) _EXPORT_SYMBOL(sym, "_gpl_future")
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 147 #define EXPORT_SYMBOL_NS(sym, ns) __EXPORT_SYMBOL(sym, "", #ns)
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 148 #define EXPORT_SYMBOL_NS_GPL(sym, ns) __EXPORT_SYMBOL(sym, "_gpl", #ns)
f50169324df4ad Paul Gortmaker 2011-05-23 149
:::::: The code at line 88 was first introduced by commit
:::::: f50169324df4ad942e544386d136216c8617636a module.h: split out the EXPORT_SYMBOL into export.h
:::::: TO: Paul Gortmaker <paul.gortmaker(a)windriver.com>
:::::: CC: Paul Gortmaker <paul.gortmaker(a)windriver.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
1 year, 5 months
[wsa:renesas/i2c/new_probed_device 1/12] include/linux/export.h:127:2: note: in expansion of macro '__cond_export_sym_1'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/i2c/new_probed_device
head: 2aec438429c19f714e86cf949dd63a7cfd39a898
commit: 493db84af56830ddec68dfe6faf60728e676acbc [1/12] i2c: replace i2c_new_probed_device with an ERR_PTR variant
config: i386-randconfig-b002-201943 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 493db84af56830ddec68dfe6faf60728e676acbc
# save the attached .config to linux build tree
make ARCH=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/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/linux/list.h:9,
from include/linux/kobject.h:19,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/i2c/i2c-core-base.c:16:
include/linux/export.h:88:20: error: redefinition of '__kstrtab_i2c_new_device'
static const char __kstrtab_##sym[] \
^
include/linux/export.h:128:43: note: in expansion of macro '___EXPORT_SYMBOL'
#define __cond_export_sym_1(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
>> include/linux/export.h:127:2: note: in expansion of macro '__cond_export_sym_1'
__cond_export_sym_##enabled(sym, sec, ns)
^~~~~~~~~~~~~~~~~~
>> include/linux/export.h:125:2: note: in expansion of macro '___cond_export_sym'
___cond_export_sym(sym, sec, ns, conf)
^~~~~~~~~~~~~~~~~~
>> include/linux/export.h:123:2: note: in expansion of macro '__cond_export_sym'
__cond_export_sym(sym, sec, ns, __is_defined(__KSYM_##sym))
^~~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers/i2c/i2c-core-base.c:2332:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
include/linux/export.h:88:20: note: previous definition of '__kstrtab_i2c_new_device' was here
static const char __kstrtab_##sym[] \
^
include/linux/export.h:128:43: note: in expansion of macro '___EXPORT_SYMBOL'
#define __cond_export_sym_1(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
>> include/linux/export.h:127:2: note: in expansion of macro '__cond_export_sym_1'
__cond_export_sym_##enabled(sym, sec, ns)
^~~~~~~~~~~~~~~~~~
>> include/linux/export.h:125:2: note: in expansion of macro '___cond_export_sym'
___cond_export_sym(sym, sec, ns, conf)
^~~~~~~~~~~~~~~~~~
>> include/linux/export.h:123:2: note: in expansion of macro '__cond_export_sym'
__cond_export_sym(sym, sec, ns, __is_defined(__KSYM_##sym))
^~~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers/i2c/i2c-core-base.c:823:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
include/linux/export.h:91:20: error: redefinition of '__kstrtabns_i2c_new_device'
static const char __kstrtabns_##sym[] \
^
include/linux/export.h:128:43: note: in expansion of macro '___EXPORT_SYMBOL'
#define __cond_export_sym_1(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
>> include/linux/export.h:127:2: note: in expansion of macro '__cond_export_sym_1'
__cond_export_sym_##enabled(sym, sec, ns)
^~~~~~~~~~~~~~~~~~
>> include/linux/export.h:125:2: note: in expansion of macro '___cond_export_sym'
___cond_export_sym(sym, sec, ns, conf)
^~~~~~~~~~~~~~~~~~
>> include/linux/export.h:123:2: note: in expansion of macro '__cond_export_sym'
__cond_export_sym(sym, sec, ns, __is_defined(__KSYM_##sym))
^~~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers/i2c/i2c-core-base.c:2332:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
include/linux/export.h:91:20: note: previous definition of '__kstrtabns_i2c_new_device' was here
static const char __kstrtabns_##sym[] \
^
include/linux/export.h:128:43: note: in expansion of macro '___EXPORT_SYMBOL'
#define __cond_export_sym_1(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
>> include/linux/export.h:127:2: note: in expansion of macro '__cond_export_sym_1'
__cond_export_sym_##enabled(sym, sec, ns)
^~~~~~~~~~~~~~~~~~
>> include/linux/export.h:125:2: note: in expansion of macro '___cond_export_sym'
___cond_export_sym(sym, sec, ns, conf)
^~~~~~~~~~~~~~~~~~
>> include/linux/export.h:123:2: note: in expansion of macro '__cond_export_sym'
__cond_export_sym(sym, sec, ns, __is_defined(__KSYM_##sym))
^~~~~~~~~~~~~~~~~
include/linux/export.h:141:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:145:33: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~
drivers/i2c/i2c-core-base.c:823:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(i2c_new_device);
^~~~~~~~~~~~~~~~~
vim +/__cond_export_sym_1 +127 include/linux/export.h
69a94abb82eed2 Masahiro Yamada 2019-09-09 83
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 84 /* For every exported symbol, place a struct in the __ksymtab section */
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 85 #define ___EXPORT_SYMBOL(sym, sec, ns) \
f50169324df4ad Paul Gortmaker 2011-05-23 86 extern typeof(sym) sym; \
8651ec01daedad Matthias Maennich 2019-09-06 87 __CRC_SYMBOL(sym, sec); \
f50169324df4ad Paul Gortmaker 2011-05-23 @88 static const char __kstrtab_##sym[] \
7290d58095712a Ard Biesheuvel 2018-08-21 89 __attribute__((section("__ksymtab_strings"), used, aligned(1))) \
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 90 = #sym; \
fa6643cdc5cd72 Masahiro Yamada 2019-10-03 91 static const char __kstrtabns_##sym[] \
8651ec01daedad Matthias Maennich 2019-09-06 92 __attribute__((section("__ksymtab_strings"), used, aligned(1))) \
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 93 = ns; \
7290d58095712a Ard Biesheuvel 2018-08-21 94 __KSYMTAB_ENTRY(sym, sec)
f50169324df4ad Paul Gortmaker 2011-05-23 95
69a94abb82eed2 Masahiro Yamada 2019-09-09 96 #endif
69a94abb82eed2 Masahiro Yamada 2019-09-09 97
69a94abb82eed2 Masahiro Yamada 2019-09-09 98 #if !defined(CONFIG_MODULES) || defined(__DISABLE_EXPORTS)
f922c4abdf7648 Ard Biesheuvel 2018-08-21 99
f922c4abdf7648 Ard Biesheuvel 2018-08-21 100 /*
f922c4abdf7648 Ard Biesheuvel 2018-08-21 101 * Allow symbol exports to be disabled completely so that C code may
f922c4abdf7648 Ard Biesheuvel 2018-08-21 102 * be reused in other execution contexts such as the UEFI stub or the
f922c4abdf7648 Ard Biesheuvel 2018-08-21 103 * decompressor.
f922c4abdf7648 Ard Biesheuvel 2018-08-21 104 */
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 105 #define __EXPORT_SYMBOL(sym, sec, ns)
f922c4abdf7648 Ard Biesheuvel 2018-08-21 106
bbda5ec671d3fe Masahiro Yamada 2018-11-30 107 #elif defined(CONFIG_TRIM_UNUSED_KSYMS)
bbda5ec671d3fe Masahiro Yamada 2018-11-30 108
bbda5ec671d3fe Masahiro Yamada 2018-11-30 109 #include <generated/autoksyms.h>
c1a95fda2a40ae Nicolas Pitre 2016-01-22 110
c1a95fda2a40ae Nicolas Pitre 2016-01-22 111 /*
c1a95fda2a40ae Nicolas Pitre 2016-01-22 112 * For fine grained build dependencies, we want to tell the build system
c1a95fda2a40ae Nicolas Pitre 2016-01-22 113 * about each possible exported symbol even if they're not actually exported.
bbda5ec671d3fe Masahiro Yamada 2018-11-30 114 * We use a symbol pattern __ksym_marker_<symbol> that the build system filters
bbda5ec671d3fe Masahiro Yamada 2018-11-30 115 * from the $(NM) output (see scripts/gen_ksymdeps.sh). These symbols are
bbda5ec671d3fe Masahiro Yamada 2018-11-30 116 * discarded in the final link stage.
c1a95fda2a40ae Nicolas Pitre 2016-01-22 117 */
bbda5ec671d3fe Masahiro Yamada 2018-11-30 118 #define __ksym_marker(sym) \
bbda5ec671d3fe Masahiro Yamada 2018-11-30 119 static int __ksym_marker_##sym[0] __section(".discard.ksym") __used
f235541699bcf1 Nicolas Pitre 2016-01-22 120
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 121 #define __EXPORT_SYMBOL(sym, sec, ns) \
bbda5ec671d3fe Masahiro Yamada 2018-11-30 122 __ksym_marker(sym); \
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 @123 __cond_export_sym(sym, sec, ns, __is_defined(__KSYM_##sym))
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 124 #define __cond_export_sym(sym, sec, ns, conf) \
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 @125 ___cond_export_sym(sym, sec, ns, conf)
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 126 #define ___cond_export_sym(sym, sec, ns, enabled) \
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 @127 __cond_export_sym_##enabled(sym, sec, ns)
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 @128 #define __cond_export_sym_1(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
c3a6cf19e695c8 Masahiro Yamada 2019-10-18 129 #define __cond_export_sym_0(sym, sec, ns) /* nothing */
8651ec01daedad Matthias Maennich 2019-09-06 130
:::::: The code at line 127 was first introduced by commit
:::::: c3a6cf19e695c8b0a9bf8b5933f863e12d878b7c export: avoid code duplication in include/linux/export.h
:::::: TO: Masahiro Yamada <yamada.masahiro(a)socionext.com>
:::::: CC: Jessica Yu <jeyu(a)kernel.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
1 year, 5 months
[drm-intel:drm-intel-next-queued 2/2] drivers/gpu/drm/i915/i915_perf.c:2442:85: sparse: sparse: dubious: x | !y
by kbuild test robot
tree: git://anongit.freedesktop.org/drm-intel drm-intel-next-queued
head: 00a7f0d7155c28ab18600bcf3f62d7cade2a870d
commit: 00a7f0d7155c28ab18600bcf3f62d7cade2a870d [2/2] drm/i915/tgl: Add perf support on TGL
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-dirty
git checkout 00a7f0d7155c28ab18600bcf3f62d7cade2a870d
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/i915/i915_perf.c:2442:85: sparse: sparse: dubious: x | !y
vim +2442 drivers/gpu/drm/i915/i915_perf.c
2430
2431 static int gen12_enable_metric_set(struct i915_perf_stream *stream)
2432 {
2433 struct intel_uncore *uncore = stream->uncore;
2434 struct i915_oa_config *oa_config = stream->oa_config;
2435 bool periodic = stream->periodic;
2436 u32 period_exponent = stream->period_exponent;
2437 int ret;
2438
2439 intel_uncore_write(uncore, GEN12_OAG_OA_DEBUG,
2440 /* Disable clk ratio reports, like previous Gens. */
2441 _MASKED_BIT_ENABLE(GEN12_OAG_OA_DEBUG_DISABLE_CLK_RATIO_REPORTS |
> 2442 GEN12_OAG_OA_DEBUG_INCLUDE_CLK_RATIO) |
2443 /*
2444 * If the user didn't require OA reports, instruct the
2445 * hardware not to emit ctx switch reports.
2446 */
2447 !(stream->sample_flags & SAMPLE_OA_REPORT) ?
2448 _MASKED_BIT_ENABLE(GEN12_OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS) :
2449 _MASKED_BIT_DISABLE(GEN12_OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS));
2450
2451 intel_uncore_write(uncore, GEN12_OAG_OAGLBCTXCTRL, periodic ?
2452 (GEN12_OAG_OAGLBCTXCTRL_COUNTER_RESUME |
2453 GEN12_OAG_OAGLBCTXCTRL_TIMER_ENABLE |
2454 (period_exponent << GEN12_OAG_OAGLBCTXCTRL_TIMER_PERIOD_SHIFT))
2455 : 0);
2456
2457 /*
2458 * Update all contexts prior writing the mux configurations as we need
2459 * to make sure all slices/subslices are ON before writing to NOA
2460 * registers.
2461 */
2462 ret = lrc_configure_all_contexts(stream, oa_config);
2463 if (ret)
2464 return ret;
2465
2466 /*
2467 * For Gen12, performance counters are context
2468 * saved/restored. Only enable it for the context that
2469 * requested this.
2470 */
2471 if (stream->ctx) {
2472 ret = gen12_emit_oar_config(stream->pinned_ctx,
2473 oa_config != NULL);
2474 if (ret)
2475 return ret;
2476 }
2477
2478 return emit_oa_config(stream, oa_config, oa_context(stream));
2479 }
2480
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
1 year, 5 months
[radeon-alex:amd-mainline-dkms-5.2 2055/2647] include/kcl/kcl_drm.h:571:20: error: static declaration of 'drm_dev_put' follows non-static declaration
by kbuild test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head: b027ed8d9051470f4ed6bc071fcde172fe1fc595
commit: 8d660d16d64cb75fab00f3e78409a93394cb7d29 [2055/2647] drm/amdkcl: Test whether drm_dev_put is available
config: x86_64-randconfig-g002-201943 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 8d660d16d64cb75fab00f3e78409a93394cb7d29
# 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 >>):
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_plane.h:713:5: note: declared here
int drm_universal_plane_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_lookup':
include/kcl/kcl_drm.h:260:32: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
return drm_gem_object_lookup(dev, filp, handle);
^~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'struct drm_file *' but argument is of type 'struct drm_device *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:260:37: warning: passing argument 2 of 'drm_gem_object_lookup' makes integer from pointer without a cast [-Wint-conversion]
return drm_gem_object_lookup(dev, filp, handle);
^~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'u32 {aka unsigned int}' but argument is of type 'struct drm_file *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:260:10: error: too many arguments to function 'drm_gem_object_lookup'
return drm_gem_object_lookup(dev, filp, handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: declared here
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:303:8: error: redefinition of 'struct drm_format_name_buf'
struct drm_format_name_buf {
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:69:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_fourcc.h:142:8: note: originally defined here
struct drm_format_name_buf {
^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_put_unlocked':
include/kcl/kcl_drm.h:335:9: error: implicit declaration of function 'drm_gem_object_unreference_unlocked'; did you mean 'drm_gem_object_put_unlocked'? [-Werror=implicit-function-declaration]
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drm_gem_object_put_unlocked
include/kcl/kcl_drm.h:335:9: warning: 'return' with a value, in function returning void
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:332:20: note: declared here
static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_old_crtc_state_before_commit':
include/kcl/kcl_drm.h:359:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_new_crtc_state_after_commit':
include/kcl/kcl_drm.h:394:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:499:8: error: redefinition of 'struct drm_printer'
struct drm_printer {
^~~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/drm/drm_print.h:70:8: note: originally defined here
struct drm_printer {
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:505:6: error: conflicting types for 'drm_printf'
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/drm/drm_print.h:86:6: note: previous declaration of 'drm_printf' was here
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
>> include/kcl/kcl_drm.h:571:20: error: static declaration of 'drm_dev_put' follows non-static declaration
static inline void drm_dev_put(struct drm_device *dev)
^~~~~~~~~~~
In file included from include/drm/drmP.h:74:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_drv.h:739:6: note: previous declaration of 'drm_dev_put' was here
void drm_dev_put(struct drm_device *dev);
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'drm_dev_put':
>> include/kcl/kcl_drm.h:573:9: error: implicit declaration of function 'drm_dev_unref'; did you mean 'drm_dev_enter'? [-Werror=implicit-function-declaration]
return drm_dev_unref(dev);
^~~~~~~~~~~~~
drm_dev_enter
include/kcl/kcl_drm.h:573:9: warning: 'return' with a value, in function returning void
return drm_dev_unref(dev);
^~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:571:20: note: declared here
static inline void drm_dev_put(struct drm_device *dev)
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h: At top level:
include/kcl/kcl_mm.h:65:21: error: redefinition of 'kvmalloc'
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:635:21: note: previous definition of 'kvmalloc' was here
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:75:21: error: redefinition of 'kvzalloc'
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:643:21: note: previous definition of 'kvzalloc' was here
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:85:20: error: static declaration of 'kvfree' follows non-static declaration
static inline void kvfree(const void *addr)
^~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here
extern void kvfree(const void *addr);
^~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:105:21: error: redefinition of 'kvmalloc_array'
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:118:21: error: redefinition of 'kvcalloc'
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error'
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:58:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status'
fence->status = error;
^~
cc1: some warnings being treated as errors
--
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_plane.h:713:5: note: declared here
int drm_universal_plane_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_lookup':
include/kcl/kcl_drm.h:260:32: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
return drm_gem_object_lookup(dev, filp, handle);
^~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'struct drm_file *' but argument is of type 'struct drm_device *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:260:37: warning: passing argument 2 of 'drm_gem_object_lookup' makes integer from pointer without a cast [-Wint-conversion]
return drm_gem_object_lookup(dev, filp, handle);
^~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'u32 {aka unsigned int}' but argument is of type 'struct drm_file *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:260:10: error: too many arguments to function 'drm_gem_object_lookup'
return drm_gem_object_lookup(dev, filp, handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: declared here
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:303:8: error: redefinition of 'struct drm_format_name_buf'
struct drm_format_name_buf {
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:69:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_fourcc.h:142:8: note: originally defined here
struct drm_format_name_buf {
^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_put_unlocked':
include/kcl/kcl_drm.h:335:9: error: implicit declaration of function 'drm_gem_object_unreference_unlocked'; did you mean 'drm_gem_object_put_unlocked'? [-Werror=implicit-function-declaration]
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drm_gem_object_put_unlocked
include/kcl/kcl_drm.h:335:9: warning: 'return' with a value, in function returning void
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:332:20: note: declared here
static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_old_crtc_state_before_commit':
include/kcl/kcl_drm.h:359:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_new_crtc_state_after_commit':
include/kcl/kcl_drm.h:394:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:499:8: error: redefinition of 'struct drm_printer'
struct drm_printer {
^~~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/drm/drm_print.h:70:8: note: originally defined here
struct drm_printer {
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:505:6: error: conflicting types for 'drm_printf'
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/drm/drm_print.h:86:6: note: previous declaration of 'drm_printf' was here
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
>> include/kcl/kcl_drm.h:571:20: error: static declaration of 'drm_dev_put' follows non-static declaration
static inline void drm_dev_put(struct drm_device *dev)
^~~~~~~~~~~
In file included from include/drm/drmP.h:74:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_drv.h:739:6: note: previous declaration of 'drm_dev_put' was here
void drm_dev_put(struct drm_device *dev);
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'drm_dev_put':
>> include/kcl/kcl_drm.h:573:9: error: implicit declaration of function 'drm_dev_unref'; did you mean 'drm_dev_enter'? [-Werror=implicit-function-declaration]
return drm_dev_unref(dev);
^~~~~~~~~~~~~
drm_dev_enter
include/kcl/kcl_drm.h:573:9: warning: 'return' with a value, in function returning void
return drm_dev_unref(dev);
^~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:571:20: note: declared here
static inline void drm_dev_put(struct drm_device *dev)
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h: At top level:
include/kcl/kcl_mm.h:65:21: error: redefinition of 'kvmalloc'
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:635:21: note: previous definition of 'kvmalloc' was here
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:75:21: error: redefinition of 'kvzalloc'
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:643:21: note: previous definition of 'kvzalloc' was here
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:85:20: error: static declaration of 'kvfree' follows non-static declaration
static inline void kvfree(const void *addr)
^~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here
extern void kvfree(const void *addr);
^~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:105:21: error: redefinition of 'kvmalloc_array'
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:118:21: error: redefinition of 'kvcalloc'
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error'
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:58:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status'
fence->status = error;
^~
drivers/gpu/drm/ttm/ttm_bo.c: In function 'ttm_bo_mem_space_debug':
drivers/gpu/drm/ttm/ttm_bo.c:101:25: error: invalid initializer
struct drm_printer p = drm_debug_printer(TTM_PFX);
^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
..
vim +/drm_dev_put +571 include/kcl/kcl_drm.h
569
570 #ifndef HAVE_DRM_DEV_PUT
> 571 static inline void drm_dev_put(struct drm_device *dev)
572 {
> 573 return drm_dev_unref(dev);
574 }
575 #endif
576
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
1 year, 5 months
[cryptodev:master 162/163] drivers/crypto/hisilicon/zip/zip_main.c:154:13: error: 'head' undeclared; did you mean '_end'?
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
head: 298b4c604008025b134bc6fccbc4018449945d60
commit: 700f7d0d29c795c36517dcd3541e4432a76c2efc [162/163] crypto: hisilicon - fix to return sub-optimal device when best device has no qps
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 7.4.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 700f7d0d29c795c36517dcd3541e4432a76c2efc
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=alpha
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/crypto/hisilicon/zip/zip_main.c: In function 'find_zip_device':
>> drivers/crypto/hisilicon/zip/zip_main.c:154:13: error: 'head' undeclared (first use in this function); did you mean '_end'?
free_list(&head);
^~~~
_end
drivers/crypto/hisilicon/zip/zip_main.c:154:13: note: each undeclared identifier is reported only once for each function it appears in
drivers/crypto/hisilicon/zip/zip_main.c:153:1: warning: label 'err' defined but not used [-Wunused-label]
err:
^~~
vim +154 drivers/crypto/hisilicon/zip/zip_main.c
104
105 struct hisi_zip *find_zip_device(int node)
106 {
107 struct hisi_zip *ret = NULL;
108 #ifdef CONFIG_NUMA
109 struct hisi_zip_resource *res, *tmp;
110 struct hisi_zip *hisi_zip;
111 struct list_head *n;
112 struct device *dev;
113 LIST_HEAD(head);
114
115 mutex_lock(&hisi_zip_list_lock);
116
117 list_for_each_entry(hisi_zip, &hisi_zip_list, list) {
118 res = kzalloc(sizeof(*res), GFP_KERNEL);
119 if (!res)
120 goto err;
121
122 dev = &hisi_zip->qm.pdev->dev;
123 res->hzip = hisi_zip;
124 res->distance = node_distance(dev->numa_node, node);
125
126 n = &head;
127 list_for_each_entry(tmp, &head, list) {
128 if (res->distance < tmp->distance) {
129 n = &tmp->list;
130 break;
131 }
132 }
133 list_add_tail(&res->list, n);
134 }
135
136 list_for_each_entry(tmp, &head, list) {
137 if (hisi_qm_get_free_qp_num(&tmp->hzip->qm)) {
138 ret = tmp->hzip;
139 break;
140 }
141 }
142
143 free_list(&head);
144 #else
145 mutex_lock(&hisi_zip_list_lock);
146
147 ret = list_first_entry(&hisi_zip_list, struct hisi_zip, list);
148 #endif
149 mutex_unlock(&hisi_zip_list_lock);
150
151 return ret;
152
153 err:
> 154 free_list(&head);
155 mutex_unlock(&hisi_zip_list_lock);
156 return NULL;
157 }
158
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
1 year, 5 months
[android-common:android-3.18 12862/12936] drivers/char/mem.c:457:4: note: in expansion of macro 'if'
by kbuild test robot
tree: https://android.googlesource.com/kernel/common android-3.18
head: 092c072095517a63745da6ca04bcbbc0f71bf823
commit: d8d7791979c3d6045b0904ddf8e17970401a5a80 [12862/12936] /dev/mem: Bail out upon SIGKILL.
config: i386-randconfig-f003-201943 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
git checkout d8d7791979c3d6045b0904ddf8e17970401a5a80
# save the attached .config to linux build tree
make ARCH=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/linkage.h:4:0,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/mm.h:9,
from drivers/char/mem.c:11:
drivers/char/mem.c: In function 'read_kmem':
drivers/char/mem.c:457:8: error: implicit declaration of function 'should_stop_iteration' [-Werror=implicit-function-declaration]
if (should_stop_iteration()) {
^
include/linux/compiler.h:141:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
>> drivers/char/mem.c:457:4: note: in expansion of macro 'if'
if (should_stop_iteration()) {
^
cc1: some warnings being treated as errors
vim +/if +457 drivers/char/mem.c
408
409 #ifdef CONFIG_DEVKMEM
410 /*
411 * This function reads the *virtual* memory as seen by the kernel.
412 */
413 static ssize_t read_kmem(struct file *file, char __user *buf,
414 size_t count, loff_t *ppos)
415 {
416 unsigned long p = *ppos;
417 ssize_t low_count, read, sz;
418 char *kbuf; /* k-addr because vread() takes vmlist_lock rwlock */
419 int err = 0;
420
421 read = 0;
422 if (p < (unsigned long) high_memory) {
423 low_count = count;
424 if (count > (unsigned long)high_memory - p)
425 low_count = (unsigned long)high_memory - p;
426
427 #ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED
428 /* we don't have page 0 mapped on sparc and m68k.. */
429 if (p < PAGE_SIZE && low_count > 0) {
430 sz = size_inside_page(p, low_count);
431 if (clear_user(buf, sz))
432 return -EFAULT;
433 buf += sz;
434 p += sz;
435 read += sz;
436 low_count -= sz;
437 count -= sz;
438 }
439 #endif
440 while (low_count > 0) {
441 sz = size_inside_page(p, low_count);
442
443 /*
444 * On ia64 if a page has been mapped somewhere as
445 * uncached, then it must also be accessed uncached
446 * by the kernel or data corruption may occur
447 */
448 kbuf = xlate_dev_kmem_ptr((char *)p);
449
450 if (copy_to_user(buf, kbuf, sz))
451 return -EFAULT;
452 buf += sz;
453 p += sz;
454 read += sz;
455 low_count -= sz;
456 count -= sz;
> 457 if (should_stop_iteration()) {
458 count = 0;
459 break;
460 }
461 }
462 }
463
464 if (count > 0) {
465 kbuf = (char *)__get_free_page(GFP_KERNEL);
466 if (!kbuf)
467 return -ENOMEM;
468 while (count > 0) {
469 sz = size_inside_page(p, count);
470 if (!is_vmalloc_or_module_addr((void *)p)) {
471 err = -ENXIO;
472 break;
473 }
474 sz = vread(kbuf, (char *)p, sz);
475 if (!sz)
476 break;
477 if (copy_to_user(buf, kbuf, sz)) {
478 err = -EFAULT;
479 break;
480 }
481 count -= sz;
482 buf += sz;
483 read += sz;
484 p += sz;
485 if (should_stop_iteration())
486 break;
487 }
488 free_page((unsigned long)kbuf);
489 }
490 *ppos = p;
491 return read ? read : err;
492 }
493
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
1 year, 5 months
[radeon-alex:amd-mainline-dkms-5.2 2031/2647] include/kcl/kcl_mm.h:60:21: error: redefinition of 'kvmalloc'
by kbuild test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head: b027ed8d9051470f4ed6bc071fcde172fe1fc595
commit: f12f9b802b6dd80fdee0b7c601b8b9d59a967556 [2031/2647] drm/amdkcl: Test if linux/overflow.h and struct_size exists
config: x86_64-randconfig-g002-201943 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout f12f9b802b6dd80fdee0b7c601b8b9d59a967556
# 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 >>):
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_plane.h:713:5: note: declared here
int drm_universal_plane_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_lookup':
include/kcl/kcl_drm.h:252:32: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
return drm_gem_object_lookup(dev, filp, handle);
^~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'struct drm_file *' but argument is of type 'struct drm_device *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:252:37: warning: passing argument 2 of 'drm_gem_object_lookup' makes integer from pointer without a cast [-Wint-conversion]
return drm_gem_object_lookup(dev, filp, handle);
^~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'u32 {aka unsigned int}' but argument is of type 'struct drm_file *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:252:10: error: too many arguments to function 'drm_gem_object_lookup'
return drm_gem_object_lookup(dev, filp, handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: declared here
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:295:8: error: redefinition of 'struct drm_format_name_buf'
struct drm_format_name_buf {
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:69:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_fourcc.h:142:8: note: originally defined here
struct drm_format_name_buf {
^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_put_unlocked':
include/kcl/kcl_drm.h:327:9: error: implicit declaration of function 'drm_gem_object_unreference_unlocked'; did you mean 'drm_gem_object_put_unlocked'? [-Werror=implicit-function-declaration]
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drm_gem_object_put_unlocked
include/kcl/kcl_drm.h:327:9: warning: 'return' with a value, in function returning void
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:324:20: note: declared here
static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_old_crtc_state_before_commit':
include/kcl/kcl_drm.h:351:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_new_crtc_state_after_commit':
include/kcl/kcl_drm.h:386:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:491:8: error: redefinition of 'struct drm_printer'
struct drm_printer {
^~~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/drm/drm_print.h:70:8: note: originally defined here
struct drm_printer {
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:497:6: error: conflicting types for 'drm_printf'
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/drm/drm_print.h:86:6: note: previous declaration of 'drm_printf' was here
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:60:21: error: redefinition of 'kvmalloc'
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:635:21: note: previous definition of 'kvmalloc' was here
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:70:21: error: redefinition of 'kvzalloc'
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:643:21: note: previous definition of 'kvzalloc' was here
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:80:20: error: static declaration of 'kvfree' follows non-static declaration
static inline void kvfree(const void *addr)
^~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here
extern void kvfree(const void *addr);
^~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:100:21: error: redefinition of 'kvmalloc_array'
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:113:21: error: redefinition of 'kvcalloc'
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h: In function 'kcl_fence_get_rcu_safe':
include/kcl/kcl_fence.h:124:32: error: passing argument 1 of 'dma_fence_get_rcu_safe' from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~
In file included from include/drm/drmP.h:58:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/dma-fence.h:315:1: note: expected 'struct dma_fence **' but argument is of type 'struct fence **'
dma_fence_get_rcu_safe(struct dma_fence __rcu **fencep)
^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h:124:9: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_fence.h: At top level:
include/kcl/kcl_fence.h:129:20: error: redefinition of 'dma_fence_set_error'
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:58:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
include/kcl/kcl_fence.h:135:7: error: 'struct dma_fence' has no member named 'status'
fence->status = error;
^~
cc1: some warnings being treated as errors
--
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_plane.h:713:5: note: declared here
int drm_universal_plane_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_lookup':
include/kcl/kcl_drm.h:252:32: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
return drm_gem_object_lookup(dev, filp, handle);
^~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'struct drm_file *' but argument is of type 'struct drm_device *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:252:37: warning: passing argument 2 of 'drm_gem_object_lookup' makes integer from pointer without a cast [-Wint-conversion]
return drm_gem_object_lookup(dev, filp, handle);
^~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'u32 {aka unsigned int}' but argument is of type 'struct drm_file *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:252:10: error: too many arguments to function 'drm_gem_object_lookup'
return drm_gem_object_lookup(dev, filp, handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: declared here
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:295:8: error: redefinition of 'struct drm_format_name_buf'
struct drm_format_name_buf {
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:69:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_fourcc.h:142:8: note: originally defined here
struct drm_format_name_buf {
^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_put_unlocked':
include/kcl/kcl_drm.h:327:9: error: implicit declaration of function 'drm_gem_object_unreference_unlocked'; did you mean 'drm_gem_object_put_unlocked'? [-Werror=implicit-function-declaration]
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drm_gem_object_put_unlocked
include/kcl/kcl_drm.h:327:9: warning: 'return' with a value, in function returning void
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:324:20: note: declared here
static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_old_crtc_state_before_commit':
include/kcl/kcl_drm.h:351:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_new_crtc_state_after_commit':
include/kcl/kcl_drm.h:386:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:491:8: error: redefinition of 'struct drm_printer'
struct drm_printer {
^~~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/drm/drm_print.h:70:8: note: originally defined here
struct drm_printer {
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:497:6: error: conflicting types for 'drm_printf'
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/drm/drm_print.h:86:6: note: previous declaration of 'drm_printf' was here
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:60:21: error: redefinition of 'kvmalloc'
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:635:21: note: previous definition of 'kvmalloc' was here
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:70:21: error: redefinition of 'kvzalloc'
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:643:21: note: previous definition of 'kvzalloc' was here
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:80:20: error: static declaration of 'kvfree' follows non-static declaration
static inline void kvfree(const void *addr)
^~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here
extern void kvfree(const void *addr);
^~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:100:21: error: redefinition of 'kvmalloc_array'
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:113:21: error: redefinition of 'kvcalloc'
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h: In function 'kcl_fence_get_rcu_safe':
include/kcl/kcl_fence.h:124:32: error: passing argument 1 of 'dma_fence_get_rcu_safe' from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~
In file included from include/drm/drmP.h:58:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/dma-fence.h:315:1: note: expected 'struct dma_fence **' but argument is of type 'struct fence **'
dma_fence_get_rcu_safe(struct dma_fence __rcu **fencep)
^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h:124:9: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_fence.h: At top level:
include/kcl/kcl_fence.h:129:20: error: redefinition of 'dma_fence_set_error'
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:58:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
static inline void dma_fence_set_error(struct dma_fence *fence,
^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
include/kcl/kcl_fence.h:135:7: error: 'struct dma_fence' has no member named 'status'
fence->status = error;
^~
drivers/gpu/drm/ttm/ttm_bo.c: In function 'ttm_bo_mem_space_debug':
drivers/gpu/drm/ttm/ttm_bo.c:101:25: error: invalid initializer
struct drm_printer p = drm_debug_printer(TTM_PFX);
^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
..
vim +/kvmalloc +60 include/kcl/kcl_mm.h
b4f7d254be169a Junwei Zhang 2016-12-23 58
b8a1520bda5b72 Flora Cui 2019-08-19 59 #ifndef HAVE_KVZALLOC_KVMALLOC
b8a1520bda5b72 Flora Cui 2019-08-19 @60 static inline void *kvmalloc(size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 61 {
b8a1520bda5b72 Flora Cui 2019-08-19 62 void *out;
b4f7d254be169a Junwei Zhang 2016-12-23 63
b8a1520bda5b72 Flora Cui 2019-08-19 64 if (size > PAGE_SIZE)
b8a1520bda5b72 Flora Cui 2019-08-19 65 out = __vmalloc(size, flags, PAGE_KERNEL);
b8a1520bda5b72 Flora Cui 2019-08-19 66 else
b8a1520bda5b72 Flora Cui 2019-08-19 67 out = kmalloc(size, flags);
b8a1520bda5b72 Flora Cui 2019-08-19 68 return out;
b8a1520bda5b72 Flora Cui 2019-08-19 69 }
b8a1520bda5b72 Flora Cui 2019-08-19 @70 static inline void *kvzalloc(size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 71 {
b8a1520bda5b72 Flora Cui 2019-08-19 72 return kvmalloc(size, flags | __GFP_ZERO);
b8a1520bda5b72 Flora Cui 2019-08-19 73 }
b8a1520bda5b72 Flora Cui 2019-08-19 74 #endif /* HAVE_KVZALLOC_KVMALLOC */
b4f7d254be169a Junwei Zhang 2016-12-23 75
b8a1520bda5b72 Flora Cui 2019-08-19 76 #ifndef HAVE_KVFREE
b8a1520bda5b72 Flora Cui 2019-08-19 77 #ifdef HAVE_DRM_FREE_LARGE
b8a1520bda5b72 Flora Cui 2019-08-19 78 #define kvfree drm_free_large
b8a1520bda5b72 Flora Cui 2019-08-19 79 #else
b8a1520bda5b72 Flora Cui 2019-08-19 @80 static inline void kvfree(const void *addr)
b8a1520bda5b72 Flora Cui 2019-08-19 81 {
b8a1520bda5b72 Flora Cui 2019-08-19 82 if (is_vmalloc_addr(addr))
b8a1520bda5b72 Flora Cui 2019-08-19 83 vfree(addr);
b8a1520bda5b72 Flora Cui 2019-08-19 84 else
b8a1520bda5b72 Flora Cui 2019-08-19 85 kfree(addr);
b8a1520bda5b72 Flora Cui 2019-08-19 86 }
b8a1520bda5b72 Flora Cui 2019-08-19 87 #endif /* HAVE_DRM_FREE_LARGE */
b8a1520bda5b72 Flora Cui 2019-08-19 88 #endif /* HAVE_KVFREE */
b8a1520bda5b72 Flora Cui 2019-08-19 89
b8a1520bda5b72 Flora Cui 2019-08-19 90 #ifndef HAVE_KVMALLOC_ARRAY
b8a1520bda5b72 Flora Cui 2019-08-19 91 #if defined(HAVE_DRM_MALLOC_AB) && defined(HAVE_DRM_CALLOC_LARGE)
b8a1520bda5b72 Flora Cui 2019-08-19 92 static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 93 {
b8a1520bda5b72 Flora Cui 2019-08-19 94 if (flags & __GFP_ZERO)
b8a1520bda5b72 Flora Cui 2019-08-19 95 return drm_calloc_large(n, size);
b8a1520bda5b72 Flora Cui 2019-08-19 96 else
b8a1520bda5b72 Flora Cui 2019-08-19 97 return drm_malloc_ab(n, size);
b8a1520bda5b72 Flora Cui 2019-08-19 98 }
b8a1520bda5b72 Flora Cui 2019-08-19 99 #else
b8a1520bda5b72 Flora Cui 2019-08-19 @100 static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 101 {
b8a1520bda5b72 Flora Cui 2019-08-19 102 size_t bytes;
b8a1520bda5b72 Flora Cui 2019-08-19 103
b8a1520bda5b72 Flora Cui 2019-08-19 104 if (unlikely(check_mul_overflow(n, size, &bytes)))
b8a1520bda5b72 Flora Cui 2019-08-19 105 return NULL;
b8a1520bda5b72 Flora Cui 2019-08-19 106
b8a1520bda5b72 Flora Cui 2019-08-19 107 return kvmalloc(bytes, flags);
b8a1520bda5b72 Flora Cui 2019-08-19 108 }
b8a1520bda5b72 Flora Cui 2019-08-19 109 #endif /* HAVE_DRM_MALLOC_AB && HAVE_DRM_CALLOC_LARGE */
b8a1520bda5b72 Flora Cui 2019-08-19 110 #endif /* HAVE_KVMALLOC_ARRAY */
b4f7d254be169a Junwei Zhang 2016-12-23 111
b8a1520bda5b72 Flora Cui 2019-08-19 112 #ifndef HAVE_KVCALLOC
b8a1520bda5b72 Flora Cui 2019-08-19 @113 static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 114 {
b8a1520bda5b72 Flora Cui 2019-08-19 115 return kvmalloc_array(n, size, flags | __GFP_ZERO);
b8a1520bda5b72 Flora Cui 2019-08-19 116 }
b8a1520bda5b72 Flora Cui 2019-08-19 117 #endif /* HAVE_KVCALLOC */
b4f7d254be169a Junwei Zhang 2016-12-23 118
:::::: The code at line 60 was first introduced by commit
:::::: b8a1520bda5b7226ae5b5a132e61d3a96231de0b drm/amdkcl: test whether memory alloc and free functions are available
:::::: TO: Flora Cui <flora.cui(a)amd.com>
:::::: CC: Flora Cui <flora.cui(a)amd.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
1 year, 5 months
[peterz-queue:perf/core 5/7] kernel/events/core.c:6278:6: sparse: sparse: symbol 'perf_pmu_snapshot_aux' was not declared. Should it be static?
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core
head: 81d3fdc7ba3ed0763391798a1ba382bd3d3b865c
commit: f051b9643fd6f5bea8ba2d1e45d57335e228aad4 [5/7] perf: Allow using AUX data in perf samples
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-dirty
git checkout f051b9643fd6f5bea8ba2d1e45d57335e228aad4
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
kernel/events/core.c:571:26: sparse: sparse: function 'perf_pmu_name' with external linkage has definition
kernel/events/core.c:1384:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:1384:15: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:1384:15: sparse: struct perf_event_context *
kernel/events/core.c:1397:28: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:1397:28: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:1397:28: sparse: struct perf_event_context *
kernel/events/core.c:3221:18: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3221:18: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:3221:18: sparse: struct perf_event_context *
kernel/events/core.c:3222:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3222:23: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:3222:23: sparse: struct perf_event_context *
kernel/events/core.c:3264:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3264:25: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:3264:25: sparse: struct perf_event_context *
kernel/events/core.c:3265:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3265:25: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:3265:25: sparse: struct perf_event_context *
kernel/events/core.c:4340:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:4340:25: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:4340:25: sparse: struct perf_event_context *
kernel/events/core.c:5564:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5564:9: sparse: struct ring_buffer [noderef] <asn:4> *
kernel/events/core.c:5564:9: sparse: struct ring_buffer *
kernel/events/core.c:5072:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __poll_t [usertype] events @@ got e] events @@
kernel/events/core.c:5072:24: sparse: expected restricted __poll_t [usertype] events
kernel/events/core.c:5072:24: sparse: got int
kernel/events/core.c:5270:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5270:22: sparse: struct ring_buffer [noderef] <asn:4> *
kernel/events/core.c:5270:22: sparse: struct ring_buffer *
kernel/events/core.c:5406:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5406:14: sparse: struct ring_buffer [noderef] <asn:4> *
kernel/events/core.c:5406:14: sparse: struct ring_buffer *
kernel/events/core.c:5439:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5439:14: sparse: struct ring_buffer [noderef] <asn:4> *
kernel/events/core.c:5439:14: sparse: struct ring_buffer *
kernel/events/core.c:5496:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5496:14: sparse: struct ring_buffer [noderef] <asn:4> *
kernel/events/core.c:5496:14: sparse: struct ring_buffer *
kernel/events/core.c:5582:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5582:14: sparse: struct ring_buffer [noderef] <asn:4> *
kernel/events/core.c:5582:14: sparse: struct ring_buffer *
kernel/events/core.c:5595:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5595:14: sparse: struct ring_buffer [noderef] <asn:4> *
kernel/events/core.c:5595:14: sparse: struct ring_buffer *
kernel/events/internal.h:204:1: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got f] <asn:1> *from @@
kernel/events/internal.h:204:1: sparse: expected void const [noderef] <asn:1> *from
kernel/events/internal.h:204:1: sparse: got void const *buf
>> kernel/events/core.c:6278:6: sparse: sparse: symbol 'perf_pmu_snapshot_aux' was not declared. Should it be static?
kernel/events/core.c:7067:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7067:23: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:7067:23: sparse: struct perf_event_context *
kernel/events/core.c:7158:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7158:13: sparse: struct ring_buffer [noderef] <asn:4> *
kernel/events/core.c:7158:13: sparse: struct ring_buffer *
kernel/events/core.c:7846:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7846:23: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:7846:23: sparse: struct perf_event_context *
kernel/events/core.c:8576:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:8576:17: sparse: struct swevent_hlist [noderef] <asn:4> *
kernel/events/core.c:8576:17: sparse: struct swevent_hlist *
kernel/events/core.c:8596:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:8596:17: sparse: struct swevent_hlist [noderef] <asn:4> *
kernel/events/core.c:8596:17: sparse: struct swevent_hlist *
kernel/events/core.c:8716:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:8716:16: sparse: struct swevent_hlist [noderef] <asn:4> *
kernel/events/core.c:8716:16: sparse: struct swevent_hlist *
kernel/events/core.c:8727:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:8727:9: sparse: struct swevent_hlist [noderef] <asn:4> *
kernel/events/core.c:8727:9: sparse: struct swevent_hlist *
kernel/events/core.c:8716:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:8716:16: sparse: struct swevent_hlist [noderef] <asn:4> *
kernel/events/core.c:8716:16: sparse: struct swevent_hlist *
kernel/events/core.c:8766:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:8766:17: sparse: struct swevent_hlist [noderef] <asn:4> *
kernel/events/core.c:8766:17: sparse: struct swevent_hlist *
kernel/events/core.c:8947:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:8947:23: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:8947:23: sparse: struct perf_event_context *
kernel/events/core.c:10118:1: sparse: sparse: symbol 'dev_attr_nr_addr_filters' was not declared. Should it be static?
kernel/events/core.c:11590:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected struct perf_event * @@ got t * @@
kernel/events/core.c:11590:24: sparse: expected struct perf_event *
kernel/events/core.c:11590:24: sparse: got int
kernel/events/core.c:11833:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:11833:9: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:11833:9: sparse: struct perf_event_context *
kernel/events/core.c:11943:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:11943:17: sparse: struct perf_event_context [noderef] <asn:4> *
kernel/events/core.c:11943:17: sparse: struct perf_event_context *
kernel/events/core.c:8716:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:8716:16: sparse: struct swevent_hlist [noderef] <asn:4> *
kernel/events/core.c:8716:16: sparse: struct swevent_hlist *
kernel/events/core.c:12367:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:12367:17: sparse: struct swevent_hlist [noderef] <asn:4> *
kernel/events/core.c:12367:17: sparse: struct swevent_hlist *
kernel/events/core.c:155:9: sparse: sparse: context imbalance in 'perf_ctx_lock' - wrong count at exit
kernel/events/core.c:163:17: sparse: sparse: context imbalance in 'perf_ctx_unlock' - unexpected unlock
kernel/events/core.c:1404:17: sparse: sparse: context imbalance in 'perf_lock_task_context' - different lock contexts for basic block
kernel/events/core.c:1431:17: sparse: sparse: context imbalance in 'perf_pin_task_context' - unexpected unlock
kernel/events/core.c:2651:9: sparse: sparse: context imbalance in '__perf_install_in_context' - wrong count at exit
kernel/events/core.c:4312:17: sparse: sparse: context imbalance in 'find_get_context' - unexpected unlock
kernel/events/core.c:10487:9: sparse: sparse: context imbalance in 'perf_init_event' - different lock contexts for basic block
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
1 year, 5 months