Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp169295lqp; Wed, 22 May 2024 00:14:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWXJ0KOv8UJMfpOWWxr7U/t2iHHcwY/8qdcsr0TK88/E3kHOhnggFWWYO2n8BdrXfms42vE308uLGikN8ADrlyL/7n2TpJ1qbO7dvooEw== X-Google-Smtp-Source: AGHT+IG+tvgXAyQrSsHZ8kuw3rPve6VrwQz17t9SoI3Q2PCOWzbCH8nnTKvCwKBQPl2wHcOGcRlI X-Received: by 2002:a17:90a:7306:b0:2b2:b02d:3ffd with SMTP id 98e67ed59e1d1-2bd9f46df54mr1375829a91.15.1716362071473; Wed, 22 May 2024 00:14:31 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b671471a1bsi1803895a91.99.2024.05.22.00.14.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 00:14:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185843-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=nCo5Kpl8; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-185843-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185843-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 34618B21462 for ; Wed, 22 May 2024 07:14:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EEC297C6D4; Wed, 22 May 2024 07:14:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nCo5Kpl8" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CD657BB06; Wed, 22 May 2024 07:14:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716362054; cv=none; b=I2878wXc2Eco237WnPt8VpgINa2PuvqxhQeaf3O3QVSw5OrKvD9Jkwd0grcBi3SVkbf9Hr1M0FPkGXVttnCxQZq55Gl8AZMzze+/Fs8VwNSE0EDlZcUqaq7lyrUX6jeoRFnAEk7V+Qx6KXyLnDeAz1vTtuN42TEHCvVESIqyBEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716362054; c=relaxed/simple; bh=TlQ0uuVIHzbHxyVEL3n6tWns0j3sTNIMm88GfvOupfA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=cZpojh45O6s96FLqwN7OuwOzQ+mEG4y0ega0JW1xI2DWmWkHB0Qf/EBZU6oqtZ1a9BYga6lrdLKbIxFi2BxHDeFsnSw2v3waNEro7SLyDDWmKYM4B1ufYHq3nndMBKdW5mUtMxTAm6u4ue3U7KH/yFr6TlMmYW+WxG9wR9SLeB0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nCo5Kpl8; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a5d67064885so499399266b.1; Wed, 22 May 2024 00:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716362051; x=1716966851; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kIdChEw5DvBFSfSpnHNPUpxstFzR4q/9Q7FfD5YW1qs=; b=nCo5Kpl8Fc+kIrTNuH+YNv0p01Cs5iAvWsVM5UBHcDxyRiQD6c2vZSQ9euazVar53D 0UbZ+i/Io3L8w7HI9V4R33vAHAfSIWHxQIN7iCbftzHOFSHiJT8uBq78yfAQqdnHJH8R thXSZtEgR90dbd0IS2itPrZuVwcroPsos5Dok2wE8sPsLuPoKUPOgVHOjFcVlW3OBgju GbGQb04YzlRv+x/+D50XMiFw8ugXVBNO3vEVqskhA1g/8J98E2Y395NAZ5E9XCqjQjW8 TLrID+/1E6HQ+zQ8a5XFYlTGRbv33ZFYpMd/PLABazj9g+inK5r9xHdcgb9PNVBJSdBX GdqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716362051; x=1716966851; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kIdChEw5DvBFSfSpnHNPUpxstFzR4q/9Q7FfD5YW1qs=; b=qsdRSrn1TiyFQ5799tCDezgE6oivQE0Gm5U/1iBvUxsdTzI9A8MRfjjeRzltH/3A1p fMpl/a/oJmj+LnxDWR4LDBhksHUqKZkf68XG21pXPV2ycz45NpMKosCf3a/hEpxyJcrI s854H15+uP7EbG66MY+kmgTnr14ZYjtc52hV4OyN4x92Z4bkDWIXFYRF7OxzCMJufrIH Pff1lqvBM+t5r64DxSjj+OCccYlfO/3Ag/jAKux/6WMFTkFgCSP3SjmHjgLYJv4Uzigf ac0zpQJGv5+LXBqhKX2z2CUQgD4gn++W6G+SaGpkSYPFDQOlWx8SC/3KxoFZTaiywzn8 1N+A== X-Forwarded-Encrypted: i=1; AJvYcCVVAzKLes1RrNTgLwuAr+wlBYas31OwUEifMxjOyfQ+AimK9rdPh3xUZAU54mqWZMnrEaMN9uQQzbRwT5f/1fohSaMjsL1vZjyukNUJAOfhlCKhsNeypzYwJyoKXQBmWtyJIHAdWLSWxH39yel+Av4RPvhj0nfBSjHJWchbfUCXI27ElnzGot1eLwgNSbQWNdtZDZ/di+01eXmxf+wzmfEhg7Zi X-Gm-Message-State: AOJu0YwjA9FEvCuoaAFcJpiwBo/DqjVHAzc9v5QKbW2oH66WSEuMQPY/ 1g3GWeNisDPG+So/Hm5eUgOb1KV9oFJJ3J1uk47tUGYYMHDlAmGowhhRhL/xYD6ZpbMZisq3pzB BeIAmA5yj7i0p51ahqpPg+XNlTc8= X-Received: by 2002:a17:906:31c6:b0:a5a:7d28:54aa with SMTP id a640c23a62f3a-a62280d6175mr117645766b.23.1716362050534; Wed, 22 May 2024 00:14:10 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240506150830.23709-1-johan+linaro@kernel.org> <20240506150830.23709-12-johan+linaro@kernel.org> In-Reply-To: From: Andy Shevchenko Date: Wed, 22 May 2024 10:13:33 +0300 Message-ID: Subject: Re: [PATCH 11/13] mfd: pm8008: rework driver To: Johan Hovold 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 22, 2024 at 9:49=E2=80=AFAM Johan Hovold wro= te: > On Fri, May 10, 2024 at 04:15:43PM +0300, Andy Shevchenko wrote: > > On Thu, May 9, 2024 at 12:42=E2=80=AFPM 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 =3D 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 eve= r > > > 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(). > > > > > + name =3D devm_kasprintf(dev, GFP_KERNEL, "%pOF-internal", dev= ->of_node); > > > > > > > > You are using fwnode for IRQ domain and IRQ domain core uses fwnode= , why OF here? > > > > > > > > name =3D devm_kasprintf(dev, GFP_KERNEL, "%pfw-internal", dev= _fwnode(dev)); > > > > > > This driver only support OF so why bother. > > > > Sure, but it makes a bit of inconsistency. > > No, I don't consider this an inconsistency. Again, *this* is an OF > driver, other subsystems need to deal with ACPI and use fwnode. OK. --=20 With Best Regards, Andy Shevchenko