[Intel-gfx] [PATCH i-g-t] tools/intel_guc_logger: Fix the assert for the verbosity level

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Fri Feb 17 16:35:50 UTC 2017


Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>

On 16/02/17 06:31, Oscar Mateo wrote:
> I guess no one has needed to change the verbosity level of the GuC logs.
>
> Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
> ---
>  tools/intel_guc_logger.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/intel_guc_logger.c b/tools/intel_guc_logger.c
> index 159a54e..c9ea60d 100644
> --- a/tools/intel_guc_logger.c
> +++ b/tools/intel_guc_logger.c
> @@ -302,7 +302,7 @@ static int parse_options(int opt, int opt_index, void *data)
>  	switch(opt) {
>  	case 'v':
>  		verbosity_level = atoi(optarg);
> -		igt_assert_f(verbosity_level < 0 || verbosity_level > 3, "invalid input for -v option\n");
> +		igt_assert_f(verbosity_level >= 0 && verbosity_level <= 3, "invalid input for -v option\n");
>  		igt_debug("verbosity level to be used is %d\n", verbosity_level);
>  		break;
>  	case 'o':
>


More information about the Intel-gfx mailing list