diff mbox

[dpdk-dev,4/6] enic: eliminate useless cast

Message ID 1423925950-5201-4-git-send-email-shemming@brocade.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Stephen Hemminger Feb. 14, 2015, 2:59 p.m. UTC
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_pmd_enic/enic_clsf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Bruce Richardson Feb. 19, 2015, 2:57 p.m. UTC | #1
On Sat, Feb 14, 2015 at 09:59:08AM -0500, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

> ---
>  lib/librte_pmd_enic/enic_clsf.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/librte_pmd_enic/enic_clsf.c b/lib/librte_pmd_enic/enic_clsf.c
> index 577a382..b61d625 100644
> --- a/lib/librte_pmd_enic/enic_clsf.c
> +++ b/lib/librte_pmd_enic/enic_clsf.c
> @@ -121,9 +121,8 @@ int enic_fdir_add_fltr(struct enic *enic, struct rte_fdir_filter *params,
>  			enic->fdir.stats.f_add++;
>  			return -ENOSPC;
>  		}
> -		key = (struct enic_fdir_node *)rte_zmalloc(
> -			"enic_fdir_node",
> -			sizeof(struct enic_fdir_node), 0);
> +		key = rte_zmalloc("enic_fdir_node",
> +				  sizeof(struct enic_fdir_node), 0);
>  		if (!key) {
>  			enic->fdir.stats.f_add++;
>  			return -ENOMEM;
> -- 
> 2.1.4
>
diff mbox

Patch

diff --git a/lib/librte_pmd_enic/enic_clsf.c b/lib/librte_pmd_enic/enic_clsf.c
index 577a382..b61d625 100644
--- a/lib/librte_pmd_enic/enic_clsf.c
+++ b/lib/librte_pmd_enic/enic_clsf.c
@@ -121,9 +121,8 @@  int enic_fdir_add_fltr(struct enic *enic, struct rte_fdir_filter *params,
 			enic->fdir.stats.f_add++;
 			return -ENOSPC;
 		}
-		key = (struct enic_fdir_node *)rte_zmalloc(
-			"enic_fdir_node",
-			sizeof(struct enic_fdir_node), 0);
+		key = rte_zmalloc("enic_fdir_node",
+				  sizeof(struct enic_fdir_node), 0);
 		if (!key) {
 			enic->fdir.stats.f_add++;
 			return -ENOMEM;