From patchwork Tue Mar 25 16:55:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 27045 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0C7AF20539 for ; Tue, 25 Mar 2014 16:57:12 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id p10sf1686418pdj.11 for ; Tue, 25 Mar 2014 09:57:12 -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:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=+fIb43/bPBxaOSgn8bB/FyAGLs1hwcCS3kdVPOf9tmI=; b=i3baj7uC0gPm/pzQAVaGgMOuQA0Sz3ycFCz4Hm+goLmrGSig76DP+zcR3J25wG2YUJ LpTOuYmhNLAK6YNU/UkaW5fN1SJC4AkeSjKkPsMIwwoXwXlQXjVTwNiGQ6ZKDDlHuykh O+9IfXAWgAJTV1qAHvHvIej9c3VvATqVSWTosBMtXXa2KN3zAQWx5ttWLpNmMubWk/jn ZPpVXZT29EmVooQMvtLa8oKoONBFR3uwXkXwhHSaFxOm/ING2+/ozWwLKpwqP0daRGUl 1mN7RwkEuzU+pSubwdAGlWNqJqGnuJ85s3RC5NyM+jjazmzWK4oAAnjEh7NN7OOeVJ6i 4T1Q== X-Gm-Message-State: ALoCoQmYBzvxhjYN81G3JdTRQjoKROlfE8NuNdl5GyW+2WcgrCAPO4RyJNNnWA2LUPObfVkqNio6 X-Received: by 10.68.201.7 with SMTP id jw7mr29211199pbc.8.1395766631966; Tue, 25 Mar 2014 09:57:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.37 with SMTP id e34ls278114qge.4.gmail; Tue, 25 Mar 2014 09:57:11 -0700 (PDT) X-Received: by 10.58.220.161 with SMTP id px1mr57189587vec.13.1395766631846; Tue, 25 Mar 2014 09:57:11 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id y10si3870523vei.150.2014.03.25.09.57.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Mar 2014 09:57:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id oy12so876158veb.4 for ; Tue, 25 Mar 2014 09:57:11 -0700 (PDT) X-Received: by 10.52.12.36 with SMTP id v4mr49089374vdb.20.1395766631762; Tue, 25 Mar 2014 09:57:11 -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.220.78.9 with SMTP id i9csp320293vck; Tue, 25 Mar 2014 09:57:11 -0700 (PDT) X-Received: by 10.58.188.52 with SMTP id fx20mr1423223vec.28.1395766630613; Tue, 25 Mar 2014 09:57:10 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id ek16si3801260vcb.209.2014.03.25.09.57.05 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Mar 2014 09:57:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSUe3-0008Md-I5; Tue, 25 Mar 2014 16:56:11 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSUe1-0008Jt-El for xen-devel@lists.xenproject.org; Tue, 25 Mar 2014 16:56:09 +0000 Received: from [85.158.137.68:62890] by server-11.bemta-3.messagelabs.com id 09/CB-19438-825B1335; Tue, 25 Mar 2014 16:56:08 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-4.tower-31.messagelabs.com!1395766567!2903426!1 X-Originating-IP: [74.125.83.51] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13510 invoked from network); 25 Mar 2014 16:56:08 -0000 Received: from mail-ee0-f51.google.com (HELO mail-ee0-f51.google.com) (74.125.83.51) by server-4.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 25 Mar 2014 16:56:08 -0000 Received: by mail-ee0-f51.google.com with SMTP id c13so684134eek.24 for ; Tue, 25 Mar 2014 09:56:07 -0700 (PDT) X-Received: by 10.15.51.1 with SMTP id m1mr70788473eew.25.1395766567825; Tue, 25 Mar 2014 09:56:07 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id h47sm33377501eey.13.2014.03.25.09.56.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Mar 2014 09:56:07 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 25 Mar 2014 16:55:16 +0000 Message-Id: <1395766541-23979-10-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH 09/34] xen/common: tmem: Remove dumb check in do_tmem_destroy_pool X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 List-Archive: do_tmem_destroy_pool is checking if pools == NULL. But, pools is a fixed array. Clang 3.5 will fail to compile xen/common/tmem.c with the following error: tmem.c:1848:18: error: comparison of array 'client->pools' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare] if ( client->pools == NULL ) Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Acked-by: Konrad Rzeszutek Wilk --- xen/common/tmem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/common/tmem.c b/xen/common/tmem.c index 02e7e2e..0a24b3f 100644 --- a/xen/common/tmem.c +++ b/xen/common/tmem.c @@ -1845,8 +1845,6 @@ static int do_tmem_destroy_pool(uint32_t pool_id) struct client *client = current->domain->tmem_client; struct tmem_pool *pool; - if ( client->pools == NULL ) - return 0; if ( pool_id >= MAX_POOLS_PER_DOMAIN ) return 0; if ( (pool = client->pools[pool_id]) == NULL )