DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] virtio: fix missing curly braces
@ 2016-07-13  9:24 Jan Viktorin
  2016-07-13  9:27 ` Maxime Coquelin
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Viktorin @ 2016-07-13  9:24 UTC (permalink / raw)
  To: dev; +Cc: Jan Viktorin, Jianfeng Tan, Yuanhan Liu, Huawei Xie

GCC 6 is complaining and seems to be correct here.

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)
  ^~

virtio_user_ethdev.c:348:3: note:
	...this statement, but the latter is misleadingly indented
	as if it is guarded by the ‘if’
   if (ret < 0) {

Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked")
Signed-off-by: Jan Viktorin <viktorin@rehivetech.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 17d5848..1b903f3 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.9.0

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

* Re: [dpdk-dev] [PATCH] virtio: fix missing curly braces
  2016-07-13  9:24 [dpdk-dev] [PATCH] virtio: fix missing curly braces Jan Viktorin
@ 2016-07-13  9:27 ` Maxime Coquelin
  2016-07-13 17:42   ` Jan Viktorin
  2016-07-13 17:43   ` Jan Viktorin
  0 siblings, 2 replies; 5+ messages in thread
From: Maxime Coquelin @ 2016-07-13  9:27 UTC (permalink / raw)
  To: Jan Viktorin, dev; +Cc: Jianfeng Tan, Yuanhan Liu, Huawei Xie

Hi Jan,

On 07/13/2016 11:24 AM, Jan Viktorin wrote:
> GCC 6 is complaining and seems to be correct here.
>
> 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)
>    ^~
>
> virtio_user_ethdev.c:348:3: note:
> 	...this statement, but the latter is misleadingly indented
> 	as if it is guarded by the ‘if’
>     if (ret < 0) {
>
> Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked")
> Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
> ---
>
I already fixed it yesterday:
http://dpdk.org/dev/patchwork/patch/14780/

Thanks,
Maxime

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

* Re: [dpdk-dev] [PATCH] virtio: fix missing curly braces
  2016-07-13  9:27 ` Maxime Coquelin
@ 2016-07-13 17:42   ` Jan Viktorin
  2016-07-13 20:19     ` Maxime Coquelin
  2016-07-13 17:43   ` Jan Viktorin
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Viktorin @ 2016-07-13 17:42 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, Jianfeng Tan, Yuanhan Liu, Huawei Xie

On Wed, 13 Jul 2016 11:27:18 +0200
Maxime Coquelin <maxime.coquelin@redhat.com> wrote:

> Hi Jan,
> 
> On 07/13/2016 11:24 AM, Jan Viktorin wrote:
> > GCC 6 is complaining and seems to be correct here.
> >
> > 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)
> >    ^~
> >
> > virtio_user_ethdev.c:348:3: note:
> > 	...this statement, but the latter is misleadingly indented
> > 	as if it is guarded by the ‘if’
> >     if (ret < 0) {
> >
> > Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked")
> > Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
> > ---
> >  
> I already fixed it yesterday:
> http://dpdk.org/dev/patchwork/patch/14780/

Sorry, I didn't find it quickly. My fault. Thanks.

Jan

> 
> Thanks,
> Maxime



-- 
  Jan Viktorin                E-mail: Viktorin@RehiveTech.com
  System Architect            Web:    www.RehiveTech.com
  RehiveTech
  Brno, Czech Republic

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

* Re: [dpdk-dev] [PATCH] virtio: fix missing curly braces
  2016-07-13  9:27 ` Maxime Coquelin
  2016-07-13 17:42   ` Jan Viktorin
@ 2016-07-13 17:43   ` Jan Viktorin
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Viktorin @ 2016-07-13 17:43 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, Jianfeng Tan, Yuanhan Liu, Huawei Xie

On Wed, 13 Jul 2016 11:27:18 +0200
Maxime Coquelin <maxime.coquelin@redhat.com> wrote:

> Hi Jan,
> 
> On 07/13/2016 11:24 AM, Jan Viktorin wrote:
> > GCC 6 is complaining and seems to be correct here.
> >
> > 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)
> >    ^~
> >
> > virtio_user_ethdev.c:348:3: note:
> > 	...this statement, but the latter is misleadingly indented
> > 	as if it is guarded by the ‘if’
> >     if (ret < 0) {
> >
> > Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked")
> > Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
> > ---
> >  
> I already fixed it yesterday:
> http://dpdk.org/dev/patchwork/patch/14780/

Sorry, I didn't find it quickly. My fault. Thanks.

Jan

> 
> Thanks,
> Maxime

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

* Re: [dpdk-dev] [PATCH] virtio: fix missing curly braces
  2016-07-13 17:42   ` Jan Viktorin
@ 2016-07-13 20:19     ` Maxime Coquelin
  0 siblings, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2016-07-13 20:19 UTC (permalink / raw)
  To: Jan Viktorin; +Cc: dev, Jianfeng Tan, Yuanhan Liu, Huawei Xie



On 07/13/2016 07:42 PM, Jan Viktorin wrote:
> On Wed, 13 Jul 2016 11:27:18 +0200
> Maxime Coquelin <maxime.coquelin@redhat.com> wrote:
>
>> Hi Jan,
>>
>> On 07/13/2016 11:24 AM, Jan Viktorin wrote:
>>> GCC 6 is complaining and seems to be correct here.
>>>
>>> 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)
>>>    ^~
>>>
>>> virtio_user_ethdev.c:348:3: note:
>>> 	...this statement, but the latter is misleadingly indented
>>> 	as if it is guarded by the ‘if’
>>>     if (ret < 0) {
>>>
>>> Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked")
>>> Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
>>> ---
>>>
>> I already fixed it yesterday:
>> http://dpdk.org/dev/patchwork/patch/14780/
>
> Sorry, I didn't find it quickly. My fault. Thanks.
Oh no problem! Better having two fixes than none :)

Thanks,
Maxime

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-13  9:24 [dpdk-dev] [PATCH] virtio: fix missing curly braces Jan Viktorin
2016-07-13  9:27 ` Maxime Coquelin
2016-07-13 17:42   ` Jan Viktorin
2016-07-13 20:19     ` Maxime Coquelin
2016-07-13 17:43   ` Jan Viktorin

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