From patchwork Tue Dec 23 11:39:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 42563 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 779FC2188F for ; Tue, 23 Dec 2014 11:40:45 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf3978951eek.5 for ; Tue, 23 Dec 2014 03:40:44 -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:in-reply-to :references: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=Ze5EfVWGmpDFYcXZXXnxA2U4cO3dbSyN2NTEV/ssrNA=; b=KAaYnweoUgkbqicGPou2juOm20ZC2Vj2xedkNeQwFCqfpqxE2HHA2rUoGARD5A337Q 9TTNs+05Zerf3jx0roLpMw6LrM1XHpWrQFDjoiAI5XtW9r1J5NAYgk7gzFYz2RzoSgYz pPF0G6R42XtZOiaFeFcecJUxjJpB2yXrLPeEj/WYq+xOK/0KZqE1tV7bn7L/CzUwA1Ra 9wau24MLkWQp517+ZYEzSUIlV69t0++IHoqfpRn3T0vWPERIeZ/E6MCMOqftyivYu79W xXJD22/h1enPOKQWciVFc+2rgWCdvxoG4kxFoeykGKS53ti5qImR1/k/Q8R6Qgd7HSBW nINQ== X-Gm-Message-State: ALoCoQnG+hCyEugZGzy1mqlwNsL1yczGNt/V0af7Yw43uXEIMFEaZUNw37xtQnyMtYYYt1YH+kIb X-Received: by 10.152.8.67 with SMTP id p3mr195603laa.4.1419334844670; Tue, 23 Dec 2014 03:40:44 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.205 with SMTP id ba13ls1470200lab.66.gmail; Tue, 23 Dec 2014 03:40:44 -0800 (PST) X-Received: by 10.112.157.104 with SMTP id wl8mr27034360lbb.96.1419334844461; Tue, 23 Dec 2014 03:40:44 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id bb5si21344540lab.36.2014.12.23.03.40.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Dec 2014 03:40:44 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id u10so5124005lbd.6 for ; Tue, 23 Dec 2014 03:40:44 -0800 (PST) X-Received: by 10.112.131.1 with SMTP id oi1mr26468089lbb.2.1419334844323; Tue, 23 Dec 2014 03:40:44 -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.142.69 with SMTP id ru5csp1300436lbb; Tue, 23 Dec 2014 03:40:43 -0800 (PST) X-Received: by 10.224.80.67 with SMTP id s3mr44164180qak.84.1419334842844; Tue, 23 Dec 2014 03:40:42 -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 y10si21381788qcy.13.2014.12.23.03.40.41 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 23 Dec 2014 03:40:42 -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 1Y3NpP-000227-O5; Tue, 23 Dec 2014 11:40:39 +0000 Received: from mail-la0-f52.google.com ([209.85.215.52]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y3NpD-0001y8-RE for lng-odp@lists.linaro.org; Tue, 23 Dec 2014 11:40:27 +0000 Received: by mail-la0-f52.google.com with SMTP id hs14so5433601lab.11 for ; Tue, 23 Dec 2014 03:40:22 -0800 (PST) X-Received: by 10.152.20.98 with SMTP id m2mr27252234lae.49.1419334822251; Tue, 23 Dec 2014 03:40:22 -0800 (PST) Received: from localhost.localdomain ([188.92.105.210]) by mx.google.com with ESMTPSA id cy6sm5784098lbb.39.2014.12.23.03.40.20 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Dec 2014 03:40:21 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 23 Dec 2014 14:39:56 +0300 Message-Id: <1419334799-19653-2-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 In-Reply-To: <1419334799-19653-1-git-send-email-maxim.uvarov@linaro.org> References: <1419334799-19653-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 1/4] linux-generic: validate_buf() remove pool_id validation 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: maxim.uvarov@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.175 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 CID 85006: Operands don't affect result (CONSTANT_EXPRESSION_RESULT) "handle.pool_id >= 16" is always false regardless of the values of its operands. This occurs as the logical second operand of '||'. Signed-off-by: Maxim Uvarov --- platform/linux-generic/include/odp_buffer_inlines.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/include/odp_buffer_inlines.h b/platform/linux-generic/include/odp_buffer_inlines.h index f880445..a28e1f1 100644 --- a/platform/linux-generic/include/odp_buffer_inlines.h +++ b/platform/linux-generic/include/odp_buffer_inlines.h @@ -99,8 +99,8 @@ static inline odp_buffer_hdr_t *validate_buf(odp_buffer_t buf) odp_buffer_hdr_t *buf_hdr; handle.u32 = buf; - /* For buffer handles, segment index must be 0 and pool id in range */ - if (handle.seg != 0 || handle.pool_id >= ODP_CONFIG_BUFFER_POOLS) + /* For buffer handles, segment index must be 0 */ + if (handle.seg != 0) return NULL; pool_entry_t *pool = odp_pool_to_entry(handle.pool_id);