Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2152343imw; Wed, 6 Jul 2022 00:36:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u1NiET/lr7QICxINiFSbZr/2qsVY96/IrkRZKDMg6vQZjPh4e5AtGNoCxTVtD3x3Grkekv X-Received: by 2002:a17:90b:33cd:b0:1ed:5a5f:70bf with SMTP id lk13-20020a17090b33cd00b001ed5a5f70bfmr48304638pjb.61.1657092971626; Wed, 06 Jul 2022 00:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657092971; cv=none; d=google.com; s=arc-20160816; b=r+TAH1B9OApasUfBRaOSwDADGNmCY+0c1DHH39j05Q8yoNs9wdFhCP20g/TSoBNCqe occ9Tw4syhRZGhQkFA5qllrTc6hDS6bmmpkjQkzlhsAgG9tXvw8i/G2Sp0X8lF9VcHK1 7NxflcmE/ACKVUnvlZkPvhgExAhcGMqQI1LUYyeNdky7qqGpRSXj9t+ROOmzWBfTElU7 kWrEg6mVe9tvL97+quS93wzQF/aGdAQN8Gn4A35ykSQVlQDgjdDD8n2VejNDSEEP6dYK FydUXT1ors08x89/5CiCKIY1CHKVeXe8b3dIxQ8j5Y9H1FC9AwXHiOVbSeH9gSA0KwZA 9eAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=SZ32tMy1YnRkF5r1av0++XpL7Wd0+A2MNXNpUMLWRQ4=; b=abAVrKaNuiodEGnZgvBJqEjwCInZM56+Uu6Hi0K27oZuhz/Sn3O+wBhPAixg2Wh/uV zbUA0EII0QWFSnNTTMjG6XHZTj8WBzDRaB7Xlpe5WXOnZXAmrCk5iMES9NrQ8ZDiZgk5 2Czz5/Rp/diXthn7jgBx3VtbyAnxJ/8zZu+kwJJtFyc64JbATfEkIUIpw8s7OTMAoyBS ivU+6MBCrQaa5PFKuBYLLduQfGabu6BvolMwOEjMDoyw/JqOnW+dErySS6mp/ry/AOmD YlxNFKsn1Ml/twxaJmpgOQdhIs9uqLi8XGjwiHwPj8MPseBjSY56xfHp00HyolRzvHQq WlYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t+PGTy4N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p2-20020a056a000b4200b00518a0f3ba68si12518058pfo.347.2022.07.06.00.35.59; Wed, 06 Jul 2022 00:36:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t+PGTy4N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230460AbiGFHB3 (ORCPT + 99 others); Wed, 6 Jul 2022 03:01:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229592AbiGFHBV (ORCPT ); Wed, 6 Jul 2022 03:01:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFB3D1EAFC; Wed, 6 Jul 2022 00:01:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9F093B81AE8; Wed, 6 Jul 2022 07:01:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C463C3411C; Wed, 6 Jul 2022 07:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657090878; bh=+cM9fbXgghc45VgTmM6OgjrtFCbCpn//QrK67G8SxMw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=t+PGTy4NrxmmE4XEqgl/Ogpy+Cnfpimwnc0xiX8KVK0JUyww/ppKs89RePW/5uzsp giOTLrbd8L++9gPSsDPtEC3M6tluCPSlyCCcLvjX8xqZfqVBXFA5RfkzQbMjiKRqUh 7vekQaK6qNdaFFVjg6KMbWlxXrAKjnEDv21PuY5E6IJ1B2aWdVIBcSBVuYpqcUosHp n8brPLCgqQRjgE6Yrnb96dpnuWvmjYmtYrHMZYtaFlvgBdI2Wz8XlLb29Ccpgg13X/ w13ynAMiJofDLsjBj9ODtCoE+s5FPkKffWpzGYQ/fzzQlFmfN1cJIej0kyZIfPlf2L g25PaWGEGZJqg== Received: from ip-185-104-136-29.ptr.icomera.net ([185.104.136.29] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o8z2A-005YBP-E3; Wed, 06 Jul 2022 08:01:16 +0100 Date: Wed, 06 Jul 2022 08:01:08 +0100 Message-ID: <87iloan2rv.wl-maz@kernel.org> From: Marc Zyngier To: "Lad, Prabhakar" Cc: Andy Shevchenko , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Linus Walleij , Bartosz Golaszewski , Philipp Zabel , devicetree , Linux-Renesas , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Biju Das , Lad Prabhakar Subject: Re: [PATCH v7 3/5] gpio: gpiolib: Allow free() callback to be overridden In-Reply-To: References: <20220703194020.78701-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220703194020.78701-4-prabhakar.mahadev-lad.rj@bp.renesas.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.104.136.29 X-SA-Exim-Rcpt-To: prabhakar.csengg@gmail.com, andy.shevchenko@gmail.com, tglx@linutronix.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, geert+renesas@glider.be, linus.walleij@linaro.org, brgl@bgdev.pl, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 05 Jul 2022 05:53:03 +0100, "Lad, Prabhakar" wrote: > > On Mon, Jul 4, 2022 at 5:16 PM Andy Shevchenko > wrote: > > > > On Sun, Jul 3, 2022 at 9:43 PM Lad Prabhakar wrote: > > > > > > Allow free() callback to be overridden from irq_domain_ops for > > > hierarchical chips. > > > > > > This allows drivers to free up resources which are allocated during > > > child_to_parent_hwirq()/populate_parent_alloc_arg() callbacks. > > > > > > On Renesas RZ/G2L platform a bitmap is maintained for TINT slots, a slot > > > is allocated in child_to_parent_hwirq() callback which is freed up in free > > > callback hence this override. > > > > Hmm... To me this sounds asymmetrical. We alloc something in another > > callback, which is not what this free is for. Perhaps it should be an > > optional > > > > free_populated_parent_arg() or alike? > > > @Marc your thoughts? I think there are enough optional callbacks, and we don't currently have a clear picture of how this may be used in the future, specially based on a sample of *one*. Let's get it in as is, and tweak things as we go, should another user require a slightly different behaviour. This also saves us the debate around the naming, which is always pretty useless. Thanks, M. -- Without deviation from the norm, progress is not possible.