summaryrefslogtreecommitdiff
path: root/drivers/dax
diff options
context:
space:
mode:
authorHuaisheng Ye <yehs1@lenovo.com>2018-07-30 10:15:46 +0300
committerDave Jiang <dave.jiang@intel.com>2018-07-30 19:39:28 +0300
commite0b401e3fef0f81fd87434793db1adb0d7568058 (patch)
treec0f68108b5d37ee18f15b4dfb0b48f234917808c /drivers/dax
parent45df5d3dc0c7289c1e67afe6d2ba806ad5174314 (diff)
downloadlinux-e0b401e3fef0f81fd87434793db1adb0d7568058.tar.xz
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);