From patchwork Sat Feb 21 21:12:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 44884 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f199.google.com (mail-we0-f199.google.com [74.125.82.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3A13321566 for ; Sat, 21 Feb 2015 21:12:52 +0000 (UTC) Received: by wesq59 with SMTP id q59sf7837125wes.2 for ; Sat, 21 Feb 2015 13:12:51 -0800 (PST) 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:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=1kfm7YRYzVW9MmC4+httajwedpCdp7TOLLN1LK718Lc=; b=lcEzMdpcSynm/ohgpW4+jek3hve7j2jy8voGe2bkK4LfA6MB2KuDY2hTN6BFxZ1DdY xnqtdgp/Qz+upU40NYI5QxT7pZQupfUzcJVI0s56Ss/5qHV/7hV84yOldt+8CLuYn9nq qefZ37duL0rwyjkn9nQn7MPrYjqND6fjbzfcsjoHLXuQNIejjBz8n4iJrdQJvtpIk14C zokyCe30EUZKRnz6qfWWMqmax4ZZcgPnOiMX9Q2p/NmxllscXPQyJ23Nw23DG4SXUCBD Q+c2U9DpchcQ7SZKTD5bC5l+WiNIs9pAe4uL1rsm12fYt/nI92ZGGu0/0U+wx1kcOvpA ocaA== X-Gm-Message-State: ALoCoQlCPhm5sC0gNwcOeKb5uHev0eTE3aJ33Xrc4ZTxcCutofG3oZ7hDD2qCZDwxj14B3O8xl/Z X-Received: by 10.112.168.104 with SMTP id zv8mr440116lbb.10.1424553171391; Sat, 21 Feb 2015 13:12:51 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.131 with SMTP id k3ls405895lak.21.gmail; Sat, 21 Feb 2015 13:12:51 -0800 (PST) X-Received: by 10.112.140.168 with SMTP id rh8mr3435954lbb.25.1424553171245; Sat, 21 Feb 2015 13:12:51 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id a4si1949377lah.98.2015.02.21.13.12.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Feb 2015 13:12:50 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by lamq1 with SMTP id q1so12181532lam.5 for ; Sat, 21 Feb 2015 13:12:50 -0800 (PST) X-Received: by 10.112.118.211 with SMTP id ko19mr3484657lbb.19.1424553170702; Sat, 21 Feb 2015 13:12:50 -0800 (PST) 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.35.133 with SMTP id h5csp427916lbj; Sat, 21 Feb 2015 13:12:50 -0800 (PST) X-Received: by 10.140.234.136 with SMTP id f130mr9440003qhc.49.1424553169414; Sat, 21 Feb 2015 13:12:49 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id s5si31731682qci.24.2015.02.21.13.12.47 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 21 Feb 2015 13:12:49 -0800 (PST) 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 1YPHLv-0006tm-9O; Sat, 21 Feb 2015 21:12:43 +0000 Received: from mail-ob0-f177.google.com ([209.85.214.177]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YPHLq-0006tf-2L for lng-odp@lists.linaro.org; Sat, 21 Feb 2015 21:12:38 +0000 Received: by mail-ob0-f177.google.com with SMTP id wp18so29039539obc.8 for ; Sat, 21 Feb 2015 13:12:32 -0800 (PST) X-Received: by 10.182.144.136 with SMTP id sm8mr2656437obb.63.1424553152765; Sat, 21 Feb 2015 13:12:32 -0800 (PST) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id mq8sm18533012oeb.2.2015.02.21.13.12.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 21 Feb 2015 13:12:32 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sat, 21 Feb 2015 15:12:27 -0600 Message-Id: <1424553147-19719-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH] linux-generic: buffers: remove obsolete debugging code 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: bill.fischofer@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.215.54 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 Remove obsolete debugging code to resolve Bug 1165 Signed-off-by: Bill Fischofer --- platform/linux-generic/include/odp_buffer_inlines.h | 21 +++------------------ platform/linux-generic/include/odp_pool_internal.h | 4 ---- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/platform/linux-generic/include/odp_buffer_inlines.h b/platform/linux-generic/include/odp_buffer_inlines.h index 3ba3941..4a44c5f 100644 --- a/platform/linux-generic/include/odp_buffer_inlines.h +++ b/platform/linux-generic/include/odp_buffer_inlines.h @@ -47,24 +47,9 @@ static inline odp_buffer_hdr_t *odp_buf_to_hdr(odp_buffer_t buf) struct pool_entry_s *pool; handle.handle = buf; - pool_id = handle.pool_id; - index = handle.index; - -#ifdef POOL_ERROR_CHECK - if (odp_unlikely(pool_id > ODP_CONFIG_POOLS)) { - ODP_ERR("odp_buf_to_hdr: Bad pool id\n"); - return NULL; - } -#endif - - pool = get_pool_entry(pool_id); - -#ifdef POOL_ERROR_CHECK - if (odp_unlikely(index > pool->params.num_bufs - 1)) { - ODP_ERR("odp_buf_to_hdr: Bad buffer index\n"); - return NULL; - } -#endif + pool_id = handle.pool_id; + index = handle.index; + pool = get_pool_entry(pool_id); return (odp_buffer_hdr_t *)(void *) (pool->pool_mdata_addr + (index * ODP_CACHE_LINE_SIZE)); diff --git a/platform/linux-generic/include/odp_pool_internal.h b/platform/linux-generic/include/odp_pool_internal.h index 3d1497a..1b7906f 100644 --- a/platform/linux-generic/include/odp_pool_internal.h +++ b/platform/linux-generic/include/odp_pool_internal.h @@ -61,10 +61,6 @@ typedef struct local_cache_t { /* Use ticketlock instead of spinlock */ #define POOL_USE_TICKETLOCK -/* Extra error checks */ -/* #define POOL_ERROR_CHECK */ - - #ifdef POOL_USE_TICKETLOCK #include #define POOL_LOCK(a) odp_ticketlock_lock(a)