crypto/kasumi: fix gcc 10 fno-common error

Message ID 20200505125442.18048-1-ktraynor@redhat.com (mailing list archive)
State Superseded, archived
Headers
Series crypto/kasumi: fix gcc 10 fno-common error |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS

Commit Message

Kevin Traynor May 5, 2020, 12:54 p.m. UTC
  gcc 10 defaults to fno-common and it reports:

crypto_kasumi_rte_kasumi_pmd_ops.c.o:(.data.rel+0x0):
multiple definition of `rte_kasumi_pmd_ops';
crypto_kasumi_rte_kasumi_pmd.c.o:(.bss+0x8): first defined here

Fix by making rte_kasumi_pmd_ops extern in the header file.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 drivers/crypto/kasumi/kasumi_pmd_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

De Lara Guarch, Pablo May 5, 2020, 5:22 p.m. UTC | #1
Hi Kevin,

> -----Original Message-----
> From: Kevin Traynor <ktraynor@redhat.com>
> Sent: Tuesday, May 5, 2020 1:55 PM
> To: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: david.marchand@redhat.com; Kevin Traynor <ktraynor@redhat.com>
> Subject: [PATCH] crypto/kasumi: fix gcc 10 fno-common error
> 
> gcc 10 defaults to fno-common and it reports:
> 
> crypto_kasumi_rte_kasumi_pmd_ops.c.o:(.data.rel+0x0):
> multiple definition of `rte_kasumi_pmd_ops';
> crypto_kasumi_rte_kasumi_pmd.c.o:(.bss+0x8): first defined here
> 
> Fix by making rte_kasumi_pmd_ops extern in the header file.
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>

Patch looks good, but you are missing fixes line and CC stable, right?
Apart from that:

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
  
Kevin Traynor May 6, 2020, 9:45 a.m. UTC | #2
On 05/05/2020 18:22, De Lara Guarch, Pablo wrote:
> Hi Kevin,
> 
>> -----Original Message-----
>> From: Kevin Traynor <ktraynor@redhat.com>
>> Sent: Tuesday, May 5, 2020 1:55 PM
>> To: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
>> Cc: david.marchand@redhat.com; Kevin Traynor <ktraynor@redhat.com>
>> Subject: [PATCH] crypto/kasumi: fix gcc 10 fno-common error
>>
>> gcc 10 defaults to fno-common and it reports:
>>
>> crypto_kasumi_rte_kasumi_pmd_ops.c.o:(.data.rel+0x0):
>> multiple definition of `rte_kasumi_pmd_ops';
>> crypto_kasumi_rte_kasumi_pmd.c.o:(.bss+0x8): first defined here
>>
>> Fix by making rte_kasumi_pmd_ops extern in the header file.
>>
>> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> 
> Patch looks good, but you are missing fixes line and CC stable, right?
> Apart from that:
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 

Thanks Pablo, sent v2 with the tags and your ack.
  

Patch

diff --git a/drivers/crypto/kasumi/kasumi_pmd_private.h b/drivers/crypto/kasumi/kasumi_pmd_private.h
index b7f1c428b..abedcd616 100644
--- a/drivers/crypto/kasumi/kasumi_pmd_private.h
+++ b/drivers/crypto/kasumi/kasumi_pmd_private.h
@@ -77,5 +77,5 @@  kasumi_set_session_parameters(MB_MGR *mgr, struct kasumi_session *sess,
 
 /** device specific operations function pointer structure */
-struct rte_cryptodev_ops *rte_kasumi_pmd_ops;
+extern struct rte_cryptodev_ops *rte_kasumi_pmd_ops;
 
 #endif /* _KASUMI_PMD_PRIVATE_H_ */