netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/2] liquidio: standardization and cleanup
@ 2017-07-26 19:09 Felix Manlunas
  2017-07-26 19:10 ` [PATCH v3 net-next 1/2] liquidio: standardization: use min_t instead of custom macro Felix Manlunas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Felix Manlunas @ 2017-07-26 19:09 UTC (permalink / raw)
  To: davem
  Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla,
	ricardo.farrington

From: Rick Farrington <ricardo.farrington@cavium.com>

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'.

Rick Farrington (2):
  liquidio: standardization: use min_t instead of custom macro
  liquidio: cleanup: removed cryptic and misleading macro

 drivers/net/ethernet/cavium/liquidio/octeon_console.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

-- 
2.9.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 net-next 1/2] liquidio: standardization: use min_t instead of custom macro
  2017-07-26 19:09 [PATCH v3 net-next 0/2] liquidio: standardization and cleanup Felix Manlunas
@ 2017-07-26 19:10 ` Felix Manlunas
  2017-07-26 19:11 ` [PATCH v3 net-next 2/2] liquidio: cleanup: removed cryptic and misleading macro Felix Manlunas
  2017-07-28  0:29 ` [PATCH v3 net-next 0/2] liquidio: standardization and cleanup David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Felix Manlunas @ 2017-07-26 19:10 UTC (permalink / raw)
  To: davem
  Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla,
	ricardo.farrington

From: Rick Farrington <ricardo.farrington@cavium.com>

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>
---
 drivers/net/ethernet/cavium/liquidio/octeon_console.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_console.c b/drivers/net/ethernet/cavium/liquidio/octeon_console.c
index e08f760..501ad95 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_console.c
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_console.c
@@ -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
@@ -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
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3 net-next 2/2] liquidio: cleanup: removed cryptic and misleading macro
  2017-07-26 19:09 [PATCH v3 net-next 0/2] liquidio: standardization and cleanup Felix Manlunas
  2017-07-26 19:10 ` [PATCH v3 net-next 1/2] liquidio: standardization: use min_t instead of custom macro Felix Manlunas
@ 2017-07-26 19:11 ` Felix Manlunas
  2017-07-28  0:29 ` [PATCH v3 net-next 0/2] liquidio: standardization and cleanup David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Felix Manlunas @ 2017-07-26 19:11 UTC (permalink / raw)
  To: davem
  Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla,
	ricardo.farrington

From: Rick Farrington <ricardo.farrington@cavium.com>

Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
---
 drivers/net/ethernet/cavium/liquidio/octeon_console.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_console.c b/drivers/net/ethernet/cavium/liquidio/octeon_console.c
index 501ad95..15ad1ab 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_console.c
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_console.c
@@ -42,8 +42,6 @@ module_param(console_bitmask, int, 0644);
 MODULE_PARM_DESC(console_bitmask,
 		 "Bitmask indicating which consoles have debug output redirected to syslog.");
 
-#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
@@ -233,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;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 net-next 0/2] liquidio: standardization and cleanup
  2017-07-26 19:09 [PATCH v3 net-next 0/2] liquidio: standardization and cleanup Felix Manlunas
  2017-07-26 19:10 ` [PATCH v3 net-next 1/2] liquidio: standardization: use min_t instead of custom macro Felix Manlunas
  2017-07-26 19:11 ` [PATCH v3 net-next 2/2] liquidio: cleanup: removed cryptic and misleading macro Felix Manlunas
@ 2017-07-28  0:29 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-07-28  0:29 UTC (permalink / raw)
  To: felix.manlunas
  Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla,
	ricardo.farrington

From: Felix Manlunas <felix.manlunas@cavium.com>
Date: Wed, 26 Jul 2017 12:09:45 -0700

> From: Rick Farrington <ricardo.farrington@cavium.com>
> 
> 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'.

Series applied, thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-28  0:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-26 19:09 [PATCH v3 net-next 0/2] liquidio: standardization and cleanup Felix Manlunas
2017-07-26 19:10 ` [PATCH v3 net-next 1/2] liquidio: standardization: use min_t instead of custom macro Felix Manlunas
2017-07-26 19:11 ` [PATCH v3 net-next 2/2] liquidio: cleanup: removed cryptic and misleading macro Felix Manlunas
2017-07-28  0:29 ` [PATCH v3 net-next 0/2] liquidio: standardization and cleanup David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).