diff options
author | David S. Miller <davem@davemloft.net> | 2017-07-27 20:29:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-27 20:29:35 -0400 |
commit | 1812bc43375a991e982086b400eb2a4acf9d6a01 (patch) | |
tree | 17230a58cf97bf52bf1fb2b4cf638dba11f9a040 | |
parent | fb5e7606b100668293f7b0c4a719f7a73233cbb1 (diff) | |
parent | 19d5c35950ad222e7f0cb076b428f0888f3f15f4 (diff) |
Merge branch 'liquidio-standardization-and-cleanup'
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>
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/octeon_console.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_console.c b/drivers/net/ethernet/cavium/liquidio/octeon_console.c index e08f7600f986..15ad1ab2c0c7 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_console.c +++ b/drivers/net/ethernet/cavium/liquidio/octeon_console.c | |||
@@ -42,9 +42,6 @@ module_param(console_bitmask, int, 0644); | |||
42 | MODULE_PARM_DESC(console_bitmask, | 42 | MODULE_PARM_DESC(console_bitmask, |
43 | "Bitmask indicating which consoles have debug output redirected to syslog."); | 43 | "Bitmask indicating which consoles have debug output redirected to syslog."); |
44 | 44 | ||
45 | #define MIN(a, b) min((a), (b)) | ||
46 | #define CAST_ULL(v) ((u64)(v)) | ||
47 | |||
48 | #define BOOTLOADER_PCI_READ_BUFFER_DATA_ADDR 0x0006c008 | 45 | #define BOOTLOADER_PCI_READ_BUFFER_DATA_ADDR 0x0006c008 |
49 | #define BOOTLOADER_PCI_READ_BUFFER_LEN_ADDR 0x0006c004 | 46 | #define BOOTLOADER_PCI_READ_BUFFER_LEN_ADDR 0x0006c004 |
50 | #define BOOTLOADER_PCI_READ_BUFFER_OWNER_ADDR 0x0006c000 | 47 | #define BOOTLOADER_PCI_READ_BUFFER_OWNER_ADDR 0x0006c000 |
@@ -234,7 +231,7 @@ static int __cvmx_bootmem_check_version(struct octeon_device *oct, | |||
234 | (exact_match && major_version != exact_match)) { | 231 | (exact_match && major_version != exact_match)) { |
235 | dev_err(&oct->pci_dev->dev, "bootmem ver mismatch %d.%d addr:0x%llx\n", | 232 | dev_err(&oct->pci_dev->dev, "bootmem ver mismatch %d.%d addr:0x%llx\n", |
236 | major_version, minor_version, | 233 | major_version, minor_version, |
237 | CAST_ULL(oct->bootmem_desc_addr)); | 234 | (long long)oct->bootmem_desc_addr); |
238 | return -1; | 235 | return -1; |
239 | } else { | 236 | } else { |
240 | return 0; | 237 | return 0; |
@@ -704,7 +701,7 @@ static int octeon_console_read(struct octeon_device *oct, u32 console_num, | |||
704 | if (bytes_to_read <= 0) | 701 | if (bytes_to_read <= 0) |
705 | return bytes_to_read; | 702 | return bytes_to_read; |
706 | 703 | ||
707 | bytes_to_read = MIN(bytes_to_read, (s32)buf_size); | 704 | bytes_to_read = min_t(s32, bytes_to_read, buf_size); |
708 | 705 | ||
709 | /* Check to see if what we want to read is not contiguous, and limit | 706 | /* Check to see if what we want to read is not contiguous, and limit |
710 | * ourselves to the contiguous block | 707 | * ourselves to the contiguous block |