From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 09/34] xen/common: tmem: Remove dumb check in do_tmem_destroy_pool Date: Thu, 3 Apr 2014 14:06:18 -0400 Message-ID: <20140403180616.GB24597@andromeda.dapyr.net> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> <1395766541-23979-10-git-send-email-julien.grall@linaro.org> <5331C583.9090001@citrix.com> <5331C86D.6070306@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WVm21-0004Bw-DH for xen-devel@lists.xenproject.org; Thu, 03 Apr 2014 18:06:30 +0000 Content-Disposition: inline In-Reply-To: <5331C86D.6070306@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: Julien Grall Cc: Andrew Cooper , tim@xen.org, stefano.stabellini@citrix.com, ian.campbell@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Tue, Mar 25, 2014 at 06:18:21PM +0000, Julien Grall wrote: > Hi Andrew, > > I just saw that a patch was already sent few months ago > (http://lists.xenproject.org/archives/html/xen-devel/2013-11/msg03664.html), > but never upstreamed. > > Konrad, I'm fine to drop this patch if you plan to send your series. Nah, lets use this patch. Thanks! Acked-by: Konrad Rzeszutek Wilk > > Regards, > > On 03/25/2014 06:05 PM, Andrew Cooper wrote: > > On 25/03/14 16:55, Julien Grall wrote: > >> 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 ) > > > > Coverity-ID:1055632 > > > > ~Andrew > > > >> 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 ) > > > > > -- > Julien Grall > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel