aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hugetlb.h
diff options
context:
space:
mode:
authorChen Gang <gang.chen.5i5j@gmail.com>2016-05-20 16:57:59 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-20 17:58:30 -0700
commit7fab358d90e6ba9d9cb702bee0c8a5f5c13bb6df (patch)
tree8b731c514818ebc3c232241c449914f846c3f651 /include/linux/hugetlb.h
parentmm/swap.c: put activate_page_pvecs and other pagevecs together (diff)
downloadlinux-dev-7fab358d90e6ba9d9cb702bee0c8a5f5c13bb6df.tar.xz
linux-dev-7fab358d90e6ba9d9cb702bee0c8a5f5c13bb6df.zip
include/linux/hugetlb*.h: clean up code
Macro HUGETLBFS_SB is clear enough, so one statement is clearer than 3 lines statements. Remove redundant return statements for non-return functions, which can save lines, at least. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r--include/linux/hugetlb.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index e44c57876e89..7ef4b635015d 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -353,9 +353,7 @@ extern unsigned int default_hstate_idx;
static inline struct hstate *hstate_inode(struct inode *i)
{
- struct hugetlbfs_sb_info *hsb;
- hsb = HUGETLBFS_SB(i->i_sb);
- return hsb->hstate;
+ return HUGETLBFS_SB(i->i_sb)->hstate;
}
static inline struct hstate *hstate_file(struct file *f)