common/cnxk: fix build failure

Message ID 20211027131259.11775-1-ktejasree@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series common/cnxk: fix build failure |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS

Commit Message

Tejasree Kondoj Oct. 27, 2021, 1:12 p.m. UTC
  Fixing build failure with EXTRA_CFLAGS='-O1'.

Fixes: d85f9749f915 ("common/cnxk: add hash generation API")

Reported-by: Longfeng Liang <longfengx.liang@intel.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 drivers/common/cnxk/roc_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Anoob Joseph Oct. 28, 2021, 7:01 a.m. UTC | #1
> Subject: [PATCH] common/cnxk: fix build failure
> 
> Fixing build failure with EXTRA_CFLAGS='-O1'.
> 
> Fixes: d85f9749f915 ("common/cnxk: add hash generation API")
> 
> Reported-by: Longfeng Liang <longfengx.liang@intel.com>
> Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>

Acked-by: Anoob Joseph <anoobj@marvell.com>
  
Jerin Jacob Oct. 28, 2021, 12:59 p.m. UTC | #2
On Thu, Oct 28, 2021 at 12:31 PM Anoob Joseph <anoobj@marvell.com> wrote:
>
> > Subject: [PATCH] common/cnxk: fix build failure
> >
> > Fixing build failure with EXTRA_CFLAGS='-O1'.
> >
> > Fixes: d85f9749f915 ("common/cnxk: add hash generation API")
> >
> > Reported-by: Longfeng Liang <longfengx.liang@intel.com>
> > Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
>
> Acked-by: Anoob Joseph <anoobj@marvell.com>


Changed subject to: common/cnxk: fix build with -O1

Applied to dpdk-next-net-mrvl/for-next-net. Thanks
  
Ferruh Yigit Oct. 28, 2021, 5:32 p.m. UTC | #3
On 10/27/2021 2:12 PM, Tejasree Kondoj wrote:
> Fixing build failure with EXTRA_CFLAGS='-O1'.
> 

For future, can you please provide a little more detail in the commit
log related to the build error,
like which compiler or compiler version cause the issue, what is the
build error and put part of the log in commit log that can help to
people searching for the error log.
Plus if the build error is genuine build error, or if you are just
silencing compiler false positive.

> Fixes: d85f9749f915 ("common/cnxk: add hash generation API")
> 
> Reported-by: Longfeng Liang <longfengx.liang@intel.com>
> Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
> ---
>   drivers/common/cnxk/roc_hash.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/common/cnxk/roc_hash.c b/drivers/common/cnxk/roc_hash.c
> index 092286e41e..4a34c7fbf8 100644
> --- a/drivers/common/cnxk/roc_hash.c
> +++ b/drivers/common/cnxk/roc_hash.c
> @@ -23,7 +23,7 @@ roc_hash_sha1_gen(uint8_t *msg, uint32_t *hash)
>   			       0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476,
>   			       0xC3D2E1F0};
>   	int i;
> -	uint32_t temp;		/* Temporary word value */
> +	uint32_t temp = 0;	/* Temporary word value */
>   	uint32_t W[80];		/* Word sequence */
>   	uint32_t A, B, C, D, E; /* Word buffers */
>   
>
  
Tejasree Kondoj Oct. 29, 2021, 4:57 a.m. UTC | #4
Sure Ferruh.

Thanks
Tejasree

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Thursday, October 28, 2021 11:02 PM
> To: Tejasree Kondoj <ktejasree@marvell.com>; Akhil Goyal
> <gakhil@marvell.com>; Jiang@mx0b-0016f401.pphosted.com; YuX
> <yux.jiang@intel.com>; Longfeng Liang <longfengx.liang@intel.com>
> Cc: Anoob Joseph <anoobj@marvell.com>; dev@dpdk.org
> Subject: [EXT] Re: [dpdk-dev] [PATCH] common/cnxk: fix build failure
> 
> External Email
> 
> ----------------------------------------------------------------------
> On 10/27/2021 2:12 PM, Tejasree Kondoj wrote:
> > Fixing build failure with EXTRA_CFLAGS='-O1'.
> >
> 
> For future, can you please provide a little more detail in the commit log
> related to the build error, like which compiler or compiler version cause the
> issue, what is the build error and put part of the log in commit log that can
> help to people searching for the error log.
> Plus if the build error is genuine build error, or if you are just silencing
> compiler false positive.
> 
> > Fixes: d85f9749f915 ("common/cnxk: add hash generation API")
> >
> > Reported-by: Longfeng Liang <longfengx.liang@intel.com>
> > Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
> > ---
> >   drivers/common/cnxk/roc_hash.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/common/cnxk/roc_hash.c
> > b/drivers/common/cnxk/roc_hash.c index 092286e41e..4a34c7fbf8 100644
> > --- a/drivers/common/cnxk/roc_hash.c
> > +++ b/drivers/common/cnxk/roc_hash.c
> > @@ -23,7 +23,7 @@ roc_hash_sha1_gen(uint8_t *msg, uint32_t *hash)
> >   			       0x67452301, 0xEFCDAB89, 0x98BADCFE,
> 0x10325476,
> >   			       0xC3D2E1F0};
> >   	int i;
> > -	uint32_t temp;		/* Temporary word value */
> > +	uint32_t temp = 0;	/* Temporary word value */
> >   	uint32_t W[80];		/* Word sequence */
> >   	uint32_t A, B, C, D, E; /* Word buffers */
> >
> >
  

Patch

diff --git a/drivers/common/cnxk/roc_hash.c b/drivers/common/cnxk/roc_hash.c
index 092286e41e..4a34c7fbf8 100644
--- a/drivers/common/cnxk/roc_hash.c
+++ b/drivers/common/cnxk/roc_hash.c
@@ -23,7 +23,7 @@  roc_hash_sha1_gen(uint8_t *msg, uint32_t *hash)
 			       0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476,
 			       0xC3D2E1F0};
 	int i;
-	uint32_t temp;		/* Temporary word value */
+	uint32_t temp = 0;	/* Temporary word value */
 	uint32_t W[80];		/* Word sequence */
 	uint32_t A, B, C, D, E; /* Word buffers */