Skip to content

Commit 1812bc4

Browse files
committed
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 <[email protected]>
2 parents fb5e760 + 19d5c35 commit 1812bc4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/net/ethernet/cavium/liquidio/octeon_console.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ module_param(console_bitmask, int, 0644);
4242
MODULE_PARM_DESC(console_bitmask,
4343
"Bitmask indicating which consoles have debug output redirected to syslog.");
4444

45-
#define MIN(a, b) min((a), (b))
46-
#define CAST_ULL(v) ((u64)(v))
47-
4845
#define BOOTLOADER_PCI_READ_BUFFER_DATA_ADDR 0x0006c008
4946
#define BOOTLOADER_PCI_READ_BUFFER_LEN_ADDR 0x0006c004
5047
#define BOOTLOADER_PCI_READ_BUFFER_OWNER_ADDR 0x0006c000
@@ -234,7 +231,7 @@ static int __cvmx_bootmem_check_version(struct octeon_device *oct,
234231
(exact_match && major_version != exact_match)) {
235232
dev_err(&oct->pci_dev->dev, "bootmem ver mismatch %d.%d addr:0x%llx\n",
236233
major_version, minor_version,
237-
CAST_ULL(oct->bootmem_desc_addr));
234+
(long long)oct->bootmem_desc_addr);
238235
return -1;
239236
} else {
240237
return 0;
@@ -704,7 +701,7 @@ static int octeon_console_read(struct octeon_device *oct, u32 console_num,
704701
if (bytes_to_read <= 0)
705702
return bytes_to_read;
706703

707-
bytes_to_read = MIN(bytes_to_read, (s32)buf_size);
704+
bytes_to_read = min_t(s32, bytes_to_read, buf_size);
708705

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

0 commit comments

Comments
 (0)