DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: fix missing parenthesis
@ 2015-01-09 15:05 Michal Jastrzebski
  2015-01-15 13:16 ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Jastrzebski @ 2015-01-09 15:05 UTC (permalink / raw)
  To: dev

From: Pawel Wodkowski <pawelx.wodkowski@intel.com>


Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
---
 lib/librte_ether/rte_ethdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 4c1a494..d13301a 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -848,7 +848,7 @@ rte_eth_dev_config_restore(uint8_t port_id)
 
 		/* add address to the hardware */
 		if  (*dev->dev_ops->mac_addr_add &&
-			dev->data->mac_pool_sel[i] & (1ULL << pool))
+			(dev->data->mac_pool_sel[i] & (1ULL << pool)))
 			(*dev->dev_ops->mac_addr_add)(dev, &addr, i, pool);
 		else {
 			PMD_DEBUG_TRACE("port %d: MAC address array not supported\n",
-- 
1.7.9.5

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

* Re: [dpdk-dev] [PATCH] ethdev: fix missing parenthesis
  2015-01-09 15:05 [dpdk-dev] [PATCH] ethdev: fix missing parenthesis Michal Jastrzebski
@ 2015-01-15 13:16 ` Thomas Monjalon
  2015-01-16  9:40   ` Wodkowski, PawelX
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2015-01-15 13:16 UTC (permalink / raw)
  To: Michal Jastrzebski; +Cc: dev

2015-01-09 16:05, Michal Jastrzebski:
> Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>

Good catch!
Was introduced in commit 4bdefaade6d1 (VMDQ enhancements).
Note that quite often, when a patch contains too much things,
we miss this kind of bugs. That's a reason to well split patches.

Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Applied

Thanks
-- 
Thomas

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

* Re: [dpdk-dev] [PATCH] ethdev: fix missing parenthesis
  2015-01-15 13:16 ` Thomas Monjalon
@ 2015-01-16  9:40   ` Wodkowski, PawelX
  2015-01-16 17:04     ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Wodkowski, PawelX @ 2015-01-16  9:40 UTC (permalink / raw)
  To: Thomas Monjalon, Jastrzebski, MichalX K; +Cc: dev

> Good catch!
> Was introduced in commit 4bdefaade6d1 (VMDQ enhancements).
> Note that quite often, when a patch contains too much things,
> we miss this kind of bugs. That's a reason to well split patches.
> 

What is most surprising I did not spotted this, neither  the compiler
what I think it should. It was my IDE which pointed possible bug.

Are we using '-Wparentheses' switch? If not, we should consider
to use this switch?

Pawel

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

* Re: [dpdk-dev] [PATCH] ethdev: fix missing parenthesis
  2015-01-16  9:40   ` Wodkowski, PawelX
@ 2015-01-16 17:04     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-01-16 17:04 UTC (permalink / raw)
  To: Wodkowski, PawelX; +Cc: dev

2015-01-16 09:40, Wodkowski, PawelX:
> > Good catch!
> > Was introduced in commit 4bdefaade6d1 (VMDQ enhancements).
> > Note that quite often, when a patch contains too much things,
> > we miss this kind of bugs. That's a reason to well split patches.
> 
> What is most surprising I did not spotted this, neither  the compiler
> what I think it should. It was my IDE which pointed possible bug.
> 
> Are we using '-Wparentheses' switch? If not, we should consider
> to use this switch?

It's already included in -Wall which is set in WERROR_FLAGS.

-- 
Thomas

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

end of thread, other threads:[~2015-01-16 17:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-09 15:05 [dpdk-dev] [PATCH] ethdev: fix missing parenthesis Michal Jastrzebski
2015-01-15 13:16 ` Thomas Monjalon
2015-01-16  9:40   ` Wodkowski, PawelX
2015-01-16 17:04     ` Thomas Monjalon

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).