lkml.org 
[lkml]   [2017]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
Hi harsha,

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.13-rc7 next-20170831]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/harsha/Staging-android-ion-ion-c-Using-WARN_ON-rather-than-BUG/20170901-160600
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa

All error/warnings (new ones prefixed by >>):

In file included from ./arch/xtensa/include/generated/asm/bug.h:1:0,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from arch/xtensa/include/asm/current.h:16,
from include/linux/mutex.h:13,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from drivers/staging/android/ion/ion.c:18:
drivers/staging/android/ion/ion.c: In function 'ion_buffer_add':
>> include/asm-generic/bug.h:107:34: error: expected expression before ')' token
int __ret_warn_on = !!(condition); \
^
>> drivers/staging/android/ion/ion.c:69:4: note: in expansion of macro 'WARN_ON'
WARN_ON();
^
--
In file included from ./arch/xtensa/include/generated/asm/bug.h:1:0,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from arch/xtensa/include/asm/current.h:16,
from include/linux/mutex.h:13,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from drivers/staging//android/ion/ion.c:18:
drivers/staging//android/ion/ion.c: In function 'ion_buffer_add':
>> include/asm-generic/bug.h:107:34: error: expected expression before ')' token
int __ret_warn_on = !!(condition); \
^
drivers/staging//android/ion/ion.c:69:4: note: in expansion of macro 'WARN_ON'
WARN_ON();
^

vim +/WARN_ON +69 drivers/staging/android/ion/ion.c

> 18 #include <linux/device.h>
19 #include <linux/err.h>
20 #include <linux/file.h>
21 #include <linux/freezer.h>
22 #include <linux/fs.h>
23 #include <linux/anon_inodes.h>
24 #include <linux/kthread.h>
25 #include <linux/list.h>
26 #include <linux/memblock.h>
27 #include <linux/miscdevice.h>
28 #include <linux/export.h>
29 #include <linux/mm.h>
30 #include <linux/mm_types.h>
31 #include <linux/rbtree.h>
32 #include <linux/slab.h>
33 #include <linux/seq_file.h>
34 #include <linux/uaccess.h>
35 #include <linux/vmalloc.h>
36 #include <linux/debugfs.h>
37 #include <linux/dma-buf.h>
38 #include <linux/idr.h>
39 #include <linux/sched/task.h>
40
41 #include "ion.h"
42
43 static struct ion_device *internal_dev;
44 static int heap_id;
45
46 bool ion_buffer_cached(struct ion_buffer *buffer)
47 {
48 return !!(buffer->flags & ION_FLAG_CACHED);
49 }
50
51 /* this function should only be called while dev->lock is held */
52 static void ion_buffer_add(struct ion_device *dev,
53 struct ion_buffer *buffer)
54 {
55 struct rb_node **p = &dev->buffers.rb_node;
56 struct rb_node *parent = NULL;
57 struct ion_buffer *entry;
58
59 while (*p) {
60 parent = *p;
61 entry = rb_entry(parent, struct ion_buffer, node);
62
63 if (buffer < entry) {
64 p = &(*p)->rb_left;
65 } else if (buffer > entry) {
66 p = &(*p)->rb_right;
67 } else {
68 pr_err("%s: buffer already found.", __func__);
> 69 WARN_ON();
70 }
71 }
72
73 rb_link_node(&buffer->node, parent, p);
74 rb_insert_color(&buffer->node, &dev->buffers);
75 }
76

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2017-09-01 11:08    [W:0.046 / U:0.048 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site