Skip to content

Commit

Permalink
platform/x86: dell_rbu: Use max_t() to get rid of casting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko committed Feb 10, 2020
1 parent 45e2127 commit 682baa2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/platform/x86/dell_rbu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 682baa2

Please sign in to comment.