提交 708db268 编写于 作者: C Changcheng Deng 提交者: Kalle Valo

wilc1000: use min_t() to make code cleaner

Use min_t() in order to make code cleaner.
Reported-by: NZeal Robot <zealci@zte.com.cn>
Signed-off-by: NChangcheng Deng <deng.changcheng@zte.com.cn>
Signed-off-by: NKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211222070815.483009-1-deng.changcheng@zte.com.cn
上级 e109e361
......@@ -727,10 +727,7 @@ static int wilc_spi_dma_rw(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz)
int nbytes;
u8 rsp;
if (sz <= DATA_PKT_SZ)
nbytes = sz;
else
nbytes = DATA_PKT_SZ;
nbytes = min_t(u32, sz, DATA_PKT_SZ);
/*
* Data Response header
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册