From: Andy Shevchenko Date: Tue, 28 Jan 2020 21:23:29 +0000 (+0200) Subject: platform/x86: dell_rbu: Use max_t() to get rid of casting X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~2533^2~65 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=682baa24e2a2adbf4db615eae38a553fb16564b4;p=linux.git platform/x86: dell_rbu: Use max_t() to get rid of casting There is no need to cast both values in max_t() macro, so, use it. Signed-off-by: Andy Shevchenko --- diff --git a/drivers/platform/x86/dell_rbu.c b/drivers/platform/x86/dell_rbu.c index 416a7db9966a..e0fe7e833921 100644 --- a/drivers/platform/x86/dell_rbu.c +++ b/drivers/platform/x86/dell_rbu.c @@ -134,9 +134,7 @@ static int create_packet(void *data, size_t length) * due to BIOS errata. This shouldn't be used for higher floors * or you will run out of mem trying to allocate the array. */ - packet_array_size = max( - (unsigned int)(allocation_floor / rbu_data.packetsize), - (unsigned int)1); + packet_array_size = max_t(unsigned int, allocation_floor / rbu_data.packetsize, 1); invalid_addr_packet_array = kcalloc(packet_array_size, sizeof(void *), GFP_KERNEL);