From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: [PATCH 09/34] xen/common: tmem: Remove dumb check in do_tmem_destroy_pool Date: Tue, 25 Mar 2014 16:55:16 +0000 Message-ID: <1395766541-23979-10-git-send-email-julien.grall@linaro.org> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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: by mail-ee0-f51.google.com with SMTP id c13so684134eek.24 for ; Tue, 25 Mar 2014 09:56:07 -0700 (PDT) In-Reply-To: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org 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 --- 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 ) -- 1.7.10.4