[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4gXw+a5uuZ_hwmb6n=P2x9fGfD_5TxAKZ+sB8=XePoJVA@mail.gmail.com>
Date: Thu, 24 Mar 2016 08:14:10 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Johannes Thumshirn <jthumshirn@...e.de>
Cc: "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 05/13] libnvdimm, blk: use devm_add_action to release bdev resources
On Thu, Mar 24, 2016 at 4:48 AM, Johannes Thumshirn <jthumshirn@...e.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@...ux.intel.com>
>> Signed-off-by: Dan Williams <dan.j.williams@...el.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);
...
};
Powered by blists - more mailing lists