From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753896AbcC1OxS (ORCPT ); Mon, 28 Mar 2016 10:53:18 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33643 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751714AbcC1OxR (ORCPT ); Mon, 28 Mar 2016 10:53:17 -0400 Date: Mon, 28 Mar 2016 17:53:13 +0300 From: "Kirill A. Shutemov" To: chengang@emindsoft.com.cn Cc: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, jmarchan@redhat.com, vbabka@suse.cz, willy@linux.intel.com, dan.j.williams@intel.co, dan.j.williams@intel.com, mgorman@techsingularity.net, trivial@kernel.org, linux-kernel@vger.kernel.org, Chen Gang Subject: Re: [PATCH trivial] include/linux/huge_mm.h: Return NULL instead of false for pmd_trans_huge_lock() Message-ID: <20160328145313.GA25200@node.shutemov.name> References: <1459176594-1881-1-git-send-email-chengang@emindsoft.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1459176594-1881-1-git-send-email-chengang@emindsoft.com.cn> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 28, 2016 at 10:49:54PM +0800, chengang@emindsoft.com.cn wrote: > From: Chen Gang > > The return value of pmd_trans_huge_lock() is a pointer, not a boolean > value, so use NULL instead of false as the return value. > > Signed-off-by: Chen Gang Acked-by: Kirill A. Shutemov > --- > include/linux/huge_mm.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h > index 79b0ef6..7008623 100644 > --- a/include/linux/huge_mm.h > +++ b/include/linux/huge_mm.h > @@ -127,7 +127,7 @@ static inline spinlock_t *pmd_trans_huge_lock(pmd_t *pmd, > if (pmd_trans_huge(*pmd) || pmd_devmap(*pmd)) > return __pmd_trans_huge_lock(pmd, vma); > else > - return false; > + return NULL; > } > static inline int hpage_nr_pages(struct page *page) > { > -- > 1.9.3 > -- Kirill A. Shutemov