Re: [PATCH v7 2/5] of: change overlay apply input data from unflattened to FDT

From: Jan Kiszka
Date: Wed Apr 25 2018 - 01:38:19 EST

On 2018-04-24 20:26, Alan Tull wrote:
> On Tue, Apr 24, 2018 at 11:08 AM, Alan Tull <atull@xxxxxxxxxx> wrote:
>> On Tue, Apr 24, 2018 at 12:29 AM, Jan Kiszka <jan.kiszka@xxxxxx> wrote:
>>> We have drivers/fpga/of-fpga-region.c in-tree, and that does not seem to
>>> store any pointers to objects, rather consumes them in-place. And I
>>> would consider it fair to impose such a limitation on the notifier
>>> interface.
>> The FPGA code was written assuming that overlays could be removed.
> To be more specific, drivers/fpga/of-fpga-region.c currently saves a
> pointer to the overlay and uses it only during the pre-apply
> notification.

Even more exactly: You are saving a reference during pre-apply and
freeing that one again on the corresponding post-remove. That is what I
would have expected as normal usage of the notification API as well.