* [PATCH trivial] include/linux/huge_mm.h: Return NULL instead of false for pmd_trans_huge_lock()
@ 2016-03-28 14:49 chengang
2016-03-28 14:53 ` Kirill A. Shutemov
0 siblings, 1 reply; 2+ messages in thread
From: chengang @ 2016-03-28 14:49 UTC (permalink / raw)
To: akpm, kirill.shutemov, jmarchan, vbabka, willy, dan.j.williams,
dan.j.williams, mgorman, trivial
Cc: linux-kernel, Chen Gang, Chen Gang
From: Chen Gang <chengang@emindsoft.com.cn>
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 <gang.chen.5i5j@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH trivial] include/linux/huge_mm.h: Return NULL instead of false for pmd_trans_huge_lock()
2016-03-28 14:49 [PATCH trivial] include/linux/huge_mm.h: Return NULL instead of false for pmd_trans_huge_lock() chengang
@ 2016-03-28 14:53 ` Kirill A. Shutemov
0 siblings, 0 replies; 2+ messages in thread
From: Kirill A. Shutemov @ 2016-03-28 14:53 UTC (permalink / raw)
To: chengang
Cc: akpm, kirill.shutemov, jmarchan, vbabka, willy, dan.j.williams,
dan.j.williams, mgorman, trivial, linux-kernel, Chen Gang
On Mon, Mar 28, 2016 at 10:49:54PM +0800, chengang@emindsoft.com.cn wrote:
> From: Chen Gang <chengang@emindsoft.com.cn>
>
> 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 <gang.chen.5i5j@gmail.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-28 14:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-28 14:49 [PATCH trivial] include/linux/huge_mm.h: Return NULL instead of false for pmd_trans_huge_lock() chengang
2016-03-28 14:53 ` Kirill A. Shutemov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox