DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/cpfl: fix build error for debian 32-bit
@ 2024-07-10 14:53 Bruce Richardson
  2024-07-10 15:07 ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2024-07-10 14:53 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable

When building for debian 11 32-bit, errors were reported with cpfl
driver[1]. The error is due to comparing signed and unsigned values:

../drivers/net/cpfl/cpfl_flow_parser.c:1699:29: error: comparison of
  integer expressions of different signedness: 'long int' and
  'uint32_t' {aka 'unsigned int'} [-Werror=sign-compare]

Fix the issue by using an explicitly cast for the return value from
atol.

Fixes: c10881d3ee74 ("net/cpfl: support flow prog action")
Cc: stable@dpdk.org

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

[1] https://build.opensuse.org/package/live_build_log/home:bluca:dpdk/dpdk/Debian_11/i586
---
 drivers/net/cpfl/cpfl_flow_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cpfl/cpfl_flow_parser.c b/drivers/net/cpfl/cpfl_flow_parser.c
index a8f0488f21..40569ddc6f 100644
--- a/drivers/net/cpfl/cpfl_flow_parser.c
+++ b/drivers/net/cpfl/cpfl_flow_parser.c
@@ -1696,7 +1696,7 @@ cpfl_parse_check_prog_action(struct cpfl_flow_js_mr_key_action *key_act,
 	bool check_name;
 
 	check_name = key_act->prog.has_name ? strcmp(prog->name, key_act->prog.name) == 0
-					    : atol(prog->name) == key_act->prog.id;
+					    : (uint32_t)atol(prog->name) == key_act->prog.id;
 	if (!check_name) {
 		PMD_DRV_LOG(ERR, "Not support this prog type: %s.", prog->name);
 		return -EINVAL;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/cpfl: fix build error for debian 32-bit
  2024-07-10 14:53 [PATCH] net/cpfl: fix build error for debian 32-bit Bruce Richardson
@ 2024-07-10 15:07 ` David Marchand
  2024-07-10 16:10   ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2024-07-10 15:07 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, stable

On Wed, Jul 10, 2024 at 4:54 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> When building for debian 11 32-bit, errors were reported with cpfl
> driver[1]. The error is due to comparing signed and unsigned values:
>
> ../drivers/net/cpfl/cpfl_flow_parser.c:1699:29: error: comparison of
>   integer expressions of different signedness: 'long int' and
>   'uint32_t' {aka 'unsigned int'} [-Werror=sign-compare]
>
> Fix the issue by using an explicitly cast for the return value from
> atol.
>
> Fixes: c10881d3ee74 ("net/cpfl: support flow prog action")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/cpfl: fix build error for debian 32-bit
  2024-07-10 15:07 ` David Marchand
@ 2024-07-10 16:10   ` Bruce Richardson
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2024-07-10 16:10 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, stable, bluca

On Wed, Jul 10, 2024 at 05:07:30PM +0200, David Marchand wrote:
> On Wed, Jul 10, 2024 at 4:54 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > When building for debian 11 32-bit, errors were reported with cpfl
> > driver[1]. The error is due to comparing signed and unsigned values:
> >
> > ../drivers/net/cpfl/cpfl_flow_parser.c:1699:29: error: comparison of
> >   integer expressions of different signedness: 'long int' and
> >   'uint32_t' {aka 'unsigned int'} [-Werror=sign-compare]
> >
> > Fix the issue by using an explicitly cast for the return value from
> > atol.
> >
> > Fixes: c10881d3ee74 ("net/cpfl: support flow prog action")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
> 
Applied to dpdk-next-net-intel

/Bruce

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-10 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-10 14:53 [PATCH] net/cpfl: fix build error for debian 32-bit Bruce Richardson
2024-07-10 15:07 ` David Marchand
2024-07-10 16:10   ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).