Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1364273

Re: [PATCH 05/13] libnvdimm, blk: use devm_add_action to release bdev resources

From Dan Williams <dan.j.williams@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 05/13] libnvdimm, blk: use devm_add_action to release bdev resources
Date 2016-03-24 16:30 +0100
Message-ID <rgfmW-4w7-13@gated-at.bofh.it> (permalink)
References <rg2g1-3vC-3@gated-at.bofh.it> <rgbW2-25h-7@gated-at.bofh.it> <rgfdg-4ss-21@gated-at.bofh.it> <rgfdh-4ss-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Mar 24, 2016 at 8:15 AM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
> On Donnerstag, 24. März 2016 08:14:10 CET Dan Williams wrote:
>> On Thu, Mar 24, 2016 at 4:48 AM, Johannes Thumshirn <jthumshirn@suse.de>
> wrote:
>> > On Mittwoch, 23. März 2016 18:25:47 CET Dan Williams wrote:
>> >> Register a callback to clean up the request_queue and put the gendisk at
>> >> driver disable time.
>> >>
>> >> Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
>> >> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>> >
>> > [...]
>> >
>> >>  static int nd_blk_remove(struct device *dev)
>> >>  {
>> >>
>> >> -     struct nd_blk_device *blk_dev = dev_get_drvdata(dev);
>> >> -
>> >>
>> >>       if (is_nd_btt(dev))
>> >>
>> >>               nvdimm_namespace_detach_btt(to_nd_btt(dev));
>> >>
>> >> -     else
>> >> -             nd_blk_detach_disk(blk_dev);
>> >> -     kfree(blk_dev);
>> >> -
>> >>
>> >>       return 0;
>> >>
>> >>  }
>> >
>> > Can't this be void?
>>
>> That's not how the core defines this:
>>
>> struct device_driver {
>> ...
>>         int (*remove) (struct device *dev);
>> ...
>> };
>
> Ah OK, didn't see this, sorry

No worries.  Thanks for the review!

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 05/13] libnvdimm,  blk: use devm_add_action to release bdev resources Dan Williams <dan.j.williams@intel.com> - 2016-03-24 02:30 +0100
  Re: [PATCH 05/13] libnvdimm, blk: use devm_add_action to release bdev resources Johannes Thumshirn <jthumshirn@suse.de> - 2016-03-24 12:50 +0100
    Re: [PATCH 05/13] libnvdimm, blk: use devm_add_action to release bdev resources Dan Williams <dan.j.williams@intel.com> - 2016-03-24 16:20 +0100
      Re: [PATCH 05/13] libnvdimm, blk: use devm_add_action to release bdev resources Johannes Thumshirn <jthumshirn@suse.de> - 2016-03-24 16:20 +0100
        Re: [PATCH 05/13] libnvdimm, blk: use devm_add_action to release bdev resources Dan Williams <dan.j.williams@intel.com> - 2016-03-24 16:30 +0100

csiph-web