summaryrefslogtreecommitdiffstats
path: root/drivers/dax
diff options
context:
space:
mode:
authorHuaisheng Ye2018-07-30 09:15:46 +0200
committerDave Jiang2018-07-30 18:39:28 +0200
commite0b401e3fef0f81fd87434793db1adb0d7568058 (patch)
treec0f68108b5d37ee18f15b4dfb0b48f234917808c /drivers/dax
parenttools/testing/nvdimm: kaddr and pfn can be NULL to ->direct_access() (diff)
downloadkernel-qcow2-linux-e0b401e3fef0f81fd87434793db1adb0d7568058.tar.gz
kernel-qcow2-linux-e0b401e3fef0f81fd87434793db1adb0d7568058.tar.xz
kernel-qcow2-linux-e0b401e3fef0f81fd87434793db1adb0d7568058.zip
dax/super: Do not request a pointer kaddr when not required
Function __bdev_dax_supported doesn't need to get local pointer kaddr from direct_access. Using NULL instead of having to pass in a useless local pointer that caller then just throw away. Signed-off-by: Huaisheng Ye <yehs1@lenovo.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'drivers/dax')
-rw-r--r--drivers/dax/super.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index 903d9c473749..c2f42b1f3363 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -88,7 +88,6 @@ bool __bdev_dax_supported(struct block_device *bdev, int blocksize)
bool dax_enabled = false;
pgoff_t pgoff;
int err, id;
- void *kaddr;
pfn_t pfn;
long len;
char buf[BDEVNAME_SIZE];
@@ -114,7 +113,7 @@ bool __bdev_dax_supported(struct block_device *bdev, int blocksize)
}
id = dax_read_lock();
- len = dax_direct_access(dax_dev, pgoff, 1, &kaddr, &pfn);
+ len = dax_direct_access(dax_dev, pgoff, 1, NULL, &pfn);
dax_read_unlock(id);
put_dax(dax_dev);