lkml.org 
[lkml]   [2018]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Staging: fwserial: remove unnecessary parenthesis
Hi Quytelda,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.15 next-20180201]
[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/Quytelda-Kahja/Staging-fwserial-remove-unnecessary-parenthesis/20180202-093148
config: i386-randconfig-x019-201804 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

In file included from include/linux/kernel.h:10:0,
from drivers/staging//fwserial/dma_fifo.c:8:
drivers/staging//fwserial/dma_fifo.c: In function 'dma_fifo_out_complete':
>> drivers/staging//fwserial/dma_fifo.c:253:44: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses]
if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0,
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> drivers/staging//fwserial/dma_fifo.c:253:2: note: in expansion of macro 'if'
if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0,
^~
>> drivers/staging//fwserial/dma_fifo.c:253:6: note: in expansion of macro 'FAIL'
if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0,
^~~~
>> drivers/staging//fwserial/dma_fifo.c:253:44: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses]
if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0,
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> drivers/staging//fwserial/dma_fifo.c:253:2: note: in expansion of macro 'if'
if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0,
^~
>> drivers/staging//fwserial/dma_fifo.c:253:6: note: in expansion of macro 'FAIL'
if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0,
^~~~
>> drivers/staging//fwserial/dma_fifo.c:253:44: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses]
if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0,
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
______r = !!(cond); \
^~~~
>> drivers/staging//fwserial/dma_fifo.c:253:2: note: in expansion of macro 'if'
if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0,
^~
>> drivers/staging//fwserial/dma_fifo.c:253:6: note: in expansion of macro 'FAIL'
if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0,
^~~~

vim +253 drivers/staging//fwserial/dma_fifo.c

236
237 /**
238 * dma_fifo_out_complete - marks pended dma as completed
239 * @fifo: address of in-place "struct dma_fifo" which was read from
240 * @complete: address of structure for previously pended dma to mark completed
241 */
242 int dma_fifo_out_complete(struct dma_fifo *fifo, struct dma_pending *complete)
243 {
244 struct dma_pending *pending, *next, *tmp;
245
246 if (!fifo->data)
247 return -ENOENT;
248 if (fifo->corrupt)
249 return -ENXIO;
250 if (list_empty(&fifo->pending) && fifo->open == 0)
251 return -EINVAL;
252
> 253 if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0,

---
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: 2018-02-02 03:17    [W:0.070 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site