[dpdk-dev,RFC,4/4] enic: remove anscillary assignment
diff mbox

Message ID 20170926185329.2776-5-aconole@redhat.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Aaron Conole Sept. 26, 2017, 6:53 p.m. UTC
The assignment at initialization is overwritten immediately.  Drop the
assignment.

Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 drivers/net/enic/base/vnic_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

John Daley Oct. 10, 2017, 5:32 p.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Aaron Conole
> Sent: Tuesday, September 26, 2017 11:53 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [RFC 4/4] enic: remove anscillary assignment
> 
> The assignment at initialization is overwritten immediately.  Drop the
> assignment.
> 
> Signed-off-by: Aaron Conole <aconole@redhat.com>
> ---
>  drivers/net/enic/base/vnic_dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/enic/base/vnic_dev.c
> b/drivers/net/enic/base/vnic_dev.c
> index a4b7f4b..932667f 100644
> --- a/drivers/net/enic/base/vnic_dev.c
> +++ b/drivers/net/enic/base/vnic_dev.c
> @@ -272,7 +272,7 @@ int vnic_dev_alloc_desc_ring(struct vnic_dev *vdev,
>  	__attribute__((unused)) unsigned int socket_id,
>  	char *z_name)
>  {
> -	void *alloc_addr = NULL;
> +	void *alloc_addr;
>  	dma_addr_t alloc_pa = 0;
> 
>  	vnic_dev_desc_ring_size(ring, desc_count, desc_size);
> --
> 2.9.5

Reviewed-by: John Daley <johndale@cisco.com>

Thanks,
Johnd

Patch
diff mbox

diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c
index a4b7f4b..932667f 100644
--- a/drivers/net/enic/base/vnic_dev.c
+++ b/drivers/net/enic/base/vnic_dev.c
@@ -272,7 +272,7 @@  int vnic_dev_alloc_desc_ring(struct vnic_dev *vdev,
 	__attribute__((unused)) unsigned int socket_id,
 	char *z_name)
 {
-	void *alloc_addr = NULL;
+	void *alloc_addr;
 	dma_addr_t alloc_pa = 0;
 
 	vnic_dev_desc_ring_size(ring, desc_count, desc_size);