OSDN Git Service

mm/hmm.c: suppress compilation warnings when CONFIG_HUGETLB_PAGE is not set
authorJason Gunthorpe <jgg@mellanox.com>
Mon, 27 May 2019 20:02:21 +0000 (17:02 -0300)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 6 Jun 2019 19:29:59 +0000 (16:29 -0300)
commit1c2308f0f03fdbbc674f53450eaa76943e0506f0
tree83425a0132c51ac15e4eb54c680da6a30a0b5708
parentf2c7c76c5d0a443053e94adb9f0918fa2fb85c3a
mm/hmm.c: suppress compilation warnings when CONFIG_HUGETLB_PAGE is not set

gcc reports that several variables are defined but not used.

For the first hunk CONFIG_HUGETLB_PAGE the entire if block is already
protected by pud_huge() which is forced to 0.  None of the stuff under the
ifdef causes compilation problems as it is already stubbed out in the
header files.

For the second hunk the dummy huge_page_shift macro doesn't touch the
argument, so just inline the argument.

Link: http://lkml.kernel.org/r/20190522195151.GA23955@ziepe.ca
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hmm.c