Re: [PATCH v2] mm/hmm/test: simplify hmm test code: use miscdevice instead of char dev

From: Jason Gunthorpe
Date: Fri Mar 18 2022 - 08:40:18 EST


On Thu, Mar 17, 2022 at 07:58:25PM -0700, John Hubbard wrote:
> In other words, given that the usage here is correct, is there some
> reason that miscdevice is still a poor design fit? Is cdev_device_add()
> a better choice here, for design reasons?

cdev's have become so easy to use I don't see the few loc reduction to
add miscdev that valuable. IMHO

> Also, is there any change that could or should be made to miscdevice,
> that you have in mind?

No, it is just a legacy interface that was simplifies drivers that
create a single char dev in static data that is widely misused.

IOW I wouldn't add new miscdevs.

Jason