Skip to content

Commit 78a2cbd

Browse files
committed
Merge tag 'libnvdimm-for-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull nvdimm and DAX updates from Ira Weiny: "Most represent minor cleanups and code removals. One patch fixes potential NULL pointer arithmetic which was benign because the offset of the member was 0. Nevertheless it should be cleaned up. - typo fixes - clarify logic to remove potential NULL pointer math - remove dead code" * tag 'libnvdimm-for-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Remove an unused field in struct dax_operations dax: delete a stale directory pmem nvdimm: rectify the illogical code within nd_dax_probe() nvdimm: Correct some typos in comments
2 parents 2c22dc1 + f3dd9ae commit 78a2cbd

File tree

8 files changed

+12
-28
lines changed

8 files changed

+12
-28
lines changed

drivers/dax/pmem/Makefile

Lines changed: 0 additions & 7 deletions
This file was deleted.

drivers/dax/pmem/pmem.c

Lines changed: 0 additions & 10 deletions
This file was deleted.

drivers/nvdimm/dax_devs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns)
106106

107107
nvdimm_bus_lock(&ndns->dev);
108108
nd_dax = nd_dax_alloc(nd_region);
109-
nd_pfn = &nd_dax->nd_pfn;
110-
dax_dev = nd_pfn_devinit(nd_pfn, ndns);
109+
dax_dev = nd_dax_devinit(nd_dax, ndns);
111110
nvdimm_bus_unlock(&ndns->dev);
112111
if (!dax_dev)
113112
return -ENOMEM;
114113
pfn_sb = devm_kmalloc(dev, sizeof(*pfn_sb), GFP_KERNEL);
114+
nd_pfn = &nd_dax->nd_pfn;
115115
nd_pfn->pfn_sb = pfn_sb;
116116
rc = nd_pfn_validate(nd_pfn, DAX_SIG);
117117
dev_dbg(dev, "dax: %s\n", rc == 0 ? dev_name(dax_dev) : "<none>");

drivers/nvdimm/nd.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,13 @@ struct nd_dax *to_nd_dax(struct device *dev);
600600
int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns);
601601
bool is_nd_dax(const struct device *dev);
602602
struct device *nd_dax_create(struct nd_region *nd_region);
603+
static inline struct device *nd_dax_devinit(struct nd_dax *nd_dax,
604+
struct nd_namespace_common *ndns)
605+
{
606+
if (!nd_dax)
607+
return NULL;
608+
return nd_pfn_devinit(&nd_dax->nd_pfn, ndns);
609+
}
603610
#else
604611
static inline int nd_dax_probe(struct device *dev,
605612
struct nd_namespace_common *ndns)

drivers/nvdimm/nd_virtio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static int virtio_pmem_flush(struct nd_region *nd_region)
9797
dev_info(&vdev->dev, "failed to send command to virtio pmem device\n");
9898
err = -EIO;
9999
} else {
100-
/* A host repsonse results in "host_ack" getting called */
100+
/* A host response results in "host_ack" getting called */
101101
wait_event(req_data->host_acked, req_data->done);
102102
err = le32_to_cpu(req_data->resp.ret);
103103
}

drivers/nvdimm/pfn_devs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
539539

540540
if (!nd_pfn->uuid) {
541541
/*
542-
* When probing a namepace via nd_pfn_probe() the uuid
542+
* When probing a namespace via nd_pfn_probe() the uuid
543543
* is NULL (see: nd_pfn_devinit()) we init settings from
544544
* pfn_sb
545545
*/

drivers/nvdimm/pmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static long pmem_dax_direct_access(struct dax_device *dax_dev,
316316
* range, filesystem turns the normal pwrite to a dax_recovery_write.
317317
*
318318
* The recovery write consists of clearing media poison, clearing page
319-
* HWPoison bit, reenable page-wide read-write permission, flush the
319+
* HWPoison bit, re-enable page-wide read-write permission, flush the
320320
* caches and finally write. A competing pread thread will be held
321321
* off during the recovery process since data read back might not be
322322
* valid, and this is achieved by clearing the badblock records after

include/linux/dax.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ struct dax_operations {
2727
*/
2828
long (*direct_access)(struct dax_device *, pgoff_t, long,
2929
enum dax_access_mode, void **, pfn_t *);
30-
/*
31-
* Validate whether this device is usable as an fsdax backing
32-
* device.
33-
*/
34-
bool (*dax_supported)(struct dax_device *, struct block_device *, int,
35-
sector_t, sector_t);
3630
/* zero_page_range: required operation. Zero page range */
3731
int (*zero_page_range)(struct dax_device *, pgoff_t, size_t);
3832
/*

0 commit comments

Comments
 (0)