Commit 7434564c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

staging: greybus: sdio: fix min() type check

The 0-day bot pointed out a type difference in one min() call, so fix it
up by being explicit about the type being compared.
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 148e0b8f
...@@ -136,7 +136,7 @@ static int gb_sdio_get_caps(struct gb_sdio_host *host) ...@@ -136,7 +136,7 @@ static int gb_sdio_get_caps(struct gb_sdio_host *host)
data_max = min(data_max - sizeof(struct gb_sdio_transfer_request), data_max = min(data_max - sizeof(struct gb_sdio_transfer_request),
data_max - sizeof(struct gb_sdio_transfer_response)); data_max - sizeof(struct gb_sdio_transfer_response));
blksz = min(le16_to_cpu(response.max_blk_size), data_max); blksz = min_t(u16, le16_to_cpu(response.max_blk_size), data_max);
blksz = max_t(u32, 512, blksz); blksz = max_t(u32, 512, blksz);
mmc->max_blk_size = rounddown_pow_of_two(blksz); mmc->max_blk_size = rounddown_pow_of_two(blksz);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment