mbox series

[v2,0/5] dax-device: Some cleanups

Message ID 20210205222842.34896-1-uwe@kleine-koenig.org (mailing list archive)
Headers show
Series dax-device: Some cleanups | expand

Message

Uwe Kleine-König Feb. 5, 2021, 10:28 p.m. UTC
Hello,

I didn't get any feedback for the (implicit) v1 of this series that
started with Message-Id: 20210127230124.109522-1-uwe@kleine-koenig.org,
but I identified a few improvements myself:

 - Use "dax-device" consistently as a prefix
 - Instead of requiring a .remove callback, make it explicitly
   optional. (Drop checking for .remove from former patch 1, introduce
   new patch "Properly handle drivers without remove callback")
 - The new patch about remove being optional allows to simplify one of
   the two dax drivers which is implemented in patch 4
 - Patch 5 got a bit smaller because we now have one driver less with a
   remove callback.
 - Added Andrew to To: as he merged dax drivers in the past.

Andrew: Assuming you consider these patches useful, would you please
care for merging them?

Best regards
Uwe

Uwe Kleine-König (5):
  dax-device: Prevent registering drivers without probe callback
  dax-device: Properly handle drivers without remove callback
  dax-device: Fix error path in dax_driver_register
  dax-device: Drop an empty .remove callback
  dax-device: Make remove callback return void

 drivers/dax/bus.c    | 22 ++++++++++++++++++++--
 drivers/dax/bus.h    |  2 +-
 drivers/dax/device.c |  8 +-------
 drivers/dax/kmem.c   |  7 ++-----
 4 files changed, 24 insertions(+), 15 deletions(-)


base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e

Comments

Dan Williams Feb. 17, 2021, 3:48 a.m. UTC | #1
On Fri, Feb 5, 2021 at 2:29 PM Uwe Kleine-König <uwe@kleine-koenig.org> wrote:
>
> Hello,
>
> I didn't get any feedback for the (implicit) v1 of this series that
> started with Message-Id: 20210127230124.109522-1-uwe@kleine-koenig.org,
> but I identified a few improvements myself:
>
>  - Use "dax-device" consistently as a prefix
>  - Instead of requiring a .remove callback, make it explicitly
>    optional. (Drop checking for .remove from former patch 1, introduce
>    new patch "Properly handle drivers without remove callback")
>  - The new patch about remove being optional allows to simplify one of
>    the two dax drivers which is implemented in patch 4
>  - Patch 5 got a bit smaller because we now have one driver less with a
>    remove callback.
>  - Added Andrew to To: as he merged dax drivers in the past.
>
> Andrew: Assuming you consider these patches useful, would you please
> care for merging them?

I've routed device-dax patches through Andrew when they had core-mm
entanglements, but a pure device-dax series like this I can take
through my tree.

One small comment on patch5, otherwise looks good.
Dan Williams Feb. 17, 2021, 3:55 a.m. UTC | #2
On Tue, Feb 16, 2021 at 7:48 PM Dan Williams <dan.j.williams@intel.com> wrote:
>
> On Fri, Feb 5, 2021 at 2:29 PM Uwe Kleine-König <uwe@kleine-koenig.org> wrote:
> >
> > Hello,
> >
> > I didn't get any feedback for the (implicit) v1 of this series that
> > started with Message-Id: 20210127230124.109522-1-uwe@kleine-koenig.org,
> > but I identified a few improvements myself:
> >
> >  - Use "dax-device" consistently as a prefix
> >  - Instead of requiring a .remove callback, make it explicitly
> >    optional. (Drop checking for .remove from former patch 1, introduce
> >    new patch "Properly handle drivers without remove callback")
> >  - The new patch about remove being optional allows to simplify one of
> >    the two dax drivers which is implemented in patch 4
> >  - Patch 5 got a bit smaller because we now have one driver less with a
> >    remove callback.
> >  - Added Andrew to To: as he merged dax drivers in the past.
> >
> > Andrew: Assuming you consider these patches useful, would you please
> > care for merging them?
>
> I've routed device-dax patches through Andrew when they had core-mm
> entanglements, but a pure device-dax series like this I can take
> through my tree.
>
> One small comment on patch5, otherwise looks good.

I take it back, patch5 looks good. I was going to ask about the return
value removal for dax_bus_remove(), but that would need struct
bus_type to change prototypes.

All merged to the nvdimm tree.
Uwe Kleine-König Feb. 17, 2021, 6:39 a.m. UTC | #3
Hello Dan,

On 2/17/21 4:55 AM, Dan Williams wrote:
>> One small comment on patch5, otherwise looks good.
> 
> I take it back, patch5 looks good. I was going to ask about the return
> value removal for dax_bus_remove(), but that would need struct
> bus_type to change prototypes.

Changing struct bus_type::remove to return void is the eventual plan. To 
make this a pretty and easily reviewable patch I currently go through 
all buses and make sure that for the prototype change I only have to do 
one s/int/void/ and drop a "return 0" per bus.

> All merged to the nvdimm tree.

Great, thanks
Uwe