Skip to content

Commit

Permalink
liquidio: standardization: use min_t instead of custom macro
Browse files Browse the repository at this point in the history
Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com>
Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rick Farrington authored and David S. Miller committed Jul 28, 2017
1 parent fb5e760 commit ade0a79
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/cavium/liquidio/octeon_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module_param(console_bitmask, int, 0644);
MODULE_PARM_DESC(console_bitmask,
"Bitmask indicating which consoles have debug output redirected to syslog.");

#define MIN(a, b) min((a), (b))
#define CAST_ULL(v) ((u64)(v))

#define BOOTLOADER_PCI_READ_BUFFER_DATA_ADDR 0x0006c008
Expand Down Expand Up @@ -704,7 +703,7 @@ static int octeon_console_read(struct octeon_device *oct, u32 console_num,
if (bytes_to_read <= 0)
return bytes_to_read;

bytes_to_read = MIN(bytes_to_read, (s32)buf_size);
bytes_to_read = min_t(s32, bytes_to_read, buf_size);

/* Check to see if what we want to read is not contiguous, and limit
* ourselves to the contiguous block
Expand Down

0 comments on commit ade0a79

Please sign in to comment.