From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 94843A3160
	for <public@inbox.dpdk.org>; Sat, 12 Oct 2019 15:36:01 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 321B81E9BE;
	Sat, 12 Oct 2019 15:36:00 +0200 (CEST)
Received: from mail-io1-f68.google.com (mail-io1-f68.google.com
 [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id ADDAD1E9AB
 for <dev@dpdk.org>; Sat, 12 Oct 2019 15:35:58 +0200 (CEST)
Received: by mail-io1-f68.google.com with SMTP id h144so27353333iof.7
 for <dev@dpdk.org>; Sat, 12 Oct 2019 06:35:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=bV1oXZVZAWTpm1pvLLhdUy2amK7QJUepnzLz7Glf73w=;
 b=OjEIDYWj5xdQ+IM05e82oSyfi+M0/34DIp0XbS+iKzsjIMvQ/TcWy++5IoyPjmAdgO
 LR+ZVCTbvbOgbhpdCaO5mMYbVTSdEOLStFO3K85G5xu4eUYKtFGPHxjkgQE55UiUnxtt
 e218xVha2+kWs/9AiRcYHSqo5PYr31gkE90POI26kUdcCg3IuLgVKmbfybkNMWDb87cb
 ZAy1QAKExesWYAnKIQUI1LPxvbLRoZFu/YzQNReg0FwTrn0kqyxKchgsmokpHmRqZRXr
 PHGJHn9ql0aZ4F/PNHQeb1hYlSugSK+Rbyf1uwztvqn+tRttBGFtoer7OOeVJLJIDIgf
 W/sA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=bV1oXZVZAWTpm1pvLLhdUy2amK7QJUepnzLz7Glf73w=;
 b=TvVvy2WfJ7ApwGWxLQ4841IqrVKRg+cc58CC/5ItykRBL5qpsw3pnX4M3k2Bj65CDM
 wZIFCs4D7olCNvm1khrwbs1U/wDslFGtVbslCfWBcDJjnvqMovpasE8tv3FFDtSlzPnm
 rFDGM6HDswmZBFZOPNmb8iBzzVeTuasVhWHItHBYYIcHnWXtiWhvyI4Dp65vNgcYFJ68
 wrtIuTfM61Gzpm6y96JxjEPQY5wefHLS24l3fqk7P7a0R2T2tQXbWiObdnuMEOeUMYQE
 YgL2r68rrxZaa4Ks4/vivgWtWwoNs12Fw8bhXU3R5ppIs95hvo4zJSOJZysJWaYdtM5s
 Pglg==
X-Gm-Message-State: APjAAAUfZ1476IuufVXTeVXiX5vfZ8JThVIGsHeqBynydtD8QAo/wDq8
 2/hM0vOBsaaQpOWNp+JzFRLa/Ic2PqWEwTW0iwg=
X-Google-Smtp-Source: APXvYqyHBgMQUNS7NWHKAzZ5Y25dc5m1EQhYcNNxuoYy8hquTyZRqNsXBSxtUH5hfQkGMV/cV3ZcX6gZt2UcvgxYuOk=
X-Received: by 2002:a6b:6508:: with SMTP id z8mr11458769iob.271.1570887357750; 
 Sat, 12 Oct 2019 06:35:57 -0700 (PDT)
MIME-Version: 1.0
References: <20190917075754.8310-1-amo@semihalf.com>
 <20190917075754.8310-3-amo@semihalf.com>
In-Reply-To: <20190917075754.8310-3-amo@semihalf.com>
From: Jerin Jacob <jerinjacobk@gmail.com>
Date: Sat, 12 Oct 2019 19:05:46 +0530
Message-ID: <CALBAE1OOqqdt+AcQ1zJWDJW99FxhNpQiVhaSL+yc1NX9Cyi=Zw@mail.gmail.com>
To: Andrzej Ostruszka <amo@semihalf.com>
Cc: dpdk-dev <dev@dpdk.org>, Erik Gabriel Carrillo <erik.g.carrillo@intel.com>,
 Jerin Jacob <jerinj@marvell.com>, mattias.ronnblom@ericsson.com, 
 Stephen Hemminger <stephen@networkplumber.org>,
 Andrzej Ostruszka <aostruszka@marvell.com>
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [dpdk-dev] [PATCH v2 02/10] eventdev: fix possible use of
 uninitialized var
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Tue, Sep 17, 2019 at 1:28 PM Andrzej Ostruszka <amo@semihalf.com> wrote:
>
> Fix the logic for the case of event queue allowing all schedule types.
>
> Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>

This fix looks good to me.

# Please fix check-git-log.sh errors.
Missing 'Fixes' tag:
        eventdev: fix possible use of uninitialized var

# If it is reported by LTO, please add the compiler warning output in
git commit.

With the above fix:
Reviewed-by: Jerin Jacob <jerinj@marvell.com>

> ---
>  lib/librte_eventdev/rte_event_timer_adapter.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
> index 5ce399eca..161e21a68 100644
> --- a/lib/librte_eventdev/rte_event_timer_adapter.c
> +++ b/lib/librte_eventdev/rte_event_timer_adapter.c
> @@ -706,11 +706,11 @@ check_destination_event_queue(struct rte_event_timer *evtim,
>                                        RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE,
>                                        &sched_type);
>
> -       if ((ret < 0 && ret != -EOVERFLOW) ||
> -           evtim->ev.sched_type != sched_type)
> -               return -1;
> +       if ((ret == 0 && evtim->ev.sched_type == sched_type) ||
> +           ret == -EOVERFLOW)
> +               return 0;
>
> -       return 0;
> +       return -1;
>  }
>
>  static int
> --
> 2.17.1
>