Received: by 10.223.176.5 with SMTP id f5csp727980wra; Wed, 7 Feb 2018 06:37:13 -0800 (PST) X-Google-Smtp-Source: AH8x227egLe6jUMUMX+FPfuXLSF9tjitZQwPMKcv/C0fJiRzFlChJzJO3WT/lriCAGzNbfDBHO87 X-Received: by 10.99.151.74 with SMTP id d10mr5123152pgo.258.1518014233539; Wed, 07 Feb 2018 06:37:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518014233; cv=none; d=google.com; s=arc-20160816; b=MxzxDwOejWw+JSY2HVvVMihOXPDqy0xU04FqpWuJ1zypQ+95XfFp1WFdfnIf0NM8vz wFXSSEhWCmarPBqXy9+Q+UkJqIWWi+iKS4+vrdtzF5VJo4FKqr4t909oibdgplsBhvCa MOeyrJkEMuf7f5bwxXS1gr0QvMbW1dabBGi8BL2+K222E/BCLy7WJIiVtUiAwpQ0NG+M ZkGEJsQyHjVYuwIL0a+QFE3vWZMcGNBlxB8t118vBG5s9XziXIDcvBncHIy1YHDANzuE nhmyX6WXFzslAgRLtNud2sRJpPKOf1OUEzq6t8tnRa186CfUODBDaqrIWuAGJ5y644oJ zcXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=JErCNVIV+BE/R0WrwsZiJEHjDq+bRmbLFXMucMHSn68=; b=Q5fAxMCi90Lrw+ycnkCBqTfNnoLk84W7T63JFAYJoZdWHuHNFBnA5KbDoi2SGdBdbf VH7Wstb6uISOgmaZe1PwhxyiVW7nVWeZ3g7NuCF3GBlM0VFPKliyJj7Kcmp2wIizQGhS owA7qcp54FKnZ93wsHwKR+1oRPcLcdHDprPWJ/gskyiTHxRvyFq8z3ZncDR1TjEy4mxf OiLHi2zi3hwle+Kcb/R0m4sqtdWKP5jH4WOpWfiI0+Zg1FVfovD7tAEarI4eN4tJreA1 s2bBVKmtzjGfYysv3LzIH1UbVgtbHz62mAS5sqYUf8p8jr5HUJFWNUgjqc5vAH6aNl9e 17XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B6D7aVKO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i127si1004603pgc.565.2018.02.07.06.36.59; Wed, 07 Feb 2018 06:37:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B6D7aVKO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754478AbeBGOf1 (ORCPT + 99 others); Wed, 7 Feb 2018 09:35:27 -0500 Received: from mail-ot0-f194.google.com ([74.125.82.194]:46284 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754411AbeBGOfY (ORCPT ); Wed, 7 Feb 2018 09:35:24 -0500 Received: by mail-ot0-f194.google.com with SMTP id f56so949730otj.13 for ; Wed, 07 Feb 2018 06:35:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JErCNVIV+BE/R0WrwsZiJEHjDq+bRmbLFXMucMHSn68=; b=B6D7aVKOUD+ftwCKFGYfLxapUW1t3ple39Ihl9w0KA9md+NgeaTwpE4W1JG4aqvPTN fje1H3/3thLOYZJcBqUZ1GgBCxXTKNzWRoZj4W5X9OKW3zvNcqAW0rv1BRfnermmYYD+ HAnBJmCbDShz2zXoXFbLomoYQf8YxiHemmvMg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JErCNVIV+BE/R0WrwsZiJEHjDq+bRmbLFXMucMHSn68=; b=uWJNFfHif6+qgzMa2rp1HqwoRJXgOkrriHk6XUANyTxrsA5qZQfN5a/aqi2+XKzxHm l3qROZbprsQQpRQWxWtaVpM/clcef5j3h8milpe8JR2TY3LVUYLu/K5gqvzpgJMnp/vy MUgPfP2oRKoJPGEPTs4DOck1KtvZj6r7Gb92gibSHM+KuXkNypaeHc7z8usoivdPRuES +PLngOKqq3J1BXZ2ImXqBrTcTyDbaUzp4C5FqW/PUt3ku10r1m74HHEfSJKZiEEm64nx vatKJRJbAvXETQ6P423IE3kfHlJEQZF1yo0+aj/QKEiPRls20fkKXJ6QxNcv16KtbLnJ V4tA== X-Gm-Message-State: APf1xPBz2DdFwLu/M68J0ZXRGObZdfXp6kY6+JaIjVCizrgJ0dkkWV4R OJDlPklKUgAf2MF5NMjGO8gSw+sz/nyBQ7oSoltu9g== X-Received: by 10.157.69.13 with SMTP id w13mr4245505ote.33.1518014124157; Wed, 07 Feb 2018 06:35:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.59.203 with HTTP; Wed, 7 Feb 2018 06:35:03 -0800 (PST) In-Reply-To: <1517975986-46917-1-git-send-email-xieyisheng1@huawei.com> References: <1517975986-46917-1-git-send-email-xieyisheng1@huawei.com> From: Sumit Semwal Date: Wed, 7 Feb 2018 20:05:03 +0530 Message-ID: Subject: Re: [PATCH 1/2] staging: android: ion: Cleanup ion_page_pool_alloc_pages To: Yisheng Xie Cc: Greg Kroah-Hartman , Laura Abbott , devel@driverdev.osuosl.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yisheng, On 7 February 2018 at 09:29, Yisheng Xie wrote: > ion_page_pool_alloc_pages calls alloc_pages to allocate pages for page > pools. If alloc_pages return NULL, it will return NULL, or it will > return the pages allocate from alloc_pages. So we can just return > alloc_pages without any judgement. > With patch history comment addressed (same as the other patch you sent), > Signed-off-by: Yisheng Xie Please feel free to add my Acked-by: Sumit Semwal > --- > drivers/staging/android/ion/ion_page_pool.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c > index e3a6e32..6d2caf0 100644 > --- a/drivers/staging/android/ion/ion_page_pool.c > +++ b/drivers/staging/android/ion/ion_page_pool.c > @@ -11,13 +11,9 @@ > > #include "ion.h" > > -static void *ion_page_pool_alloc_pages(struct ion_page_pool *pool) > +static inline struct page *ion_page_pool_alloc_pages(struct ion_page_pool *pool) > { > - struct page *page = alloc_pages(pool->gfp_mask, pool->order); > - > - if (!page) > - return NULL; > - return page; > + return alloc_pages(pool->gfp_mask, pool->order); > } > > static void ion_page_pool_free_pages(struct ion_page_pool *pool, > -- > 1.7.12.4 > Best, Sumit.