DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/virtio-user: Fix missing brackets in if condition
@ 2016-07-12  9:30 Maxime Coquelin
  2016-07-12  9:35 ` Thomas Monjalon
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Maxime Coquelin @ 2016-07-12  9:30 UTC (permalink / raw)
  To: huawei.xie, yuanhan.liu; +Cc: dev, Maxime Coquelin, Jianfeng Tan

The error is reported using test build script:

$ scripts/test-build.sh x86_64-native-linuxapp-gcc
...
drivers/net/virtio/virtio_user_ethdev.c: In function ‘virtio_user_pmd_devinit’:
drivers/net/virtio/virtio_user_ethdev.c:345:2: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
  if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1)
    ^~

Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked")

Cc: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 782d7d3..6b4f66e 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -342,7 +342,7 @@ virtio_user_pmd_devinit(const char *name, const char *params)
 		goto end;
 	}
 
-	if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1)
+	if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1) {
 		ret = rte_kvargs_process(kvlist, VIRTIO_USER_ARG_PATH,
 					 &get_string_arg, &path);
 		if (ret < 0) {
@@ -350,7 +350,7 @@ virtio_user_pmd_devinit(const char *name, const char *params)
 				     VIRTIO_USER_ARG_PATH);
 			goto end;
 		}
-	else {
+	} else {
 		PMD_INIT_LOG(ERR, "arg %s is mandatory for virtio-user\n",
 			  VIRTIO_USER_ARG_QUEUE_SIZE);
 		goto end;
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH] net/virtio-user: Fix missing brackets in if condition
  2016-07-12  9:30 [dpdk-dev] [PATCH] net/virtio-user: Fix missing brackets in if condition Maxime Coquelin
@ 2016-07-12  9:35 ` Thomas Monjalon
  2016-07-12  9:36   ` Maxime Coquelin
  2016-07-12 12:11 ` Yuanhan Liu
  2016-07-14 16:31 ` [dpdk-dev] " viktorin
  2 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2016-07-12  9:35 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, huawei.xie, yuanhan.liu, Jianfeng Tan

Hi,

2016-07-12 11:30, Maxime Coquelin:
> The error is reported using test build script:
> 
> $ scripts/test-build.sh x86_64-native-linuxapp-gcc
> ...
> drivers/net/virtio/virtio_user_ethdev.c: In function ‘virtio_user_pmd_devinit’:
> drivers/net/virtio/virtio_user_ethdev.c:345:2: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]

Are you using gcc 6 ?

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

* Re: [dpdk-dev] [PATCH] net/virtio-user: Fix missing brackets in if condition
  2016-07-12  9:35 ` Thomas Monjalon
@ 2016-07-12  9:36   ` Maxime Coquelin
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Coquelin @ 2016-07-12  9:36 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, huawei.xie, yuanhan.liu, Jianfeng Tan


On 07/12/2016 11:35 AM, Thomas Monjalon wrote:
> Hi,
>
> 2016-07-12 11:30, Maxime Coquelin:
>> The error is reported using test build script:
>>
>> $ scripts/test-build.sh x86_64-native-linuxapp-gcc
>> ...
>> drivers/net/virtio/virtio_user_ethdev.c: In function ‘virtio_user_pmd_devinit’:
>> drivers/net/virtio/virtio_user_ethdev.c:345:2: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
> Are you using gcc 6 ?
Yes:
$ gcc --version
gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)

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

* Re: [dpdk-dev] [PATCH] net/virtio-user: Fix missing brackets in if condition
  2016-07-12  9:30 [dpdk-dev] [PATCH] net/virtio-user: Fix missing brackets in if condition Maxime Coquelin
  2016-07-12  9:35 ` Thomas Monjalon
@ 2016-07-12 12:11 ` Yuanhan Liu
  2016-07-15 20:18   ` Thomas Monjalon
  2016-07-14 16:31 ` [dpdk-dev] " viktorin
  2 siblings, 1 reply; 7+ messages in thread
From: Yuanhan Liu @ 2016-07-12 12:11 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: huawei.xie, dev, Jianfeng Tan

On Tue, Jul 12, 2016 at 11:30:25AM +0200, Maxime Coquelin wrote:
> The error is reported using test build script:
> 
> $ scripts/test-build.sh x86_64-native-linuxapp-gcc
> ...
> drivers/net/virtio/virtio_user_ethdev.c: In function ‘virtio_user_pmd_devinit’:
> drivers/net/virtio/virtio_user_ethdev.c:345:2: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
>   if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1)
>     ^~
> 
> Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked")
> 
> Cc: Jianfeng Tan <jianfeng.tan@intel.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

Thanks for the fix.

	--yliu

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

* Re: [dpdk-dev] net/virtio-user: Fix missing brackets in if condition
  2016-07-12  9:30 [dpdk-dev] [PATCH] net/virtio-user: Fix missing brackets in if condition Maxime Coquelin
  2016-07-12  9:35 ` Thomas Monjalon
  2016-07-12 12:11 ` Yuanhan Liu
@ 2016-07-14 16:31 ` viktorin
  2016-07-15  1:29   ` Yuanhan Liu
  2 siblings, 1 reply; 7+ messages in thread
From: viktorin @ 2016-07-14 16:31 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: huawei.xie, yuanhan.liu, dev, Jianfeng Tan

On Tue, 12 Jul 2016 11:30:25 +0200
Maxime Coquelin <maxime.coquelin@redhat.com> wrote:

> The error is reported using test build script:

I recommend to note that the error is reported only by GCC 6+.

> 
> $ scripts/test-build.sh x86_64-native-linuxapp-gcc
> ...
> drivers/net/virtio/virtio_user_ethdev.c: In function ‘virtio_user_pmd_devinit’:
> drivers/net/virtio/virtio_user_ethdev.c:345:2: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
>   if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1)
>     ^~
> 
> Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked")
> 
> Cc: Jianfeng Tan <jianfeng.tan@intel.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> 
Reviewed-by: Jan Viktorin <viktorin@rehivetech.com>

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

* Re: [dpdk-dev] net/virtio-user: Fix missing brackets in if condition
  2016-07-14 16:31 ` [dpdk-dev] " viktorin
@ 2016-07-15  1:29   ` Yuanhan Liu
  0 siblings, 0 replies; 7+ messages in thread
From: Yuanhan Liu @ 2016-07-15  1:29 UTC (permalink / raw)
  To: viktorin; +Cc: Maxime Coquelin, huawei.xie, dev, Jianfeng Tan

On Thu, Jul 14, 2016 at 06:31:11PM +0200, viktorin@rehivetech.com wrote:
> On Tue, 12 Jul 2016 11:30:25 +0200
> Maxime Coquelin <maxime.coquelin@redhat.com> wrote:
> 
> > The error is reported using test build script:
> 
> I recommend to note that the error is reported only by GCC 6+.

Agreed!

	--yliu
> 
> > 
> > $ scripts/test-build.sh x86_64-native-linuxapp-gcc
> > ...
> > drivers/net/virtio/virtio_user_ethdev.c: In function ‘virtio_user_pmd_devinit’:
> > drivers/net/virtio/virtio_user_ethdev.c:345:2: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
> >   if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1)
> >     ^~
> > 
> > Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked")
> > 
> > Cc: Jianfeng Tan <jianfeng.tan@intel.com>
> > Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> > Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> > 
> Reviewed-by: Jan Viktorin <viktorin@rehivetech.com>

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

* Re: [dpdk-dev] [PATCH] net/virtio-user: Fix missing brackets in if condition
  2016-07-12 12:11 ` Yuanhan Liu
@ 2016-07-15 20:18   ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2016-07-15 20:18 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, Yuanhan Liu, huawei.xie, Jianfeng Tan

2016-07-12 20:11, Yuanhan Liu:
> On Tue, Jul 12, 2016 at 11:30:25AM +0200, Maxime Coquelin wrote:
> > The error is reported using test build script:
> > 
> > $ scripts/test-build.sh x86_64-native-linuxapp-gcc
> > ...
> > drivers/net/virtio/virtio_user_ethdev.c: In function ‘virtio_user_pmd_devinit’:
> > drivers/net/virtio/virtio_user_ethdev.c:345:2: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
> >   if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1)
> >     ^~
> > 
> > Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked")
> > 
> > Cc: Jianfeng Tan <jianfeng.tan@intel.com>
> > Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> 
> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> 
> Thanks for the fix.

Applied, thanks

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

end of thread, other threads:[~2016-07-15 20:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-12  9:30 [dpdk-dev] [PATCH] net/virtio-user: Fix missing brackets in if condition Maxime Coquelin
2016-07-12  9:35 ` Thomas Monjalon
2016-07-12  9:36   ` Maxime Coquelin
2016-07-12 12:11 ` Yuanhan Liu
2016-07-15 20:18   ` Thomas Monjalon
2016-07-14 16:31 ` [dpdk-dev] " viktorin
2016-07-15  1:29   ` Yuanhan Liu

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