On 2020/5/26 20:08, Jason Gunthorpe wrote: > On Tue, May 26, 2020 at 02:57:39AM +0000, liweihang wrote: >>> Also, if someone wants a project, all this endless stuff should be >>> using genmask and field_prep instead of this home grown stuff. >>> >> I took a look at this macro, FILED_PREP() can indeed simplify lots of >> similar codes in the hns driver. I will take a try and maybe prepare a >> patch/series to use it in v5.9. > > If you look in the git history you can find some Coccinelle spatch > stuff that makes work like this not too hard > > eg 91b60a7128d96244794beb9b324eb39273872da2 did something similar for > the IBA CM MADs > > Jason > I see, thanks for the commit-id. Weihang