summaryrefslogtreecommitdiff
path: root/drivers/dax
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2020-11-20 12:20:57 +0300
committerDan Williams <dan.j.williams@intel.com>2020-12-18 00:52:28 +0300
commit8bcbe3132c66c07d03f64d5da80be753359f2e92 (patch)
tree1da7900e165214933e8780b5734b42b08c7233c0 /drivers/dax
parent1aa574312518ef1d60d2dc62d58f7021db3b163a (diff)
downloadlinux-8bcbe3132c66c07d03f64d5da80be753359f2e92.tar.xz
device-dax: delete a redundancy check in dev_dax_validate_align()
After we have done the alignment check for the length of each range, the alignment check for dev_dax_size(dev_dax) is no longer needed, because it get the sum of the length of each range. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20201120092057.2144-1-thunder.leizhen@huawei.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dax')
-rw-r--r--drivers/dax/bus.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
index 27513d311242..9761cb40d4bb 100644
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -1114,16 +1114,9 @@ static ssize_t align_show(struct device *dev,
static ssize_t dev_dax_validate_align(struct dev_dax *dev_dax)
{
- resource_size_t dev_size = dev_dax_size(dev_dax);
struct device *dev = &dev_dax->dev;
int i;
- if (dev_size > 0 && !alloc_is_aligned(dev_dax, dev_size)) {
- dev_dbg(dev, "%s: align %u invalid for size %pa\n",
- __func__, dev_dax->align, &dev_size);
- return -EINVAL;
- }
-
for (i = 0; i < dev_dax->nr_range; i++) {
size_t len = range_len(&dev_dax->ranges[i].range);