From patchwork Tue Aug 15 19:02:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Burton X-Patchwork-Id: 9902403 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4F9A66028A for ; Tue, 15 Aug 2017 19:06:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42C3B288D8 for ; Tue, 15 Aug 2017 19:06:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3797D288DE; Tue, 15 Aug 2017 19:06:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BB581288D8 for ; Tue, 15 Aug 2017 19:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RWtAL7rFnsuJWGt+BkM0ekpBv3kWcbox79wPaKJ3MQI=; b=XQmHeCGb29t+u0 +lYXMLotKEj1Gr/5U/y86X8IjW/CEjZ5vvoUeTzUdKMlabtkvJVNAwzi6Jh0M61CQIVlc9Km69qqc Qrmd7/vtIsNrVspe+pcDlQPZChyTkk3eZnxGmVDHFiMrPW5IIyFW06CLidCkqNDBNgUYjaecI2Fq2 S2EWwW6TI0QIVVO0qUKKQ5zeslLXpdLtVZisvJQ/6Rj7zczLPQ2h3a6br6k4B3Ee51U8fjpVkHsXb Gb0qSAh9WbUb/hDvyDGrsOvQnQxWQTq3EgU8Z81p3P6ZjmVzxW2sxKpjTfcQpwT8/mFCGqxZoQ/dV eGVQ6K6wlOYKguOwjjpA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dhhAC-0008Ue-Fk; Tue, 15 Aug 2017 19:06:04 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dhhAA-0008U1-3P; Tue, 15 Aug 2017 19:06:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ThOi8p4ltkREeNgFSBYWJy3XIbyS15N6V9E1ztQ7YbI=; b=1MCjnuZX7wMA+9a2CyDDDGACm WQ9SNrqVMvI4y85M4Zd/Sfuvqt+E1DsHFPyOWg5Q5srJdn9FRSv0lZ2PRiS8VrCMsiZ/ZqGYkN9GY dn/lB0OAqF209ljQ6CSTgvSq5z+wLiSUwiUb3k1GixYLxnMGzutgfd6GBU5vCzfjbRuvmqrbuWIBh R30DeZjlKar1ODXAP5VQVu4Mxkz6bHzUkCFPf/98nTCCWSehiaIYLXbw8Iajskk5zomlPbjfgVoCW Bl10veE45GXHLrHBe3PxrNRFX5kLC4JKLjAKGx7sC7cQuAjdpLhYvP5yxSS4+cpiGHnJLqbvJfNJq g8C9jxwrw==; Received: from mailapp01.imgtec.com ([195.59.15.196]) by merlin.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dhhA7-0000IT-8J; Tue, 15 Aug 2017 19:06:00 +0000 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Forcepoint Email with ESMTPS id 5608FA1DDE44A; Tue, 15 Aug 2017 20:05:30 +0100 (IST) Received: from localhost (10.20.1.88) by hhmail02.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0; Tue, 15 Aug 2017 20:05:33 +0100 From: Paul Burton To: Bjorn Helgaas , Subject: [PATCH v7 8/8] PCI: rockchip: Use PCI_NUM_INTX Date: Tue, 15 Aug 2017 12:02:23 -0700 Message-ID: <20170815190223.18807-9-paul.burton@imgtec.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170815190223.18807-1-paul.burton@imgtec.com> References: <20170815190223.18807-1-paul.burton@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [10.20.1.88] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Shawn Lin , Heiko Stuebner , Paul Burton Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use the PCI_NUM_INTX macro to indicate the number of PCI INTx interrupts rather than the magic number 4. This makes it clearer where the number comes from & what it relates to. Signed-off-by: Paul Burton Cc: Bjorn Helgaas Cc: Heiko Stuebner Cc: Shawn Lin Cc: linux-arm-kernel@lists.infradead.org Cc: linux-pci@vger.kernel.org Cc: linux-rockchip@lists.infradead.org --- I have only build tested this. Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/pci/host/pcie-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c index 7bb9870f6d8c..eae195ca06ab 100644 --- a/drivers/pci/host/pcie-rockchip.c +++ b/drivers/pci/host/pcie-rockchip.c @@ -1116,7 +1116,7 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip) return -EINVAL; } - rockchip->irq_domain = irq_domain_add_linear(intc, 4, + rockchip->irq_domain = irq_domain_add_linear(intc, PCI_NUM_INTX, &intx_domain_ops, rockchip); if (!rockchip->irq_domain) { dev_err(dev, "failed to get a INTx IRQ domain\n");