Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1557756

Re: [PATCH 7/9] serdev: Introduce new bus for serial attached devices

From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 7/9] serdev: Introduce new bus for serial attached devices
Date 2017-01-12 21:00 +0100
Message-ID <sYTHs-80V-15@gated-at.bofh.it> (permalink)
References <sWFyV-4sv-3@gated-at.bofh.it> <sWFyV-4sv-1@gated-at.bofh.it> <sYcsO-6yc-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jan 10, 2017 at 3:46 PM, Pavel Machek <pavel@ucw.cz> wrote:
> Hi!
>
>> +static void serdev_ctrl_release(struct device *dev)
>> +{
>> +     struct serdev_controller *ctrl = to_serdev_controller(dev);
>> +     ida_simple_remove(&ctrl_ida, ctrl->nr);
>> +     kfree(ctrl);
>> +}
>
> Would it make sense to do something like to_serdev_controller(dev) =
> NULL; there?

That would be the same as adding "ctrl = NULL;" which would be
pointless. The struct device is embedded into serdev_controller.

Rob

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 7/9] serdev: Introduce new bus for serial attached devices Rob Herring <robh@kernel.org> - 2017-01-06 17:30 +0100
  Re: [PATCH 7/9] serdev: Introduce new bus for serial attached  devices Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-07 15:10 +0100
    Re: [PATCH 7/9] serdev: Introduce new bus for serial attached devices Rob Herring <robh@kernel.org> - 2017-01-12 21:20 +0100
  Re: [PATCH 7/9] serdev: Introduce new bus for serial attached devices Sebastian Reichel <sre@kernel.org> - 2017-01-08 23:50 +0100
  Re: [PATCH 7/9] serdev: Introduce new bus for serial attached devices Pavel Machek <pavel@ucw.cz> - 2017-01-10 22:50 +0100
    Re: [PATCH 7/9] serdev: Introduce new bus for serial attached devices Rob Herring <robh@kernel.org> - 2017-01-12 21:00 +0100

csiph-web