diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-03-05 15:25:49 +0300 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2026-03-09 16:24:47 +0300 |
| commit | 46ab50745309c3f230f6ae4328f280607ef2c69b (patch) | |
| tree | 95a11ad7324ee27da1cf225807f092cf7c105015 | |
| parent | 6c9b6c635148e3dc39ab1411fa5d9762596831ac (diff) | |
| download | linux-46ab50745309c3f230f6ae4328f280607ef2c69b.tar.xz | |
mmc: tifm_sd: Use min3() to simplify tifm_sd_transfer_data()
Use min3() to simplify tifm_sd_transfer_data().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
| -rw-r--r-- | drivers/mmc/host/tifm_sd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c index 2cd69c9e9571..c1f7d5b37911 100644 --- a/drivers/mmc/host/tifm_sd.c +++ b/drivers/mmc/host/tifm_sd.c @@ -193,9 +193,7 @@ static void tifm_sd_transfer_data(struct tifm_sd *host) pg = sg_page(&sg[host->sg_pos]) + (off >> PAGE_SHIFT); p_off = offset_in_page(off); - p_cnt = PAGE_SIZE - p_off; - p_cnt = min(p_cnt, cnt); - p_cnt = min(p_cnt, t_size); + p_cnt = min3(PAGE_SIZE - p_off, cnt, t_size); if (r_data->flags & MMC_DATA_READ) tifm_sd_read_fifo(host, pg, p_off, p_cnt); |
