Re: [PATCH 4/5] iio: adc: xilinx: use devres for irq handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 29, 2020 at 4:41 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
>
> On Mon, 26 Oct 2020 14:36:08 +0100
> Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
>
> > From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
> >
> > Further simplify the remove() callback and error paths in probe() by
> > using the managed variant of request_irq() as well as using a devm action
> > for cancelling the delayed work at driver detach.
> >
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
>
> Again, this is potentially fine but I'd rather you cleaned up the ordering first
> rather than doing things in this order.
>
> The end result of the whole series looks like it will be correct, but that isn't
> so obvious for the intermediate patches on their own.
>
> Also, you end up with a lot of noise renaming gotos that then go away at the
> end.
>
> Jonathan
>

Hi Jonathan,

My two priorities for the ordering of this series were: correct
end-result and not breaking anything on the way. The latter
unfortunately gets in the way of cleaner looking intermediate patches.

I tried to not alter the ordering in which the resources are freed at
any step. As devres release callbacks are called *after* remove() and
in a reverse order to how they were registered, I needed to start from
the bottom of the remove() callback and convert the last operation,
then go upwards from there.

If I tried to do it from the top - I probably could remove labels
earlier and in a cleaner manner but it wouldn't guarantee
bisectability.

Bartosz



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux