examples/vhost_crypto: remove unused short option

Message ID 20210204080542.3812-1-ibtisam.tariq@emumba.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series examples/vhost_crypto: remove unused short option |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/travis-robot warning Travis build: failed
ci/iol-testing warning Testing issues

Commit Message

Ibtisam Tariq Feb. 4, 2021, 8:05 a.m. UTC
  Short option "s" was passed to getopt_long function, while there was
no condition on this option.

Fixes: f5188211c7 ("examples/vhost_crypto: add sample application")
Cc: roy.fan.zhang@intel.com

Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
---
 examples/vhost_crypto/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Fan Zhang Feb. 4, 2021, 1:07 p.m. UTC | #1
> -----Original Message-----
> From: Ibtisam Tariq <ibtisam.tariq@emumba.com>
> Sent: Thursday, February 4, 2021 8:06 AM
> To: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; Ibtisam Tariq <ibtisam.tariq@emumba.com>; Zhang, Roy
> Fan <roy.fan.zhang@intel.com>
> Subject: [PATCH] examples/vhost_crypto: remove unused short option
> 
> Short option "s" was passed to getopt_long function, while there was
> no condition on this option.
> 
> Fixes: f5188211c7 ("examples/vhost_crypto: add sample application")
> Cc: roy.fan.zhang@intel.com
> 
> Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
> ---

Acked-by: Fan Zhang roy.fan.zhang@intel.com
  
Fan Zhang Feb. 4, 2021, 1:08 p.m. UTC | #2
> -----Original Message-----
> From: Ibtisam Tariq <ibtisam.tariq@emumba.com>
> Sent: Thursday, February 4, 2021 8:06 AM
> To: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; Ibtisam Tariq <ibtisam.tariq@emumba.com>; Zhang, Roy
> Fan <roy.fan.zhang@intel.com>
> Subject: [PATCH] examples/vhost_crypto: remove unused short option
> 
> Short option "s" was passed to getopt_long function, while there was
> no condition on this option.
> 
> Fixes: f5188211c7 ("examples/vhost_crypto: add sample application")
> Cc: roy.fan.zhang@intel.com
> 
> Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>

Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

Sorry for the incomplete ack in my last email.
  
Maxime Coquelin March 19, 2021, 9:18 a.m. UTC | #3
On 2/4/21 9:05 AM, Ibtisam Tariq wrote:
> Short option "s" was passed to getopt_long function, while there was
> no condition on this option.
> 
> Fixes: f5188211c7 ("examples/vhost_crypto: add sample application")
> Cc: roy.fan.zhang@intel.com
> 
> Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
> ---
>  examples/vhost_crypto/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
> index 29c8f7228..66bde38c0 100644
> --- a/examples/vhost_crypto/main.c
> +++ b/examples/vhost_crypto/main.c
> @@ -219,7 +219,7 @@ vhost_crypto_parse_args(int argc, char **argv)
>  
>  	argvopt = argv;
>  
> -	while ((opt = getopt_long(argc, argvopt, "s:",
> +	while ((opt = getopt_long(argc, argvopt, "",
>  				  lgopts, &option_index)) != EOF) {
>  
>  		switch (opt) {
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  
Chenbo Xia March 31, 2021, 8:31 a.m. UTC | #4
> -----Original Message-----
> From: Ibtisam Tariq <ibtisam.tariq@emumba.com>
> Sent: Thursday, February 4, 2021 4:06 PM
> To: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; Ibtisam Tariq <ibtisam.tariq@emumba.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>
> Subject: [PATCH] examples/vhost_crypto: remove unused short option
> 
> Short option "s" was passed to getopt_long function, while there was
> no condition on this option.
> 
> Fixes: f5188211c7 ("examples/vhost_crypto: add sample application")
> Cc: roy.fan.zhang@intel.com
> 
> Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
> ---
>  examples/vhost_crypto/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
> index 29c8f7228..66bde38c0 100644
> --- a/examples/vhost_crypto/main.c
> +++ b/examples/vhost_crypto/main.c
> @@ -219,7 +219,7 @@ vhost_crypto_parse_args(int argc, char **argv)
> 
>  	argvopt = argv;
> 
> -	while ((opt = getopt_long(argc, argvopt, "s:",
> +	while ((opt = getopt_long(argc, argvopt, "",
>  				  lgopts, &option_index)) != EOF) {
> 
>  		switch (opt) {
> --
> 2.17.1

Fix two things before apply:
 
1. Change Fix commit id to 12 digits.
2. Add cc to stable tag and cc to stable as it needs backport.
 
With above fix, patch applied to next-virtio/main. Thanks!
  

Patch

diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index 29c8f7228..66bde38c0 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -219,7 +219,7 @@  vhost_crypto_parse_args(int argc, char **argv)
 
 	argvopt = argv;
 
-	while ((opt = getopt_long(argc, argvopt, "s:",
+	while ((opt = getopt_long(argc, argvopt, "",
 				  lgopts, &option_index)) != EOF) {
 
 		switch (opt) {