From: Christoph Hellwig Date: Mon, 16 Mar 2020 13:53:06 +0000 (+0100) Subject: mm/hmm: don't provide a stub for hmm_range_fault() X-Git-Tag: v5.7-rc1~131^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ddfaed17a779ddb728e5534a87596950842d6b04;p=thirdparty%2Fkernel%2Flinux.git mm/hmm: don't provide a stub for hmm_range_fault() All callers of hmm_range_fault depend on CONFIG_HMM_MIRROR, so don't bother with a stub. Link: https://lore.kernel.org/r/20200316135310.899364-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Zi Yan Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe --- diff --git a/include/linux/hmm.h b/include/linux/hmm.h index ddf9f7144c430..c102e359b59d2 100644 --- a/include/linux/hmm.h +++ b/include/linux/hmm.h @@ -225,17 +225,10 @@ static inline uint64_t hmm_device_entry_from_pfn(const struct hmm_range *range, /* Don't fault in missing PTEs, just snapshot the current state. */ #define HMM_FAULT_SNAPSHOT (1 << 1) -#ifdef CONFIG_HMM_MIRROR /* * Please see Documentation/vm/hmm.rst for how to use the range API. */ long hmm_range_fault(struct hmm_range *range, unsigned int flags); -#else -static inline long hmm_range_fault(struct hmm_range *range, unsigned int flags) -{ - return -EOPNOTSUPP; -} -#endif /* * HMM_RANGE_DEFAULT_TIMEOUT - default timeout (ms) when waiting for a range