diff mbox

example:printing correct appl_mode

Message ID 1436448727-19098-1-git-send-email-balakrishna.garapati@linaro.org
State Superseded
Headers show

Commit Message

Balakrishna Garapati July 9, 2015, 1:32 p.m. UTC
Signed-off-by: Balakrishna.Garapati <balakrishna.garapati@linaro.org>
---
 example/generator/odp_generator.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Mike Holmes July 9, 2015, 1:43 p.m. UTC | #1
Subject should localize to the specific example
example: generator: print correct appl_mode

On 9 July 2015 at 09:32, Balakrishna.Garapati <
balakrishna.garapati@linaro.org> wrote:

> Signed-off-by: Balakrishna.Garapati <balakrishna.garapati@linaro.org>
>

With fixed subject message
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>


> ---
>  example/generator/odp_generator.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/example/generator/odp_generator.c
> b/example/generator/odp_generator.c
> index 0ff264c..15de035 100644
> --- a/example/generator/odp_generator.c
> +++ b/example/generator/odp_generator.c
> @@ -991,9 +991,11 @@ static void print_info(char *progname, appl_args_t
> *appl_args)
>         printf("\n"
>                "Mode:            ");
>         if (appl_args->mode == 0)
> -               PRINT_APPL_MODE(0);
> +               PRINT_APPL_MODE(APPL_MODE_UDP);
> +       else if (appl_args->mode == 1)
> +               PRINT_APPL_MODE(APPL_MODE_PING);
>         else
> -               PRINT_APPL_MODE(0);
> +               PRINT_APPL_MODE(APPL_MODE_RCV);
>         printf("\n\n");
>         fflush(NULL);
>  }
> --
> 1.9.1
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov July 9, 2015, 1:48 p.m. UTC | #2
On 07/09/15 16:43, Mike Holmes wrote:
> Subject should localize to the specific example
> example: generator: print correct appl_mode
>
> On 9 July 2015 at 09:32, Balakrishna.Garapati 
> <balakrishna.garapati@linaro.org 
> <mailto:balakrishna.garapati@linaro.org>> wrote:
>
>     Signed-off-by: Balakrishna.Garapati
>     <balakrishna.garapati@linaro.org
>     <mailto:balakrishna.garapati@linaro.org>>
>
>
> With fixed subject message
> Reviewed-by: Mike Holmes <mike.holmes@linaro.org 
> <mailto:mike.holmes@linaro.org>>
>
>     ---
>      example/generator/odp_generator.c | 6 ++++--
>      1 file changed, 4 insertions(+), 2 deletions(-)
>
>     diff --git a/example/generator/odp_generator.c
>     b/example/generator/odp_generator.c
>     index 0ff264c..15de035 100644
>     --- a/example/generator/odp_generator.c
>     +++ b/example/generator/odp_generator.c
>     @@ -991,9 +991,11 @@ static void print_info(char *progname,
>     appl_args_t *appl_args)
>             printf("\n"
>                    "Mode:            ");
>             if (appl_args->mode == 0)
>     -               PRINT_APPL_MODE(0);
>     +               PRINT_APPL_MODE(APPL_MODE_UDP);
>     +       else if (appl_args->mode == 1)
>     +               PRINT_APPL_MODE(APPL_MODE_PING);
>             else
>     -               PRINT_APPL_MODE(0);
>     +               PRINT_APPL_MODE(APPL_MODE_RCV);
>

How about?

PRINT_APPL_MODE(appl_args->mode);

Maxim.
>
>             printf("\n\n");
>             fflush(NULL);
>      }
>     --
>     1.9.1
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
> -- 
> Mike Holmes
> Technical Manager - Linaro Networking Group
> Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs
>
Balakrishna Garapati July 9, 2015, 1:57 p.m. UTC | #3
PRINT_APPL_MODE prints  #mode (string) & mode (0,1 or 2).  if we pass "
appl_args->mode", it prints this as a string instead of ex: APPL_MODE_PING.

On 9 July 2015 at 15:48, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> On 07/09/15 16:43, Mike Holmes wrote:
>
>> Subject should localize to the specific example
>> example: generator: print correct appl_mode
>>
>> On 9 July 2015 at 09:32, Balakrishna.Garapati <
>> balakrishna.garapati@linaro.org <mailto:balakrishna.garapati@linaro.org>>
>> wrote:
>>
>>     Signed-off-by: Balakrishna.Garapati
>>     <balakrishna.garapati@linaro.org
>>     <mailto:balakrishna.garapati@linaro.org>>
>>
>>
>> With fixed subject message
>> Reviewed-by: Mike Holmes <mike.holmes@linaro.org <mailto:
>> mike.holmes@linaro.org>>
>>
>>     ---
>>      example/generator/odp_generator.c | 6 ++++--
>>      1 file changed, 4 insertions(+), 2 deletions(-)
>>
>>     diff --git a/example/generator/odp_generator.c
>>     b/example/generator/odp_generator.c
>>     index 0ff264c..15de035 100644
>>     --- a/example/generator/odp_generator.c
>>     +++ b/example/generator/odp_generator.c
>>     @@ -991,9 +991,11 @@ static void print_info(char *progname,
>>     appl_args_t *appl_args)
>>             printf("\n"
>>                    "Mode:            ");
>>             if (appl_args->mode == 0)
>>     -               PRINT_APPL_MODE(0);
>>     +               PRINT_APPL_MODE(APPL_MODE_UDP);
>>     +       else if (appl_args->mode == 1)
>>     +               PRINT_APPL_MODE(APPL_MODE_PING);
>>             else
>>     -               PRINT_APPL_MODE(0);
>>     +               PRINT_APPL_MODE(APPL_MODE_RCV);
>>
>>
> How about?
>
> PRINT_APPL_MODE(appl_args->mode);
>
> Maxim.
>
>>
>>             printf("\n\n");
>>             fflush(NULL);
>>      }
>>     --
>>     1.9.1
>>
>>     _______________________________________________
>>     lng-odp mailing list
>>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>     https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>>
>>
>> --
>> Mike Holmes
>> Technical Manager - Linaro Networking Group
>> Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM
>> SoCs
>>
>>
>
diff mbox

Patch

diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index 0ff264c..15de035 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -991,9 +991,11 @@  static void print_info(char *progname, appl_args_t *appl_args)
 	printf("\n"
 	       "Mode:            ");
 	if (appl_args->mode == 0)
-		PRINT_APPL_MODE(0);
+		PRINT_APPL_MODE(APPL_MODE_UDP);
+	else if (appl_args->mode == 1)
+		PRINT_APPL_MODE(APPL_MODE_PING);
 	else
-		PRINT_APPL_MODE(0);
+		PRINT_APPL_MODE(APPL_MODE_RCV);
 	printf("\n\n");
 	fflush(NULL);
 }