Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp825481ybm; Tue, 21 May 2019 04:18:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxlTgLGx+2Tc5NW0HuBvA460asrBM15RnNToyWuf6ycV0MaIzL7W0CBDlldLyaOKiDSuPuP X-Received: by 2002:a65:4c4c:: with SMTP id l12mr79112877pgr.404.1558437514948; Tue, 21 May 2019 04:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558437514; cv=none; d=google.com; s=arc-20160816; b=G4Jlx0wS5E/IOOqdEa20AcoQirFmVJuH13EdEpS16XMgZmB3w7MNwREN8mPmiLSe5Q ScmOtJkWnJ2xZdm6YPAhzGoY1Z/yVAshIxlFhGczA1FN148s4PawMj1gA+rUKs/zDd6w Qn/fr70YwuQzMj6IwVd61ESQb2bL21Bw0qiHDwf3NrqB+TE7RNdAypHQg7tTTEfsAwVf P5TtwRDGKBESUowtrEsJykEMXZveGmGSsIzqMS0ivMyDVMY3bisUJJAnLMmiOmgd2XcS 01Qkv2Z7AJCM8zs0A4vD4kT1YuM0N1hK2pDlBZmHpmqvGH4rFk5GDqoMvUFI4M2GrgWm dmwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9kG7zyYiZzp+pqJm2yTSfpD8HwHci4Jn+XVJIKM7C3A=; b=EX+QrhAmfJRC3gRGBK5/09BlO/9oNSCMhyen1oAkUHEXlYTR27Qx3cnqZhLMFDcsJk 2/IwtPMdo5e9iR/Raw0Y8CW+xAOzAAf4pkDw/eNeZkGZIpPduT9ozizS6dyD5e6Bvr63 AMARxUj8ePhUU1gXQpkEILef9/FA96o4snroe7dhRxflBQs1Gu64McL0Z7jIu5dc2uW/ PT08jwGNy/cZ1R0+sZzHtnmvTg/kAZaUwVph4I6AAkwv5WscDHgKEmbzH57sfjQL+L4J 79yh5rIMGsIrqupMBwTbTkIsLR+3AFacAy2885zzGuddpQqfbVNeMZeb2YzLLCsBfPPd pvJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 187si21250137pgj.149.2019.05.21.04.18.19; Tue, 21 May 2019 04:18:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727954AbfEULRP (ORCPT + 99 others); Tue, 21 May 2019 07:17:15 -0400 Received: from mga03.intel.com ([134.134.136.65]:58530 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbfEULRP (ORCPT ); Tue, 21 May 2019 07:17:15 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 May 2019 04:17:14 -0700 X-ExtLoop1: 1 Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 21 May 2019 04:17:11 -0700 Received: by lahna (sSMTP sendmail emulation); Tue, 21 May 2019 14:17:10 +0300 Date: Tue, 21 May 2019 14:17:10 +0300 From: Mika Westerberg To: Charles Keepax Cc: wsa@the-dreams.de, linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, benjamin.tissoires@redhat.com, jbroadus@gmail.com, patches@opensource.cirrus.com Subject: Re: [PATCH 1/5] i2c: acpi: Factor out getting the IRQ from ACPI Message-ID: <20190521111710.GW2781@lahna.fi.intel.com> References: <20190520084936.10590-1-ckeepax@opensource.cirrus.com> <20190520084936.10590-2-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190520084936.10590-2-ckeepax@opensource.cirrus.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 20, 2019 at 09:49:32AM +0100, Charles Keepax wrote: > In preparation for future refactoring factor out the fetch of the IRQ > into its own helper function. > > Signed-off-by: Charles Keepax > --- > drivers/i2c/i2c-core-acpi.c | 40 +++++++++++++++++++++++++--------------- > 1 file changed, 25 insertions(+), 15 deletions(-) > > diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c > index 2728006920888..c3ac3ea184317 100644 > --- a/drivers/i2c/i2c-core-acpi.c > +++ b/drivers/i2c/i2c-core-acpi.c > @@ -137,13 +137,35 @@ static int i2c_acpi_do_lookup(struct acpi_device *adev, > return 0; > } > > +static int i2c_acpi_get_irq(struct acpi_device *adev, int *irq) I think here the function should return irq instead, and negative errno in case of failure.