Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp45928rdb; Sun, 14 Jan 2024 06:04:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVJmUwmYt6wBIh1R+dhI2OuXYorflBhbap0ZKy6SJNpek7tQAgSw3mrqUDp2NqWeb+mq8Z X-Received: by 2002:a17:906:4f8f:b0:a2b:d641:7b8f with SMTP id o15-20020a1709064f8f00b00a2bd6417b8fmr1351574eju.140.1705241076911; Sun, 14 Jan 2024 06:04:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705241076; cv=none; d=google.com; s=arc-20160816; b=mgkInK7FBfdJggK7Gb35BKxev8g4X6pI7KxPylqX3KzUfH/KAgarfSazOtTn7SiTQQ 0WWWifyQxPl8UTaJUr9n2E+9l51Vy9oWTugVBll3QA3rRjQrpb1vqCFwSczagWzpWW0L gFQM+pt/cFyW4Q/ihQmkzMysYlP5CdVZrq1IlzKB/kxjdCYSpZh3M0FryZGneHORW6Rw jSGCjrlDXCdBmdMx/0pOPlp2yr+51QeSbJz9vizFEJ/HgH96kFwGtL2whEqtOP4oCcpa 6ST8pfQpO8DZJSQ+zmgIhv63N5MzHkBY6DUEc3vukOwaCWUbVdX/Q7TSJ/u6UaNdtswl Am9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization: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=Zhj0OS0dRE+4q6CEludosnCOksxTTtX113Rs/yltaI4=; fh=ePOSUn6go9/OPI0dyivxj2dlh2pL6sXIm7tB9WpOmV8=; b=vCr7TwQmVrSn0Y2JqaJXPAoPtbtw7hIoeg8AeRfUwlTagGTSd9aGtMCxJLwGC9IaiU 8zPBLc6NwW+PEgthpcM/Tn/N4rxW7rEDdiKknd7EyBRysEL7VzFbK6RhN5cQDonSjnXl UebK2V3Gv+7YqulbLHt7hu8X8SefQBS8zvwhnltqrgLAQFrSXqvF8SMBUqeWypneSAS/ 9GvNa6pn8MDkQX4r2E0P0QecInTptEEHD2kzTbXJJWmre13m8rtt8bb47chZ3EWFhENG 7SpapWIK4UvS115YBHuny8LtNPjkzGKZ/qneGcAKFNFfexJudlA1X6fxn9coRUqcj73r oYdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=JPZ2Nfb2; spf=pass (google.com: domain of linux-kernel+bounces-25472-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25472-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l8-20020a1709060e0800b00a26f1e7bd43si2907058eji.588.2024.01.14.06.04.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 06:04:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25472-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=JPZ2Nfb2; spf=pass (google.com: domain of linux-kernel+bounces-25472-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25472-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id A10A71F2147F for ; Sun, 14 Jan 2024 14:04:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F66623C2; Sun, 14 Jan 2024 14:04:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JPZ2Nfb2" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) (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 B004C2100 for ; Sun, 14 Jan 2024 14:04:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705241067; x=1736777067; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=J1JX0Cshhx0Q6weURgRkBspdhkjFTuCCerMLcXl0RyM=; b=JPZ2Nfb2LoFixMQTtDXJOIQct/gzgg0GKHYlwdBbbzSXXyER+IVivE6k DuRwPGTq4qJqIfOF8tLd9nl1C0Rrw+obq/hV507rFlsRoGLXo75gvlSrg pFWdxPg1ArAEMSTrgKsLrPnKQnGNIGXUZnP6c1ArEV1jYWsKR/EsrDhRv p8TWyM+QinLbR+BG5BGsILPnwK6GleoxptYqCRRWeknBWaadifBZdSkfS J9gRdXuUrN9uc3KS9bE5/FMG1xKnQmA9ZroBAbQhXxIS9H4cmuzkFHBkz 9iWJCPebC+ws4qD24HBci8jjD51ip2qm6k4IhDG6WCteDjFhKR9ux2EXY g==; X-IronPort-AV: E=McAfee;i="6600,9927,10952"; a="403230112" X-IronPort-AV: E=Sophos;i="6.04,194,1695711600"; d="scan'208";a="403230112" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2024 06:04:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10952"; a="873847960" X-IronPort-AV: E=Sophos;i="6.04,194,1695711600"; d="scan'208";a="873847960" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2024 06:04:23 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rP163-0000000DuEH-3ECH; Sun, 14 Jan 2024 16:04:19 +0200 Date: Sun, 14 Jan 2024 16:04:19 +0200 From: Andy Shevchenko To: Mark Hasemeyer Cc: LKML , Sudeep Holla , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , Raul Rangel , Tzung-Bi Shih , David Gow , Greg Kroah-Hartman , Mark Brown , "Rafael J. Wysocki" , Takashi Iwai , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH v4 23/24] platform: Modify platform_get_irq_optional() to use resource Message-ID: References: <20240102210820.2604667-1-markhas@chromium.org> <20240102140734.v4.23.Ife9ebad2bbfbab3a05e90040f344d750aa0aac7e@changeid> 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: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Mon, Jan 08, 2024 at 12:09:10PM -0700, Mark Hasemeyer wrote: > On Sat, Jan 6, 2024 at 7:56 AM Andy Shevchenko > wrote: > > On Tue, Jan 02, 2024 at 02:07:47PM -0700, Mark Hasemeyer wrote: .. > > > + ret = fwnode_irq_get_resource(fwnode, num, r); > > > > I still prefer this not to return positive value. Since you _require_ @r to be > > not NULL, i.e. valid, the returning positive value makes no sense. > > > > > + ret = ret < 0 ? ret : 0; > > > + if (!ret || ret == -EPROBE_DEFER) > > > + goto out; > > I agree. But echoing my response from v3 patch 24: > - The fwnode patch is already reviewed and approved. > - The fwnode patch uses of_irq_to_resource() which already existed and > returns the irq number on success. The error handling translation will > just get pushed to the fwnode subsystem unless of_irq_to_resource() is > also modified which means updating 8 or so drivers that reference it. > > I can either: > -Leave it > -Modify the fwnode subsystem to perform the error translation of > of_irq_to_resource() > -Modify the fwnode and OF subsystems and update all driver references > > The fwnode and OF patches are already reviewed. I imagine coding > changes would imply dropping any Reviewed-by tags and requesting > another review? > I'd really prefer to not blow up the patch series anymore, but if you > feel strongly, we can come up with a solution. fwnode is quite generic API and I won't fail it from day 1. Yet we have already some deviations in fwnode/device vs. OF/ACPI cases (first comes to mind is device_for_each_child_node() which assumes "availability"). So, I would prefer fwnode API to not inherit issues/features of OF specific code. Maybe this can be considered as "yes, please update it". -- With Best Regards, Andy Shevchenko