summaryrefslogtreecommitdiff
path: root/drivers/dax/kmem.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2021-02-24 05:13:45 +0300
committerDan Williams <dan.j.williams@intel.com>2021-02-24 05:13:45 +0300
commit64ffe84320745ea836555ad207ebfb0e896b6167 (patch)
tree5b4a930b3318b488937000c3dea06659d3c5af84 /drivers/dax/kmem.c
parent1f975074634a63f014e2b7e76852ee6d6005a91d (diff)
parent0d519e0d52ee7c532d4018b90cd0b042d374c06d (diff)
downloadlinux-64ffe84320745ea836555ad207ebfb0e896b6167.tar.xz
Merge branch 'for-5.12/dax' into for-5.12/libnvdimm
Pick up device-dax updates to merge with libnvdimm device updates for 5.12. * Fix the polarity of EINVAL in a sysfs return code * Drop the unused return code for driver remove() callbacks
Diffstat (limited to 'drivers/dax/kmem.c')
-rw-r--r--drivers/dax/kmem.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index 403ec42472d1..ac231cc36359 100644
--- a/drivers/dax/kmem.c
+++ b/drivers/dax/kmem.c
@@ -136,7 +136,7 @@ err_res_name:
}
#ifdef CONFIG_MEMORY_HOTREMOVE
-static int dev_dax_kmem_remove(struct dev_dax *dev_dax)
+static void dev_dax_kmem_remove(struct dev_dax *dev_dax)
{
int i, success = 0;
struct device *dev = &dev_dax->dev;
@@ -176,11 +176,9 @@ static int dev_dax_kmem_remove(struct dev_dax *dev_dax)
kfree(data);
dev_set_drvdata(dev, NULL);
}
-
- return 0;
}
#else
-static int dev_dax_kmem_remove(struct dev_dax *dev_dax)
+static void dev_dax_kmem_remove(struct dev_dax *dev_dax)
{
/*
* Without hotremove purposely leak the request_mem_region() for the
@@ -190,7 +188,6 @@ static int dev_dax_kmem_remove(struct dev_dax *dev_dax)
* request_mem_region().
*/
any_hotremove_failed = true;
- return 0;
}
#endif /* CONFIG_MEMORY_HOTREMOVE */