[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <164011040619.7951.14619016402908057909.kvalo@kernel.org>
Date: Tue, 21 Dec 2021 18:13:27 +0000 (UTC)
From: Kalle Valo <kvalo@...nel.org>
To: cgel.zte@...il.com
Cc: ajay.kathat@...rochip.com, claudiu.beznea@...rochip.com,
davem@...emloft.net, kuba@...nel.org,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Changcheng Deng <deng.changcheng@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] wilc1000: use min() to make code cleaner
cgel.zte@...il.com wrote:
> From: Changcheng Deng <deng.changcheng@....com.cn>
>
> Use min() in order to make code cleaner.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@....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
Powered by blists - more mailing lists