[PATCH v1 1/1] nvdimm/namespace: drop nested variable in create_namespace_pmem()

2022-06-07 Thread Andy Shevchenko
Kernel build bot reported: namespace_devs.c:1991:10: warning: Local variable 'uuid' shadows outer variable [shadowVariable] Refactor create_namespace_pmem() by dropping a nested version of the same variable. Fixes: d1c6e08e7503 ("libnvdimm/labels: Add uuid helpers") Reported-by: kernel test r

[PATCH v1 1/1] nvdimm/namespace: drop unneeded temporary variable in size_store()

2022-06-07 Thread Andy Shevchenko
Refactor size_store() in order to remove temporary variable on stack by joining conditionals. Signed-off-by: Andy Shevchenko --- drivers/nvdimm/namespace_devs.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/name

[PATCH v1 1/1] nvdimm/namespace: return uuid_null only once in nd_dev_to_uuid()

2022-06-07 Thread Andy Shevchenko
Refactor nd_dev_to_uuid() in order to make code shorter and cleaner by joining conditions and hence returning uuid_null only once. Signed-off-by: Andy Shevchenko --- drivers/nvdimm/namespace_devs.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/nvdimm/namesp

[PATCH v2.1 08/14] fsdax: Output address in dax_iomap_pfn() and rename it

2022-06-07 Thread Shiyang Ruan
Add address output in dax_iomap_pfn() in order to perform a memcpy() in CoW case. Since this function both output address and pfn, rename it to dax_iomap_direct_access(). Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig Reviewed-by: Ritesh Harjani Reviewed-by: Dan Williams Reviewed-