From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 3762C847B for ; Sat, 6 Jan 2024 14:18:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fBU+SB2N" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704550714; x=1736086714; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=IZCz/MZA6E72BOm/MHR3k5Pv0uD88Tp+9lsZbl+gfxE=; b=fBU+SB2NBr1tdqCcUwOsk+6L5l5BGvOP78Vx/U4+reWKnXzobxUWmOKg O34iLDPlOtAj9HtZbcbqav0C+ViTa3Dbbzk6lklAyu4DclZhZhdg0Hso1 Z0sBwfDb1bzclkCqpYUmhEbwjBqXL0MWOupC7p5iiaffLc/y3QDKSnDoR 4ao4akMu4Dd20n0nAIMYvUAlJKfTkV/+m5GuoWcVcVQgJi7hyw5LtXG0r 4pc2F2Hn5meexpU+L+OoVX2ASJvVUKeOe9qQ3k4qYPoS7isMRUZ6u6xQh KWWdHZZ5RcwebekPgBTMV1JBMsdI/U4SS7K3My8E3EL9mqRyyHXlYI60f Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10945"; a="16266400" X-IronPort-AV: E=Sophos;i="6.04,337,1695711600"; d="scan'208";a="16266400" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2024 06:18:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10945"; a="954223935" X-IronPort-AV: E=Sophos;i="6.04,337,1695711600"; d="scan'208";a="954223935" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2024 06:18:28 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rM7MG-0000000BvMv-1HXB; Sat, 06 Jan 2024 16:09:04 +0200 Date: Sat, 6 Jan 2024 16:09:04 +0200 From: Andy Shevchenko To: Mark Hasemeyer Cc: LKML , AngeloGioacchino Del Regno , Krzysztof Kozlowski , Rob Herring , Konrad Dybcio , Sudeep Holla , 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 v3 23/24] platform: Modify platform_get_irq_optional() to use resource Message-ID: References: <20231226192149.1830592-1-markhas@chromium.org> <20231226122113.v3.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: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, Dec 27, 2023 at 01:33:14PM -0700, Mark Hasemeyer wrote: > > > - struct resource *r; > > ... > > > + struct resource *platform_res = platform_get_resource(dev, IORESOURCE_IRQ, num); > > > > This is quite unusual (as far as cleanup.h is not used and there is no place > > for it here). > > Sorry, what's unusual? The declaration of a separate 'platform_res'? > If so, I introduced it because I wanted to avoid setting 'r' if > 'irq_get_irq_data()' fails below. Defining the variable in the depth of the code. There are exceptions, but usually we follow the style that definitions are grouped at the top of the {} scope(s). -- With Best Regards, Andy Shevchenko