Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1964324pxx; Sat, 31 Oct 2020 04:12:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKyN9Uvy5nsKsF1baXZMWOuimO+aeHjzt66r4RrQq50yxkJlzfJ28p7l4xBIzCietyIV1T X-Received: by 2002:a17:906:1411:: with SMTP id p17mr7072360ejc.102.1604142734281; Sat, 31 Oct 2020 04:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604142734; cv=none; d=google.com; s=arc-20160816; b=Y9JbT2oFopy0eTzOIsA/dbzZN/h8MlDnbWuYJ7zM7G8PnXHZ4h08Qdmx6vR6XnmbnD vrlaXJlIq6W/TS3zTlZs01Gy72aO11+w1Am23188c6cxocUERHFfACB6AecY4lA49ESR HIMbp6qPrS7zA9lxNRrgt3hkh7XhjKN7LwJl/Mf3kHVGXoj55Rmq6u5KSIEjJHo/drGX Zpte1xwKUJvF5BKbwFvjOx01jgLMd2vQ2Akn07PKKZX7RVTVboBl9eTNSoh8pna/lFbt 780jhDMFU7Hsmp+IK8PxA4tXZJEbOV0xOjWmDcme7pshlULTfMjlC4OauOslEThO/dgJ Hv4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Xe+iQZqiLFdLS108PsG1ap4VlioHUhTdhKVKc7tEYvY=; b=B3e0SZmnFFCxA487gJEQjhpHYNIk57CdwuPm2IYC+RbS9kEMo0Ng5paW5ooh5lnjRG B8yrq1Yh3zwTxVlVKq0QX1Z9JVNvLoK4Z6Q2BepX61XRXCWrbuaFKP8obqZLM3nc1NyW 7tl6mA2cYrD7Cg3lTl5/nwYQ2nBJeT2X5t2mAYnzEQjlluXD/FGGrck4JqY3puKFFMkb 363tcDCJxttTRhtYN+ZhmXpFW24l9QbnQ83u9BW6Q7Do+PcKuHhL7taFcOxWaxQ/xZw2 d394fw6oaSuucwZnggZ+Vdp1kxiW+g4zX8MnTMJr9nQP8EFFfUjKGrLadfiB0oGdfBED sQ5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oMhFeuoi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o15si6206844ejm.459.2020.10.31.04.11.51; Sat, 31 Oct 2020 04:12:14 -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=@kernel.org header.s=default header.b=oMhFeuoi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726832AbgJaLKI (ORCPT + 99 others); Sat, 31 Oct 2020 07:10:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:49110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726697AbgJaLKI (ORCPT ); Sat, 31 Oct 2020 07:10:08 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 404D2206E5; Sat, 31 Oct 2020 11:10:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604142607; bh=hkzEJUaBNUIIhzqu5SpbfUySyKicS5nTmpJjPg4g8ys=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oMhFeuoiz6y/py4aJtruc8WUCabyz5uMV3F4wOO8o+FvQKlVS4gHVV/N3mIlaRjBD /cMQ0V+G8RfzpF2f4GtpDkG+6Cn0TsX1F1wRFNwFAdVjAU2B10iVCvrbhQlAujyjE9 7VhZFhjgCW127opGjkZJ63lsYiRaEzErG0zAy8nw= Date: Sat, 31 Oct 2020 11:10:03 +0000 From: Jonathan Cameron To: Bartosz Golaszewski Cc: Lars-Peter Clausen , Peter Meerwald-Stadler , Michal Simek , linux-iio , Linux ARM , Linux Kernel Mailing List , Bartosz Golaszewski Subject: Re: [PATCH 4/5] iio: adc: xilinx: use devres for irq handling Message-ID: <20201031111003.75a4f6d0@archlinux> In-Reply-To: References: <20201026133609.24262-1-brgl@bgdev.pl> <20201026133609.24262-5-brgl@bgdev.pl> <20201029154118.12fd6c23@archlinux> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Oct 2020 11:52:00 +0100 Bartosz Golaszewski wrote: > 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. > Maybe best plan is to squash last 3 patches into one? I suspect that's going to be easier to review. Jonathan > Bartosz