Skip to content

Commit

Permalink
Merge branch 'liquidio-standardization-and-cleanup'
Browse files Browse the repository at this point in the history
Rick Farrington says:

====================
liquidio: standardization and cleanup

This patchset corrects some non-standard macro usage.

1. Replaced custom MIN macro with use of standard 'min_t'.
2. Removed cryptic and misleading macro 'CAST_ULL'.

change log:
V1 -> V2:
  1. Add driver cleanup of macro 'CAST_ULL'.
V2 -> V3:
  1. Remove extra parentheses from previous usage of macro 'CAST_ULL'.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 28, 2017
2 parents fb5e760 + 19d5c35 commit 1812bc4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/net/ethernet/cavium/liquidio/octeon_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +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
#define BOOTLOADER_PCI_READ_BUFFER_LEN_ADDR 0x0006c004
#define BOOTLOADER_PCI_READ_BUFFER_OWNER_ADDR 0x0006c000
Expand Down Expand Up @@ -234,7 +231,7 @@ static int __cvmx_bootmem_check_version(struct octeon_device *oct,
(exact_match && major_version != exact_match)) {
dev_err(&oct->pci_dev->dev, "bootmem ver mismatch %d.%d addr:0x%llx\n",
major_version, minor_version,
CAST_ULL(oct->bootmem_desc_addr));
(long long)oct->bootmem_desc_addr);
return -1;
} else {
return 0;
Expand Down Expand Up @@ -704,7 +701,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 1812bc4

Please sign in to comment.