Skip to content

Commit

Permalink
Merge tag 'libnvdimm-for-6.13' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Linus Torvalds committed Nov 26, 2024
2 parents 2c22dc1 + f3dd9ae commit 78a2cbd
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 28 deletions.
7 changes: 0 additions & 7 deletions drivers/dax/pmem/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions drivers/dax/pmem/pmem.c

This file was deleted.

4 changes: 2 additions & 2 deletions drivers/nvdimm/dax_devs.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns)

nvdimm_bus_lock(&ndns->dev);
nd_dax = nd_dax_alloc(nd_region);
nd_pfn = &nd_dax->nd_pfn;
dax_dev = nd_pfn_devinit(nd_pfn, ndns);
dax_dev = nd_dax_devinit(nd_dax, ndns);
nvdimm_bus_unlock(&ndns->dev);
if (!dax_dev)
return -ENOMEM;
pfn_sb = devm_kmalloc(dev, sizeof(*pfn_sb), GFP_KERNEL);
nd_pfn = &nd_dax->nd_pfn;
nd_pfn->pfn_sb = pfn_sb;
rc = nd_pfn_validate(nd_pfn, DAX_SIG);
dev_dbg(dev, "dax: %s\n", rc == 0 ? dev_name(dax_dev) : "<none>");
Expand Down
7 changes: 7 additions & 0 deletions drivers/nvdimm/nd.h
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,13 @@ struct nd_dax *to_nd_dax(struct device *dev);
int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns);
bool is_nd_dax(const struct device *dev);
struct device *nd_dax_create(struct nd_region *nd_region);
static inline struct device *nd_dax_devinit(struct nd_dax *nd_dax,
struct nd_namespace_common *ndns)
{
if (!nd_dax)
return NULL;
return nd_pfn_devinit(&nd_dax->nd_pfn, ndns);
}
#else
static inline int nd_dax_probe(struct device *dev,
struct nd_namespace_common *ndns)
Expand Down
2 changes: 1 addition & 1 deletion drivers/nvdimm/nd_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static int virtio_pmem_flush(struct nd_region *nd_region)
dev_info(&vdev->dev, "failed to send command to virtio pmem device\n");
err = -EIO;
} else {
/* A host repsonse results in "host_ack" getting called */
/* A host response results in "host_ack" getting called */
wait_event(req_data->host_acked, req_data->done);
err = le32_to_cpu(req_data->resp.ret);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/nvdimm/pfn_devs.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)

if (!nd_pfn->uuid) {
/*
* When probing a namepace via nd_pfn_probe() the uuid
* When probing a namespace via nd_pfn_probe() the uuid
* is NULL (see: nd_pfn_devinit()) we init settings from
* pfn_sb
*/
Expand Down
2 changes: 1 addition & 1 deletion drivers/nvdimm/pmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ static long pmem_dax_direct_access(struct dax_device *dax_dev,
* range, filesystem turns the normal pwrite to a dax_recovery_write.
*
* The recovery write consists of clearing media poison, clearing page
* HWPoison bit, reenable page-wide read-write permission, flush the
* HWPoison bit, re-enable page-wide read-write permission, flush the
* caches and finally write. A competing pread thread will be held
* off during the recovery process since data read back might not be
* valid, and this is achieved by clearing the badblock records after
Expand Down
6 changes: 0 additions & 6 deletions include/linux/dax.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ struct dax_operations {
*/
long (*direct_access)(struct dax_device *, pgoff_t, long,
enum dax_access_mode, void **, pfn_t *);
/*
* Validate whether this device is usable as an fsdax backing
* device.
*/
bool (*dax_supported)(struct dax_device *, struct block_device *, int,
sector_t, sector_t);
/* zero_page_range: required operation. Zero page range */
int (*zero_page_range)(struct dax_device *, pgoff_t, size_t);
/*
Expand Down

0 comments on commit 78a2cbd

Please sign in to comment.