Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4850695ybi; Tue, 28 May 2019 03:37:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZnGABJcZnYYgJtuIfwDxz5xSMLu3VY0btEXsFzJmUx+wOCm/Y5DYzYo1hT9ATWnRW4BE5 X-Received: by 2002:a63:4c06:: with SMTP id z6mr21499908pga.296.1559039833340; Tue, 28 May 2019 03:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559039833; cv=none; d=google.com; s=arc-20160816; b=Tb6P9jY0nnERsC169NqCUUh0PcibesbArnikB2JfNQ06kbtsV4BfoM8Nwlt5zBjWgs vLONkpv1P/AqkQQPBrMH54yrBB4EX+Ax2xR4kYq6vjSf/jYKq01k1CSq9H4aAlWD1xoT z1DK6ihcuc9aMg4m8xluk5CrS0uabhXbXZ16S56r0mq9Bu6N5LtKu4qhXoUqOCVxDCDv U+7lbipLbcrap2mTqHohmN1rEhvv0e1RnlClsiDvujTRkK4GigkGNxNNx7uIZ4uFeOAY lGI/Cmq6wUN74BLvpH9S2xs7wkiIC7xypzFjHPY19l5vAaoYtpBFE01LVgKs4p9l/5yM URAw== 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=oC/HMIN42f+eKHjYR8tcwFwaA3wQLLtZoDBbtiv/YBw=; b=yQw+/hFMU3ZrTFDfJWc8nP7ldxaq0B3q8Gw3wxcPQHMhhjyWBu/ao1UEDLKIfr0FTh Ic+bjTCaf21CncrSIsB+ldVoZIhTPLshu469ZiP2BuhcwRAwwGFJ/o1DEcgqymjd6MXA 52yU5X7Rp0LUpBQ2z0sL8z2/JGZ1ITGMQ5ZftGD1/3zNhxMzkct5PhQuHuYjtv0O9bux Xdfpu2bDuBd7b+z9/NjLSVOsXQrwHuWYaY4kHiqkT7qPl3wq+zoLHi/CXY4zzLanXj+y PbEcHuyiiBxIpSz8P1wCYnySjFiiMgMTvpEzGvBljZAQzO3KpB3HhRuY9mMa0MC1e00r TTlQ== 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 c123si22965291pfg.35.2019.05.28.03.36.57; Tue, 28 May 2019 03:37:13 -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 S1726640AbfE1Kfn (ORCPT + 99 others); Tue, 28 May 2019 06:35:43 -0400 Received: from mga09.intel.com ([134.134.136.24]:42368 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbfE1Kfn (ORCPT ); Tue, 28 May 2019 06:35:43 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2019 03:35:42 -0700 X-ExtLoop1: 1 Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 28 May 2019 03:35:39 -0700 Received: by lahna (sSMTP sendmail emulation); Tue, 28 May 2019 13:35:38 +0300 Date: Tue, 28 May 2019 13:35:38 +0300 From: Mika Westerberg To: Charles Keepax Cc: wsa@the-dreams.de, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, 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 v2 3/6] i2c: acpi: Factor out getting the IRQ from ACPI Message-ID: <20190528103538.GC2781@lahna.fi.intel.com> References: <20190527151932.14310-1-ckeepax@opensource.cirrus.com> <20190527151932.14310-3-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190527151932.14310-3-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 27, 2019 at 04:19:29PM +0100, Charles Keepax wrote: > static int i2c_acpi_get_info(struct acpi_device *adev, > struct i2c_board_info *info, > struct i2c_adapter *adapter, > acpi_handle *adapter_handle) > { > - struct list_head resource_list; > struct i2c_acpi_lookup lookup; > - int irq = -ENOENT; > int ret; > > memset(&lookup, 0, sizeof(lookup)); > @@ -186,16 +202,9 @@ static int i2c_acpi_get_info(struct acpi_device *adev, > *adapter_handle = lookup.adapter_handle; > > /* Then fill IRQ number if any */ > - INIT_LIST_HEAD(&resource_list); > - ret = acpi_dev_get_resources(adev, &resource_list, > - i2c_acpi_add_resource, &irq); > - if (ret < 0) > - return -EINVAL; > - > - if (irq >= 0) > - info->irq = irq; > - > - acpi_dev_free_resource_list(&resource_list); > + ret = i2c_acpi_get_irq(adev); > + if (ret >= 0) Same comment here regarding irq == 0.