From patchwork Tue Jul 5 02:31:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 71368 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp79374qgy; Mon, 4 Jul 2016 19:31:55 -0700 (PDT) X-Received: by 10.107.173.72 with SMTP id w69mr12148669ioe.127.1467685915861; Mon, 04 Jul 2016 19:31:55 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u67si1788122iou.196.2016.07.04.19.31.55; Mon, 04 Jul 2016 19:31:55 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1FE3764D92; Tue, 5 Jul 2016 02:31:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 91D9163A15; Tue, 5 Jul 2016 02:31:51 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 403AB63A37; Tue, 5 Jul 2016 02:31:49 +0000 (UTC) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by lists.linaro.org (Postfix) with ESMTPS id 8595A635C9 for ; Tue, 5 Jul 2016 02:31:48 +0000 (UTC) Received: by mail-oi0-f46.google.com with SMTP id f189so212882588oig.3 for ; Mon, 04 Jul 2016 19:31:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2Uz1m9CX5yvtgDu4dR0jM2mFmp3XEAvP5zk24+bBZTY=; b=VW8eZZx37hATmOmi2npCPUUl07qi1dMUcXWO4+8/3RX6QqjrPXpyZRO8cEdrwX2YYz Nq6XGTLpwPwF6+I6wjiN+e3vGvxnKzAY3GmitqMDpMecWJ5MGP5unVkID9VCVngW2NdM w7mgFGM4j685h7fP3lF3KpIs9Feyg5bpOcUTqlKr951x/34Hxg9qZ7YjDneUIhXH9JP9 /B/JShiRRWCst+QcRKhbaWkJoYGAiOkjL39MfkZqerICdEK5dfOgXHhFwE6LhsqB5jrc 4g5CC586rffpigvKLyPeK4C12kXWMxsCO2Fp7KJotDVD5Y7Fu89BvxdlXXEJkmz6oETd 4DFA== X-Gm-Message-State: ALyK8tL0tQz8UEYK3ifYo7+j/URS9c19ZzaqAQ9aukGE86WjOXZ/+9LsnAk7l8T3n/UJuokJtZU= X-Received: by 10.157.27.209 with SMTP id v17mr8666196otv.4.1467685908004; Mon, 04 Jul 2016 19:31:48 -0700 (PDT) Received: from localhost.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id 33sm8318239otw.30.2016.07.04.19.31.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Jul 2016 19:31:47 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 4 Jul 2016 21:31:45 -0500 Message-Id: <1467685905-10703-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 X-Topics: patch Subject: [lng-odp] [PATCHv2] linux-generic: schedule: simplify wait logic to avoid clang issues X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2387 by ensuring that t1 variable is seen as initialized in all paths in the SP Scheduler. Previous logic failed due to an apparent issue with clang. Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_schedule_sp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c index 8c45123..2e28aa4 100644 --- a/platform/linux-generic/odp_schedule_sp.c +++ b/platform/linux-generic/odp_schedule_sp.c @@ -364,9 +364,9 @@ static uint64_t schedule_wait_time(uint64_t ns) } static int schedule_multi(odp_queue_t *from, uint64_t wait, - odp_event_t events[], int max_events) + odp_event_t events[], int max_events ODP_UNUSED) { - (void)max_events; + odp_time_t t1; int update_t1 = 1; if (sched_local.cmd) { @@ -384,7 +384,6 @@ static int schedule_multi(odp_queue_t *from, uint64_t wait, sched_cmd_t *cmd; uint32_t qi; int num; - odp_time_t t1; cmd = sched_cmd(NUM_PRIO);