summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-01-28 23:23:29 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-02-10 17:47:38 +0200
commit682baa24e2a2adbf4db615eae38a553fb16564b4 (patch)
treed602078b627a5c9ef18f3b3eedb2f3c0d15a5c33 /drivers/platform
parent45e21277f94753c3e3429e63e5785888ee1ead4a (diff)
downloadlinux-stable-682baa24e2a2adbf4db615eae38a553fb16564b4.tar.gz
linux-stable-682baa24e2a2adbf4db615eae38a553fb16564b4.tar.bz2
linux-stable-682baa24e2a2adbf4db615eae38a553fb16564b4.zip
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/dell_rbu.c4
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);