Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1645597
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 06/24] thunderbolt: Introduce thunderbolt bus and connection manager |
| Date | 2017-05-19 15:20 +0200 |
| Message-ID | <tIPZ0-2G4-27@gated-at.bofh.it> (permalink) |
| References | <tIuKR-3YK-5@gated-at.bofh.it> <tIuUz-44c-39@gated-at.bofh.it> <tIwMG-5iy-11@gated-at.bofh.it> <tILsl-7S6-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 06/24] thunderbolt: Introduce thunderbolt bus and connection manager Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-05-18 16:50 +0200
Re: [PATCH 06/24] thunderbolt: Introduce thunderbolt bus and connection manager Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-18 18:50 +0200
Re: [PATCH 06/24] thunderbolt: Introduce thunderbolt bus and connection manager Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-05-19 10:30 +0200
Re: [PATCH 06/24] thunderbolt: Introduce thunderbolt bus and connection manager Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-19 15:20 +0200
Re: [PATCH 06/24] thunderbolt: Introduce thunderbolt bus and connection manager Lukas Wunner <lukas@wunner.de> - 2017-05-24 12:30 +0200
Re: [PATCH 06/24] thunderbolt: Introduce thunderbolt bus and connection manager Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-05-24 12:50 +0200
csiph-web