From patchwork Fri Oct 24 19:58:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 39497 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 23DFA20341 for ; Fri, 24 Oct 2014 19:58:34 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b15sf540285eek.5 for ; Fri, 24 Oct 2014 12:58:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=eAPgAW3VoW90J/Fsqh68HYHgY8bCHud2LeXnMty0eEY=; b=mJa7O0gAL43o+jXRfABFb+XeFiIVRfOVX5SHlNVL3T3YLQ3rS5QV8csCsgslzRO47O hU9Bpvx+0SSP4AYxVPOmDu87LJJJylnSkqrOFMlLNMPWqbj/BIZ7ox+RSiPF3gxxNI66 d2PZfYttgdW20a0avKwnix2NrdBcfkYCbWPUMu2KbF4+K3m22c/0G0n5iEWcDILPMRvn DtZAcziubAWwafweOMt3iZOZM3OwHtyBik+RjUj1BfEBWifDO0lwx4G2qJkMFAa1Y6aO Pi7DzruPDY8lFfVIKfTaynElOzn1pPOM5HGumlU8GHjUquu02KwdbgNe0O996Jaugb26 Jflw== X-Gm-Message-State: ALoCoQmU6tpPKZSUGJ1PgpiDopiY5Boo17a7BvPzABfzSyHj9YoEN+oAGDXkxXHShd+dBVcQrzcV X-Received: by 10.180.73.73 with SMTP id j9mr65710wiv.3.1414180713145; Fri, 24 Oct 2014 12:58:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.10 with SMTP id m10ls491368laj.72.gmail; Fri, 24 Oct 2014 12:58:33 -0700 (PDT) X-Received: by 10.152.27.134 with SMTP id t6mr6617552lag.17.1414180712986; Fri, 24 Oct 2014 12:58:32 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id dd4si8379261lad.100.2014.10.24.12.58.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Oct 2014 12:58:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id f15so1865405lbj.41 for ; Fri, 24 Oct 2014 12:58:32 -0700 (PDT) X-Received: by 10.112.221.197 with SMTP id qg5mr6672517lbc.32.1414180712174; Fri, 24 Oct 2014 12:58:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp495541lbz; Fri, 24 Oct 2014 12:58:31 -0700 (PDT) X-Received: by 10.140.22.165 with SMTP id 34mr8850598qgn.16.1414180711100; Fri, 24 Oct 2014 12:58:31 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id m16si9424340qav.130.2014.10.24.12.58.30 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 24 Oct 2014 12:58:31 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xhl0H-0006YX-3S; Fri, 24 Oct 2014 19:58:29 +0000 Received: from mail-qa0-f52.google.com ([209.85.216.52]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xhl0B-0006YS-BA for lng-odp@lists.linaro.org; Fri, 24 Oct 2014 19:58:23 +0000 Received: by mail-qa0-f52.google.com with SMTP id v10so1470995qac.11 for ; Fri, 24 Oct 2014 12:58:18 -0700 (PDT) X-Received: by 10.224.129.195 with SMTP id p3mr9299167qas.66.1414180697866; Fri, 24 Oct 2014 12:58:17 -0700 (PDT) Received: from fedora1.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id c88sm4935830qgf.14.2014.10.24.12.58.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Oct 2014 12:58:17 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Fri, 24 Oct 2014 15:58:11 -0400 Message-Id: <1414180691-31279-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH] odp_example.c: fix dead code path X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 tot is = i which cannot leave the for loop without being positive unless it exits entirely and never reaches the test statement. Or QUEUE_ROUNDS is #defined to 0 rather than (512*1024) Thus tot is always true and the else cannot execute Signed-off-by: Mike Holmes --- Previous patch missed a case. example/odp_example/odp_example.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/example/odp_example/odp_example.c b/example/odp_example/odp_example.c index 5f25f89..ae243c8 100644 --- a/example/odp_example/odp_example.c +++ b/example/odp_example/odp_example.c @@ -355,13 +355,8 @@ static int test_schedule_one_single(const char *str, int thr, odp_barrier_sync(barrier); clear_sched_queues(); - if (tot) { cycles = cycles/tot; ns = ns/tot; - } else { - cycles = 0; - ns = 0; - } printf(" [%i] %s enq+deq %"PRIu64" cycles, %"PRIu64" ns\n", thr, str, cycles, ns);