lkml.org 
[lkml]   [2017]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] device-dax: don't set kobj parent during cdev init

On 11/02/17 11:27 AM, Dan Williams wrote:
> Why, when the lifetime of the cdev is already correct?

Well, it's only correct if you use the kobj parent trick which Greg is
arguing against. As someone reviewing/copying code that trick is
unclear, undocumented and it looks rather odd messing with internal
kobjects. Taking the explicit reference would be very clear, very
standard and only net one additional line.

> See commit ba09c01d2fa8 "dax: convert to the cdev api". I used to take
> explicit references like you suggest, but cdev made it cleaner.

I agree that, on the whole, that patch makes things a good deal cleaner.
I'm not so sure that this one small aspect is an improvement.

In any case, it's up to you. If you'd like I can certainly submit a v2
patch that adds the get/put.

Thanks,

Logan

\
 
 \ /
  Last update: 2017-02-11 19:44    [W:0.447 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site