mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
wifi: wilc1000: Use min() to improve code
Use min() to reduce the code and improve its readability. Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Link: https://patch.msgid.link/20250715121721.266713-7-rongqianfeng@vivo.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
37fa920819
commit
219cbc4d71
|
|
@ -1287,10 +1287,7 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
|
|||
|
||||
offset += 8;
|
||||
while (((int)size) && (offset < buffer_size)) {
|
||||
if (size <= blksz)
|
||||
size2 = size;
|
||||
else
|
||||
size2 = blksz;
|
||||
size2 = min(size, blksz);
|
||||
|
||||
memcpy(dma_buffer, &buffer[offset], size2);
|
||||
ret = wilc->hif_func->hif_block_tx(wilc, addr,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user