Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp731514rdb; Sat, 6 Jan 2024 06:56:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IF05dgoin8S/woN9bnokr/tgyd7XJ8up7f42qo+Z2ny+CnwAqSzSmZFwDGMH0bTRMhiTZRu X-Received: by 2002:a05:6512:1092:b0:50e:7e13:813a with SMTP id j18-20020a056512109200b0050e7e13813amr431156lfg.61.1704552972846; Sat, 06 Jan 2024 06:56:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704552972; cv=none; d=google.com; s=arc-20160816; b=k0Tg6b7EubRLZ3EKiwitKwJVBBYHOjqDdkqdXDdc1sPhpvLQPvGxgSaVPddL6Gmzez xhqjIcW3G/R9lu1V58UYRBpomGggktfZDDHXE0LebuIf+zc2QlyeUViemAmI87E2b32q 7YSRS2B9s5Rrda0/HB7+5/3RIGtU8zUgwK9Q8u7n/RXp7EtoY2N/gnhwn7iZDXiuMr8b krBIAXrBLLP55q8VZh78DtXgCPvvc7+t42W19WbGKiewR+vFr4pWyUfS2ZBE3VNI+c+P jcwCpubyqT1iX7CONGVpvLZCIpj5aLp7OJC0REDKdeBlfZLlGQxwiTsq7Gc3J8lfgUeb FQIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=JXY5LGajxL4/h51dS8O6rkdc5BXKpGg9lYCVUQfMcaY=; fh=ePOSUn6go9/OPI0dyivxj2dlh2pL6sXIm7tB9WpOmV8=; b=mXwvA23De0FjAjwNdV17bMqNcU/7w8tkjc9qQLgIkqAd3daoy8AJL0NuW4xzoqCZOi 7qEBDq2c/1XbQk4irk6orEqpelhliGSwUWX7h2DVJ1dLDF0M1V64LSAJtIHK/wv5jvAL QSKTWgVOkx/hpD48ugbtgOlrfrFjgJyOoAGvsTgmONdFmJZm7Im2QOKDGc+aEVy+qyEA t3q/WvKAQia6rjjXtoLUl1ciSuzpmGr79VWts2pPaRqNB4g4LS0QjDxaL7G1sK+iGEZF BwtnCvrYwUzYXxUWYEtfv/8qdUOiJr794tgOZAnMCsZDJlvKhoTwTcqCKgsPk/8IZqsa rj3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=oCsn6TCE; spf=pass (google.com: domain of linux-kernel+bounces-18609-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id o23-20020a1709062e9700b00a1d5063b024si1442604eji.720.2024.01.06.06.56.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 06:56:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18609-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=oCsn6TCE; spf=pass (google.com: domain of linux-kernel+bounces-18609-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 9310C1F22018 for ; Sat, 6 Jan 2024 14:56:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CE2DC132; Sat, 6 Jan 2024 14:56:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="oCsn6TCE" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 0950FC12A for ; Sat, 6 Jan 2024 14:56:05 +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=1704552966; x=1736088966; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=dXTx/XeIcZvKEX0bwQ0/pKpd2DVP5McBkOgOXRxpbxk=; b=oCsn6TCE/N3Y8nsz9YQKjj4i2LXPDvQHLmashJDcB+kffTBajme9A6It gaK09X+4GxuxyrWhhFcbqxX569UTNLPzI1mfK2MlekgT0yfqGv+HWjVe8 Dhe6GX+Fee0hO+mcSm4KFZ6X7HRwmIcQpYLpz/Qptl4xK8Lrpxg/ySQp1 H7lBG3c6/H9+bjOYgAybvRcKsXDz7Eyvwb9njrN1vV3VIOWUyjNhyUzf/ uT4vxOGMdf9kpz1umTpxYpWR0SHSivIJLP2hxZvSKGSeyxOMxkoEukyJp U7PqyKRLWMYdgVg480GG1EIE8XmQVG6etor26cLN7G1+3vhXqV6gvuvty A==; X-IronPort-AV: E=McAfee;i="6600,9927,10945"; a="4429270" X-IronPort-AV: E=Sophos;i="6.04,337,1695711600"; d="scan'208";a="4429270" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2024 06:56:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10945"; a="1028013610" X-IronPort-AV: E=Sophos;i="6.04,337,1695711600"; d="scan'208";a="1028013610" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2024 06:56:00 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rM85d-0000000BvzY-1nd5; Sat, 06 Jan 2024 16:55:57 +0200 Date: Sat, 6 Jan 2024 16:55:57 +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=us-ascii Content-Disposition: inline In-Reply-To: <20240102140734.v4.23.Ife9ebad2bbfbab3a05e90040f344d750aa0aac7e@changeid> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Tue, Jan 02, 2024 at 02:07:47PM -0700, Mark Hasemeyer wrote: > Unify handling of ACPI, GPIO, devictree, and platform resource > interrupts in platform_get_irq_optional(). Each of these subsystems > provide their own APIs which provide IRQ information as a struct > resource. This simplifies the logic of the function and allows callers > to get more information about the IRQ by looking at the resource flags. > For example, whether or not an IRQ is wake capable. ... > + 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; ... > + struct resource *platform_res = platform_get_resource(dev, IORESOURCE_IRQ, num); Same comment, please split definition and assignment. -- With Best Regards, Andy Shevchenko