From patchwork Wed Dec 2 10:36:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 335975 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp811442ejs; Wed, 2 Dec 2020 02:43:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhAqoC2NJX2c9uUCFqAwaz6zo5GCHKkYfYELPVSEug+ISUXq9ytnaYfc5y/IUD9xkot4cu X-Received: by 2002:a17:906:7f13:: with SMTP id d19mr1766212ejr.54.1606905803743; Wed, 02 Dec 2020 02:43:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606905803; cv=none; d=google.com; s=arc-20160816; b=G/jZY5AXeLv2rLjh9NA2rz2g2nPCW31i4EP5EaGXlqcdiLTjBLTEZLo8vV1BWmZDwl zPOsb+RgeR2nr/bcI4pv2/JnTLvz986xr2v7am9HVikqTfU14f7bYRGIHUl6N7Z22yCS rwb5Cz2ClSmKTF+r5nGSaKstZHe6pVj5cH/ObxoY31YDnFPNX5mWqemX/URN5+mZtZhP hBaKJaGHrrS/d+bvheNdqiRHjjtiPXPIswPY8vvSTwdTdBNVPTaV1JuGp2E/n0Qxnyy6 Xsd/bCt/v8aJeyenomd9XuUKyYXg7iejohi/j25AftoDUrsLVGabKlxF/0K7K089OZOZ lDSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=8k3W5qHbi0eOemYajOZuNTFsUG5+Arc1xJ2YhI9qaNA=; b=cKnayg0DWCRL6XaIleXIi3/G/cnIOgN+klEy+skadhPTD8aR5/xoecOvDyp05Nx8Ka +4oQPrBejb73b5JJDOH+1gy0RP6VC0SoxGxWEGGeuEJTpkCZc0Fyfi30mf34bn8a6UBj 54zKSswmmWbtSRGtrOkA7hn0kxYTUCWiPYC0cvGpuKDVM5u8hrQ8LWD05fA6YTE+cV3m P6pOiakYl9K82X7XgE78HvkXRFkwNY+7/B3KVkbQgxSbaFPm08FD61w6UikTvlQ7gvB/ S02nTg0DGPPtHRUcSnrOgJad/y2BmzqBlZSijzlv0RtevB6IC8jwgaXVIydKtF8E+m8D jzZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si811195eds.424.2020.12.02.02.43.23 for ; Wed, 02 Dec 2020 02:43:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388695AbgLBKlo (ORCPT ); Wed, 2 Dec 2020 05:41:44 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:8492 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388626AbgLBKln (ORCPT ); Wed, 2 Dec 2020 05:41:43 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CmFqS5MfwzhllH; Wed, 2 Dec 2020 18:40:36 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Wed, 2 Dec 2020 18:40:48 +0800 From: John Garry To: , , , , , , CC: , , , , , "John Garry" Subject: [PATCH v5 3/5] ACPI: Drop acpi_dev_irqresource_disabled() Date: Wed, 2 Dec 2020 18:36:55 +0800 Message-ID: <1606905417-183214-4-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1606905417-183214-1-git-send-email-john.garry@huawei.com> References: <1606905417-183214-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The functionality of acpi_dev_irqresource_disabled() is same as in common irqresource_disabled(), so drop acpi_dev_irqresource_disabled() in favour of that function. Signed-off-by: John Garry Acked-by: Rafael J. Wysocki --- drivers/acpi/resource.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) -- 2.26.2 diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index ad04824ca3ba..58203193417e 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -380,13 +380,6 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity) } EXPORT_SYMBOL_GPL(acpi_dev_get_irq_type); -static void acpi_dev_irqresource_disabled(struct resource *res, u32 gsi) -{ - res->start = gsi; - res->end = gsi; - res->flags = IORESOURCE_IRQ | IORESOURCE_DISABLED | IORESOURCE_UNSET; -} - static void acpi_dev_get_irqresource(struct resource *res, u32 gsi, u8 triggering, u8 polarity, u8 shareable, bool legacy) @@ -394,7 +387,7 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi, int irq, p, t; if (!valid_IRQ(gsi)) { - acpi_dev_irqresource_disabled(res, gsi); + irqresource_disabled(res, gsi); return; } @@ -426,7 +419,7 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi, res->start = irq; res->end = irq; } else { - acpi_dev_irqresource_disabled(res, gsi); + irqresource_disabled(res, gsi); } } @@ -463,7 +456,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index, */ irq = &ares->data.irq; if (index >= irq->interrupt_count) { - acpi_dev_irqresource_disabled(res, 0); + irqresource_disabled(res, 0); return false; } acpi_dev_get_irqresource(res, irq->interrupts[index], @@ -473,7 +466,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index, case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: ext_irq = &ares->data.extended_irq; if (index >= ext_irq->interrupt_count) { - acpi_dev_irqresource_disabled(res, 0); + irqresource_disabled(res, 0); return false; } if (is_gsi(ext_irq)) @@ -481,7 +474,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index, ext_irq->triggering, ext_irq->polarity, ext_irq->shareable, false); else - acpi_dev_irqresource_disabled(res, 0); + irqresource_disabled(res, 0); break; default: res->flags = 0;