lkml.org 
[lkml]   [2017]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 06/24] thunderbolt: Introduce thunderbolt bus and connection manager
On Fri, May 19, 2017 at 11:15 AM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> On Thu, May 18, 2017 at 07:43:13PM +0300, Andy Shevchenko wrote:
>> On Thu, May 18, 2017 at 5:38 PM, Mika Westerberg
>> <mika.westerberg@linux.intel.com> wrote:

>> One nit below.
>>
>> > +static void tb_domain_release(struct device *dev)
>> > +{
>> > + struct tb *tb = container_of(dev, struct tb, dev);
>> > +
>> > + if (tb->ctl)
>> > + tb_ctl_free(tb->ctl);
>>
>> The usual pattern is to put such checks inside *_free() type of functions.
>
> tb_ctl_free() and these patterns are from the original code. I just
> moved the calls from tb.c intto here. No problem doing that change but I
> suppose that should be done first in a separate patch before this patch.

Precisely!

>> > +
>> > + destroy_workqueue(tb->wq);
>> > + ida_simple_remove(&tb_domain_ida, tb->index);
>> > + kfree(tb);
>> > +}

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2017-05-19 15:17    [W:0.135 / U:0.940 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site