lkml.org 
[lkml]   [2021]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] wilc1000: use min() to make code cleaner
From
Date
cgel.zte@gmail.com wrote:

> From: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> Use min() in order to make code cleaner.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>

Failed to compile:

In file included from ./include/linux/kernel.h:17,
from ./include/linux/clk.h:13,
from drivers/net/wireless/microchip/wilc1000/spi.c:7:
drivers/net/wireless/microchip/wilc1000/spi.c: In function 'wilc_spi_dma_rw':
./include/linux/minmax.h:20:35: error: comparison of distinct pointer types lacks a cast [-Werror]
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^~
./include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
./include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
./include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
45 | #define min(x, y) __careful_cmp(x, y, <)
| ^~~~~~~~~~~~~
drivers/net/wireless/microchip/wilc1000/spi.c:677:26: note: in expansion of macro 'min'
677 | nbytes = min(sz, DATA_PKT_SZ);
| ^~~
cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:287: drivers/net/wireless/microchip/wilc1000/spi.o] Error 1
make[4]: *** [scripts/Makefile.build:549: drivers/net/wireless/microchip/wilc1000] Error 2
make[3]: *** [scripts/Makefile.build:549: drivers/net/wireless/microchip] Error 2
make[2]: *** [scripts/Makefile.build:549: drivers/net/wireless] Error 2
make[1]: *** [scripts/Makefile.build:549: drivers/net] Error 2
make: *** [Makefile:1846: drivers] Error 2

Patch set to Changes Requested.

--
https://patchwork.kernel.org/project/linux-wireless/patch/20211216091713.449841-1-deng.changcheng@zte.com.cn/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

\
 
 \ /
  Last update: 2021-12-21 19:14    [W:0.053 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site