From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 94843A3160 for ; 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 ; Sat, 12 Oct 2019 15:35:58 +0200 (CEST) Received: by mail-io1-f68.google.com with SMTP id h144so27353333iof.7 for ; 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 Date: Sat, 12 Oct 2019 19:05:46 +0530 Message-ID: To: Andrzej Ostruszka Cc: dpdk-dev , Erik Gabriel Carrillo , Jerin Jacob , mattias.ronnblom@ericsson.com, Stephen Hemminger , Andrzej Ostruszka 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Sep 17, 2019 at 1:28 PM Andrzej Ostruszka wrote: > > Fix the logic for the case of event queue allowing all schedule types. > > Signed-off-by: Andrzej Ostruszka 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 > --- > 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 >