Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1166036pxx; Fri, 30 Oct 2020 03:56:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUCGQfbC6IexPrr9WEUjVcafnlzijGNyuUA7jMjJAqPYRYIpwohSSXov+AJymIqbcxJ1Qq X-Received: by 2002:a17:906:b0d6:: with SMTP id bk22mr1764790ejb.153.1604055363866; Fri, 30 Oct 2020 03:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604055363; cv=none; d=google.com; s=arc-20160816; b=ND8+JcNXahZaU0999JL56lmXqVZgsm7L0SnWi/eRK1SbeR40D+LD3tkSClbhAoPFfY LdTEKSa03LsE6UU5yxPWlR/PLWJFn7FwRJxdrYHGux85b4MJjMX1RvIh6A92TkaQsKTd ET2CaLS305DI3FOJ73AvDIw6A27tEaqVdK7FVocGOWRJiDEMNvYDQrB0p1htIS/9CRse Opzbc/nnvvQ6FL5Y70BpylAGtCG8Ohs1U8WXXNlK7Oj5Nkl9Z2uzv80x8/DzXbD2EZcl lvXw95urYxJBRIHOX1T/x5Mziom382+a4M1rt9MQ1xpZIG6QO154J1TWrkJj/HneSmGd OFKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=HZ3jKEDXZlqXtXgXWZosWZYuBzB1jkXYoNWcA+wZdxc=; b=Pv85zn7un6i3y1i8hEgzKDHfKW3TFxlmKyGByrWLv4/GZFY0XPl6rsSbi8vqzeV9GY tqCiY3q2kIBzQNogfkAmWYlz5TiKLxUh9FS6dJY8Rl/ggeGcHR+5uoRCQt2BBlGUQvuW ESBz8WzNmPf6v38KgSQofrD4FttxPwURPvwvbJFh84zbp/78uM/JI4Q3nsNp+uiWXwZA xHUKXo8HnMNiH89pAFRbzWoRlSlXaim/3jQLdbCtRd3b5rTrEFrQ92fljw3L5Z61/EBQ XV5MACbB6tlnqYEuscb+pXw0wmZ72rLE5xnUFqs5lVHFi3vAq4k/HUWm41XhCTCZ6nIM iXyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=TnAq0JDV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu8si4985377edb.95.2020.10.30.03.55.41; Fri, 30 Oct 2020 03:56:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=TnAq0JDV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726386AbgJ3Kww (ORCPT + 99 others); Fri, 30 Oct 2020 06:52:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726294AbgJ3Kwv (ORCPT ); Fri, 30 Oct 2020 06:52:51 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5247BC0613CF for ; Fri, 30 Oct 2020 03:52:11 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id h21so6994505iob.10 for ; Fri, 30 Oct 2020 03:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HZ3jKEDXZlqXtXgXWZosWZYuBzB1jkXYoNWcA+wZdxc=; b=TnAq0JDV19kWvbxA92eLES19ttE/Y4+2XhGiV0zhyUlwcuVbhprQpPq0ZQV+p1JqHI O4cvJJEB5wliVeYPxTumc9aXaH530u/UX9HqP/vNCI2+H9UjMgPnrn2PfWTkkX8aFZal zuRzHXhdUZjRSOIFCg/VRtay2lIk7B1PQRFeSCDJQrwZZa5KqF3n09xpbqqx2YWe6XPn YieuBV9edXHvcpbEi9BfDxyajn3f/0X5zH+EHF/Eg9a7WaoFklq5CpC36ppf/mLpYWHZ EP3rncmS93asi48WYZwo415QvqRG7Z7gHz/FuXK/z6XKFsVazoUn+9wFizdM5QLF0p/0 sCUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HZ3jKEDXZlqXtXgXWZosWZYuBzB1jkXYoNWcA+wZdxc=; b=au5Y/9sybVbDHux1FFMdqqJK7m8JRRgFjSSdbs20frv8i1HGRArlH85TtKW46TJYta zQmQ5h/zF5tkPwiEfNHcYwK3grU/Rs6UCHTiU0jzhQ1pmwcWhud77vCaoEzkQucswSc9 dW8hUjX5c4OW6XrJ4dm/XV39SP8nfpWU8NFTQslzZmZ7/ceN3+2w4B6ivbMXldPwhiOI r/e8mg1HjwsdNGJZyZ5eEclBQNcDyzHzLI+sHRcIeeibWUvfZmXXePuQl71qUUc6ORr+ XdNe6HaJmVCba5cCLiCO8ECuNCdsvi0osulO1/w5/qyayLZC0M49jlDNkNOTf+S49ZOC 1GPw== X-Gm-Message-State: AOAM530kiB3jQbFfNB/06QQdrDBvnU3TLnW64WNeNgdYKew5sOzyZ2PT fRSVYgxI1N6BVUo/PlmIdHBZdHK7Fs9GzYMJNnHa4A== X-Received: by 2002:a05:6602:2b90:: with SMTP id r16mr1276394iov.31.1604055130752; Fri, 30 Oct 2020 03:52:10 -0700 (PDT) MIME-Version: 1.0 References: <20201026133609.24262-1-brgl@bgdev.pl> <20201026133609.24262-5-brgl@bgdev.pl> <20201029154118.12fd6c23@archlinux> In-Reply-To: <20201029154118.12fd6c23@archlinux> From: Bartosz Golaszewski Date: Fri, 30 Oct 2020 11:52:00 +0100 Message-ID: Subject: Re: [PATCH 4/5] iio: adc: xilinx: use devres for irq handling To: Jonathan Cameron Cc: Lars-Peter Clausen , Peter Meerwald-Stadler , Michal Simek , linux-iio , Linux ARM , Linux Kernel Mailing List , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 29, 2020 at 4:41 PM Jonathan Cameron wrote: > > On Mon, 26 Oct 2020 14:36:08 +0100 > Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > 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 > > 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