Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp729281rdb; Sat, 6 Jan 2024 06:49:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMXpUN6HTaOitYMXTVyl/Jvav3fznQUKInVperEJNnuk9bzncWtB29v7xC/9+8yQsCWvLF X-Received: by 2002:a17:90b:4d8e:b0:28c:be1d:71b with SMTP id oj14-20020a17090b4d8e00b0028cbe1d071bmr330995pjb.24.1704552560757; Sat, 06 Jan 2024 06:49:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704552560; cv=none; d=google.com; s=arc-20160816; b=nNdl7yscqsn6Z36v0a3DBD1V4/I5IWGwh4RpCWicp7uIYyNiyJivsNIpPf6nBCHxo9 ingpiKaRjFuQ+4bp7bd4boYpWwktUAWrvzGe4sqy50FZ0j2FAcurhDH4mFk4LFonIIuN AZWxt7zFx+5fDfayKNWXbOnR62dbXH4iUpxixUIhzYkb/Nr8I1b5k5z7RRW858T6daRu 6xkVRamm844MyN2hVhJNrmXjgR44ICDJtUUg/6QAdoIve8wLJ4Tc7i9nkHRkfVXEP0O1 EzDX2lREIJzRzjOf2qdpurWN1C9+aTbERYey9MLF6ixyMFYQyISo0EX7aVcgHUI/JuUP Ezmw== 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=dO09fAlpBgjttZxbk3LsShYDhb93kxuzOWstyPdQodw=; fh=VAZnmj0fevRRucc+b5GaIdZdt64ks7ThSIhC9G1GIp8=; b=TRZatsRmPa8VGmIasQlL6SW7zJesRowjOqI05NRqWM+QSzSQb7jwIc7lAJqcDasb4C Y3w7hzZ5qYsxf9lCXSyhASLZU2/dB9u0fp3K2IiLtnv9td6yjlByG4Ku2WaN3BhFw+px i2Sfi16yZBwjI6KRGjSGvJ5iYTN5YfpURR6c5vqKUYczEtHdTDSyAuanruc/ETl+jH5n m8ZbDBPDPfLCBqEceiOsR/S4xuNw/Cjx6x5eTX+rKU5xi441PUwCEJ15Msg1DeBXc71C MyaO+Jquz/rGg2WXdbnzOU7btbqN1Rh23Ay3qilEqsGGkQpMjUcDdbtwTXRy9EFiEFzr fEtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RNb9v6Lz; spf=pass (google.com: domain of linux-kernel+bounces-18603-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18603-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t12-20020a17090a5d8c00b0028ceafe837esi2580681pji.70.2024.01.06.06.49.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 06:49:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18603-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RNb9v6Lz; spf=pass (google.com: domain of linux-kernel+bounces-18603-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18603-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 31515B21C7C for ; Sat, 6 Jan 2024 14:49:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 98F718479; Sat, 6 Jan 2024 14:49:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RNb9v6Lz" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.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 DFF2D79D0; Sat, 6 Jan 2024 14:49:01 +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=1704552542; x=1736088542; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=WIkTRh0rEAEx1IV0OlVa7qZ0mU0jqtNw0XlETmXqXN0=; b=RNb9v6LzKEpP0A69mh3ufv/817AoxDJKJyF7rJfCO66fBC1I4Wh3vNFF nrZdzMJercZARDUKPMw7B+QgLjWKfINnT1uSCRTwFVE40ru8VowRBNsFx X9KO87xSyCfKM4wmBZ4MEuMS7G4xgSbAw0mdbEnBvcjmdPFi1TAZirnKN KxfI5vUfsUK9OH0LS0I1pwW/7zp1UxWbOMazolqRnL8wsYRgHGVtU3OwD E379KlzISUNDIFgXwDAMwwyuqh2wWfgD5lWfC6pGGhqiFQd6s8bpZF2oB PAnDtNWyg3xLEuyC/uLVAv/AxmlZumNFiJ5GuUryn82LqBXF571j5/dnc Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10945"; a="4417952" X-IronPort-AV: E=Sophos;i="6.04,337,1695711600"; d="scan'208";a="4417952" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2024 06:49:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10945"; a="784453178" X-IronPort-AV: E=Sophos;i="6.04,337,1695711600"; d="scan'208";a="784453178" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga007.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2024 06:48:58 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rM7yp-0000000Bvtd-16vY; Sat, 06 Jan 2024 16:48:55 +0200 Date: Sat, 6 Jan 2024 16:48:54 +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 , Mika Westerberg , Wolfram Sang , linux-acpi@vger.kernel.org, linux-i2c@vger.kernel.org Subject: Re: [PATCH v4 03/24] i2c: acpi: Modify i2c_acpi_get_irq() to use resource Message-ID: References: <20240102210820.2604667-1-markhas@chromium.org> <20240102140734.v4.3.Ib65096357993ff602e7dd0000dd59a36571c48d8@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.3.Ib65096357993ff602e7dd0000dd59a36571c48d8@changeid> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Tue, Jan 02, 2024 at 02:07:27PM -0700, Mark Hasemeyer wrote: > The i2c_acpi_irq_context structure provides redundant information that > can be provided with struct resource. > > Refactor i2c_acpi_get_irq() to use struct resource instead of struct > i2c_acpi_irq_context. ... > ret = acpi_dev_get_resources(adev, &resource_list, > - i2c_acpi_add_irq_resource, &irq_ctx); > + i2c_acpi_add_irq_resource, r); Up to you, but you can make it a single line. ret = acpi_dev_get_resources(adev, &resource_list, i2c_acpi_add_irq_resource, r); > if (ret < 0) > return ret; ... > +++ b/drivers/i2c/i2c-core-base.c > + struct resource r = {}; Needs ioport.h. ... > + irq = i2c_acpi_get_irq(client, &r); > + if (r.flags & IORESOURCE_IRQ_WAKECAPABLE) Ditto. > client->flags |= I2C_CLIENT_WAKE; > } ... > +++ b/drivers/i2c/i2c-core.h > +int i2c_acpi_get_irq(struct i2c_client *client, struct resource *r); > +static inline int i2c_acpi_get_irq(struct i2c_client *client, struct resource *r) Needs a forward declaration (besides the inclusion block is a total mess in this file). -- With Best Regards, Andy Shevchenko