Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp185325lqp; Wed, 22 May 2024 01:00:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVAP6SMaFTBSDDmKKzVbo9a1gUppssBCJnJp5tJh4JI+DpezdCcEP2JL743Vpw55OyvgcPTHJt2/SYA2m7Yh69PYcrWxKcBwlAaSer1xQ== X-Google-Smtp-Source: AGHT+IFD0SbsV9N8eI54W41JE/0V1tjEHUCBEYGEN0NspS+AMhWNc5/uzgbXE5dPQeeXJ0k7W/0l X-Received: by 2002:a17:90a:d346:b0:2a4:b831:5017 with SMTP id 98e67ed59e1d1-2bd9f5fd184mr1230164a91.48.1716364845170; Wed, 22 May 2024 01:00:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716364845; cv=pass; d=google.com; s=arc-20160816; b=PALtJ4A9iTGEmcZjrx45rQ4hmYWJjObJqj1DcvZKnIMJtjoNUk6OESVTmqF1YZZHnE 7NAHQl69V3fEM3VxGMF8mpuJ3eRTmvylrFhySE0Q3vH5JN7fNWuLib9mAUHwsOkNsbIy TWiXwhFEP3slnLFNa2Zs05GQNh/p3depJjQrs48EWxDp+QU/vrkWAAhfNBkpQUDel56o Y15jsB8S/r56RMboH6J2CkkBqlTNzuAHKIKQ+UkPyaqgonEA1f9pmkbF3k6YD+wrnokq 1sbjGoMP9E9vCYthX/qAnGT++13mfHVKTaRuTZoR9Q3pNNK4IUwnvccZ1SxcpCH0lez2 xvlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JvnXgVIsvDK4vai7yse+WKgVEtooSap0tYuldEvhaIU=; fh=LqXStzZQsDG+l2vX5We/itClVRnXBfVNNYGf8Qhoiw8=; b=KpBAKyfNoAlIUxzX9Fyu6ruqWoDDgtXZ4agh8RPYMUNr2QN3MRzbzWsfQ0T9oXBAxa zQCIPuC7O5Nya1+2AUJZJSqVuhAe4MEFjYigoS3A8P/2bNKOJSmp+yP16H1q9RQ4uJPp 01Jt6ztLgpkgNeN5F8Lgree5raTI9/JShfaA1JPhTA2AkW5opuZh7j5nrYiEsgDf4aKl oFnxKVHbLVlc107MXhoubm3l74JtZPFfvfrCHm3VnfPtPwM5tsb80Y3XK7tJfNm+Uojj OYB/hJjSHfX5KzqbNBLBpzeDBSVreusFZgScb986qBYGRpRSfr6rW6UXVKk1VwwcQ3k7 znRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JrqtgxHH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185891-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b671471a2csi25406013a91.101.2024.05.22.01.00.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 01:00:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185891-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JrqtgxHH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185891-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1F5FC28292E for ; Wed, 22 May 2024 08:00:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87AF17EEE7; Wed, 22 May 2024 08:00:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JrqtgxHH" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2779182DB; Wed, 22 May 2024 08:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716364831; cv=none; b=REXW1qs/mM0XltAZU00+q2crMRaU6e4HliHC6O/hc7pVyFsO51FeS3IdjTYtA2os0EbE7SqI4UkPjjUzesjtFeocp9OEH63wJoULMhyAASJ5L384AjeB0j3dYkBKs5klVtxVqlgOMEV+6b25iZCTH5XVZBBQBc91C5CjYZUQwoU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716364831; c=relaxed/simple; bh=k03dfXKacAQksrmP4DO5pxvFhcvSvUfVXIXzKKP1VCQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CSoyLtk/t3ggFtj4qehS0bj3PfhN6R84kAWAT8aBPzLYcTBW0Ua99iN/nCTZevp5Oe0Jjr2Y3z0xL4M+wqrRhPLP0j9pg0XrzjFNqof/zrzZHgUo9vbgnCvHnQDGsE5OZQMFJ5zVxiL7lUvNysKTJ9GE+NKW+FULD42qcgtd8jk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JrqtgxHH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ADC8C32781; Wed, 22 May 2024 08:00:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716364831; bh=k03dfXKacAQksrmP4DO5pxvFhcvSvUfVXIXzKKP1VCQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JrqtgxHHQ73jfB7ZtvLDnbb5gv1FpAQmvRfxfjthcoGCksvmVCrUoIeHItMSHtuxz 6kFHJhJqOFcqar2hutAA0fITAM3V0kM3YXVes4g9QC+n/hnMyiTGuVPos1NGVCiswt 9kl7cKXk5V1NpeQ+Eg5MUtE0FzsgOmybdopoJTrfAEj/mnABxEMIpsLQYdyeWQpXJv me6/pzaRIG/3F2SUElz5lNnSjm31LiYQkuDEq8wDYzlILW8Y/V+K0IV0auW/C5Ivu0 FBnlQY8YW+ViIRqgcVYxPHO96fFaRbUZkva/Z+mY0FnT7zxBMTQjPMAlIp0n7WBPNI abYZxxfY72DoA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1s9gte-000000000fm-3hPm; Wed, 22 May 2024 10:00:27 +0200 Date: Wed, 22 May 2024 10:00:26 +0200 From: Johan Hovold To: Andy Shevchenko Cc: Johan Hovold , Lee Jones , Mark Brown , Linus Walleij , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Das Srinagesh , Satya Priya , Stephen Boyd , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH 11/13] mfd: pm8008: rework driver Message-ID: References: <20240506150830.23709-1-johan+linaro@kernel.org> <20240506150830.23709-12-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, May 22, 2024 at 10:13:33AM +0300, Andy Shevchenko wrote: > On Wed, May 22, 2024 at 9:49 AM Johan Hovold wrote: > > On Fri, May 10, 2024 at 04:15:43PM +0300, Andy Shevchenko wrote: > > > On Thu, May 9, 2024 at 12:42 PM Johan Hovold wrote: > > > > On Mon, May 06, 2024 at 10:18:58PM +0300, Andy Shevchenko wrote: > > > > > Mon, May 06, 2024 at 05:08:28PM +0200, Johan Hovold kirjoitti: > > > > > > +static void devm_irq_domain_fwnode_release(void *res) > > > > > > +{ > > > > > > > > > > > + struct fwnode_handle *fwnode = res; > > > > > > > > > > Unneeded line, can be > > > > > > > > > > static void devm_irq_domain_fwnode_release(void *fwnode) > > > > > > > > > > > + irq_domain_free_fwnode(fwnode); > > > > > > +} > > > > > > > > I think I prefer it this way for clarity and for type safety in the > > > > unlikely even that the argument to irq_domain_free_fwnode() would ever > > > > change. > > > > > > If it ever changes, the allocation part most likely would need an > > > update and since devm_add_action() takes this type of function, I > > > don't believe the argument would ever change from void * to something > > > else. With this it just adds an additional burden on the conversion. > > > > I was referring to the irq_domain_free_fwnode() prototype. > > And I also referred to that one. The release callback, i.e. the type > of the parameter, is solely defined by a caller of devm_add_action() > end friends, and in this case it means that if ever the type changes > (this is your argument why you want to have explicit line for that, > necessity of which I oppose) the devm_add_action() arguments also has > to be changed, it can't be done _just_ there, in > irq_domain_free_fwnode(). No, not necessarily, but as I already wrote above this is unlikely to ever be of practical concern. Johan