]> Git Repo - linux.git/commitdiff
Merge tag 'libnvdimm-for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdim...
authorLinus Torvalds <[email protected]>
Wed, 24 Feb 2021 17:35:54 +0000 (09:35 -0800)
committerLinus Torvalds <[email protected]>
Wed, 24 Feb 2021 17:35:54 +0000 (09:35 -0800)
Pull libnvdimm and device-dax updates from Dan Williams:

 - Fix the error code polarity for the device-dax/mapping attribute

 - For the device-dax and libnvdimm bus implementations stop
   implementing a useless return code for the remove() callback.

 - Miscellaneous cleanups

* tag 'libnvdimm-for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  dax-device: Make remove callback return void
  device-dax: Drop an empty .remove callback
  device-dax: Fix error path in dax_driver_register
  device-dax: Properly handle drivers without remove callback
  device-dax: Prevent registering drivers without probe callback
  libnvdimm: Make remove callback return void
  libnvdimm/dimm: Simplify nvdimm_remove()
  device-dax: Fix default return code of range_parse()

1  2 
drivers/nvdimm/blk.c
drivers/nvdimm/pmem.c

diff --combined drivers/nvdimm/blk.c
index e03a1f38d75040660f45d44f1e63f3f70c2fa9f4,8a53728e13e68dd4927b94219aaf36f128b5e6c2..7b9556291eb1d789269b300ddd2f8b7e42814cb6
@@@ -165,7 -165,7 +165,7 @@@ static int nsblk_do_bvec(struct nd_name
  static blk_qc_t nd_blk_submit_bio(struct bio *bio)
  {
        struct bio_integrity_payload *bip;
 -      struct nd_namespace_blk *nsblk = bio->bi_disk->private_data;
 +      struct nd_namespace_blk *nsblk = bio->bi_bdev->bd_disk->private_data;
        struct bvec_iter iter;
        unsigned long start;
        struct bio_vec bvec;
  
        bip = bio_integrity(bio);
        rw = bio_data_dir(bio);
 -      do_acct = blk_queue_io_stat(bio->bi_disk->queue);
 +      do_acct = blk_queue_io_stat(bio->bi_bdev->bd_disk->queue);
        if (do_acct)
                start = bio_start_io_acct(bio);
        bio_for_each_segment(bvec, bio, iter) {
@@@ -310,11 -310,10 +310,10 @@@ static int nd_blk_probe(struct device *
                return nsblk_attach_disk(nsblk);
  }
  
- static int nd_blk_remove(struct device *dev)
+ static void nd_blk_remove(struct device *dev)
  {
        if (is_nd_btt(dev))
                nvdimm_namespace_detach_btt(to_nd_btt(dev));
-       return 0;
  }
  
  static struct nd_device_driver nd_blk_driver = {
diff --combined drivers/nvdimm/pmem.c
index 281fedb4dc4dc99a89c79319b134d495954a4962,062f0f22bac9074a2d4e696018cb8c9c4ca29203..b8a85bfb2e95b0bc6ed1cb8956be376700231fbf
@@@ -23,6 -23,7 +23,6 @@@
  #include <linux/uio.h>
  #include <linux/dax.h>
  #include <linux/nd.h>
 -#include <linux/backing-dev.h>
  #include <linux/mm.h>
  #include <asm/cacheflush.h>
  #include "pmem.h"
@@@ -196,13 -197,13 +196,13 @@@ static blk_qc_t pmem_submit_bio(struct 
        unsigned long start;
        struct bio_vec bvec;
        struct bvec_iter iter;
 -      struct pmem_device *pmem = bio->bi_disk->private_data;
 +      struct pmem_device *pmem = bio->bi_bdev->bd_disk->private_data;
        struct nd_region *nd_region = to_region(pmem);
  
        if (bio->bi_opf & REQ_PREFLUSH)
                ret = nvdimm_flush(nd_region, bio);
  
 -      do_acct = blk_queue_io_stat(bio->bi_disk->queue);
 +      do_acct = blk_queue_io_stat(bio->bi_bdev->bd_disk->queue);
        if (do_acct)
                start = bio_start_io_acct(bio);
        bio_for_each_segment(bvec, bio, iter) {
@@@ -563,7 -564,7 +563,7 @@@ static int nd_pmem_probe(struct device 
        return pmem_attach_disk(dev, ndns);
  }
  
- static int nd_pmem_remove(struct device *dev)
+ static void nd_pmem_remove(struct device *dev)
  {
        struct pmem_device *pmem = dev_get_drvdata(dev);
  
                pmem->bb_state = NULL;
        }
        nvdimm_flush(to_nd_region(dev->parent), NULL);
-       return 0;
  }
  
  static void nd_pmem_shutdown(struct device *dev)
This page took 0.080618 seconds and 4 git commands to generate.