[v5,01/13] hash: remove some dead code

Message ID 20231220153607.718606-2-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series Detect superfluous newline in logs |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

David Marchand Dec. 20, 2023, 3:35 p.m. UTC
  This macro is not used.

Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/hash/rte_cuckoo_hash.h | 11 -----------
 1 file changed, 11 deletions(-)
  

Comments

Ruifeng Wang Dec. 21, 2023, 5:58 a.m. UTC | #1
On 2023/12/20 11:35 PM, David Marchand wrote:
> This macro is not used.
>
> Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
> Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>   lib/hash/rte_cuckoo_hash.h | 11 -----------
>   1 file changed, 11 deletions(-)
>
> diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h
> index f7afc4dd79..8ea793c66e 100644
> --- a/lib/hash/rte_cuckoo_hash.h
> +++ b/lib/hash/rte_cuckoo_hash.h
> @@ -29,17 +29,6 @@
>   #define RETURN_IF_TRUE(cond, retval)
>   #endif
>
> -#if defined(RTE_LIBRTE_HASH_DEBUG)
> -#define ERR_IF_TRUE(cond, fmt, args...) do { \
> -     if (cond) { \
> -             RTE_LOG(ERR, HASH, fmt, ##args); \
> -             return; \
> -     } \
> -} while (0)
> -#else
> -#define ERR_IF_TRUE(cond, fmt, args...)
> -#endif
> -
>   #include <rte_hash_crc.h>
>   #include <rte_jhash.h>
>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
  
Ruifeng Wang Dec. 21, 2023, 6:26 a.m. UTC | #2
On 2023/12/20 11:35 PM, David Marchand wrote:
> This macro is not used.
> 
> Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
> Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>   lib/hash/rte_cuckoo_hash.h | 11 -----------
>   1 file changed, 11 deletions(-)
> 
> diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h
> index f7afc4dd79..8ea793c66e 100644
> --- a/lib/hash/rte_cuckoo_hash.h
> +++ b/lib/hash/rte_cuckoo_hash.h
> @@ -29,17 +29,6 @@
>   #define RETURN_IF_TRUE(cond, retval)
>   #endif
>   
> -#if defined(RTE_LIBRTE_HASH_DEBUG)
> -#define ERR_IF_TRUE(cond, fmt, args...) do { \
> -	if (cond) { \
> -		RTE_LOG(ERR, HASH, fmt, ##args); \
> -		return; \
> -	} \
> -} while (0)
> -#else
> -#define ERR_IF_TRUE(cond, fmt, args...)
> -#endif
> -
>   #include <rte_hash_crc.h>
>   #include <rte_jhash.h>
>   
To correct the disclaimer issue.

Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
  

Patch

diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h
index f7afc4dd79..8ea793c66e 100644
--- a/lib/hash/rte_cuckoo_hash.h
+++ b/lib/hash/rte_cuckoo_hash.h
@@ -29,17 +29,6 @@ 
 #define RETURN_IF_TRUE(cond, retval)
 #endif
 
-#if defined(RTE_LIBRTE_HASH_DEBUG)
-#define ERR_IF_TRUE(cond, fmt, args...) do { \
-	if (cond) { \
-		RTE_LOG(ERR, HASH, fmt, ##args); \
-		return; \
-	} \
-} while (0)
-#else
-#define ERR_IF_TRUE(cond, fmt, args...)
-#endif
-
 #include <rte_hash_crc.h>
 #include <rte_jhash.h>