diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-01-29 00:23:29 +0300 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-02-10 18:47:38 +0300 |
commit | 682baa24e2a2adbf4db615eae38a553fb16564b4 (patch) | |
tree | d602078b627a5c9ef18f3b3eedb2f3c0d15a5c33 | |
parent | 45e21277f94753c3e3429e63e5785888ee1ead4a (diff) | |
download | linux-682baa24e2a2adbf4db615eae38a553fb16564b4.tar.xz |
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 <andriy.shevchenko@linux.intel.com>
-rw-r--r-- | drivers/platform/x86/dell_rbu.c | 4 |
1 files changed, 1 insertions, 3 deletions
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); |