summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2018-03-15 09:42:33 +0100
committerMichal Hocko <mhocko@suse.com>2018-03-15 09:42:33 +0100
commit02ede1345ff68cd3e629864161c1d8adcef1eae5 (patch)
tree38d1c9a5abcf656e48ef9ad5681429cac033f317
parente29d24e83b5cd2a157b7b73a7310b6986914a18d (diff)
mm/hugetlb.c: clean up VM_WARN usage
Use VM_WARN return value, remove too-obvious comment. Cc: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Nic Losby <blurbdust@gmail.com> Cc: Yisheng Xie <xieyisheng1@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/hugetlb.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index d2f6e73e4afb..9c22b58b17db 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -4375,11 +4375,8 @@ int hugetlb_reserve_pages(struct inode *inode,
struct resv_map *resv_map;
long gbl_reserve;
- /* This should never happen */
- if (from > to) {
- VM_WARN(1, "%s called with a negative range\n", __func__);
+ if (VM_WARN(from > to, "%s called with a negative range\n", __func__))
return -EINVAL;
- }
/*
* Only apply hugepage reservation if asked. At fault time, an