From patchwork Sat Nov 15 14:24:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 5311951 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9F824C11AC for ; Sat, 15 Nov 2014 14:24:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 778F02017D for ; Sat, 15 Nov 2014 14:24:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5645D20176 for ; Sat, 15 Nov 2014 14:24:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XpeF4-0001fR-8R; Sat, 15 Nov 2014 14:22:22 +0000 Received: from mga11.intel.com ([192.55.52.93]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XpeEX-0001Qp-Oc for linux-arm-kernel@lists.infradead.org; Sat, 15 Nov 2014 14:21:50 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 15 Nov 2014 06:21:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,391,1413270000"; d="scan'208";a="632446186" Received: from gerry-dev.bj.intel.com ([10.238.158.52]) by fmsmga002.fm.intel.com with ESMTP; 15 Nov 2014 06:20:55 -0800 From: Jiang Liu To: Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Grant Likely , Marc Zyngier , Yijing Wang , Yingjoe Chen , Borislav Petkov , "H. Peter Anvin" , Benjamin Herrenschmidt , Matthias Brugger Subject: [Patch V2 2/9] irqdomain: Use consistent prototype for irq_domain_free_irqs_* Date: Sat, 15 Nov 2014 22:24:00 +0800 Message-Id: <1416061447-9472-3-git-send-email-jiang.liu@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1416061447-9472-1-git-send-email-jiang.liu@linux.intel.com> References: <1416061447-9472-1-git-send-email-jiang.liu@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141115_062149_815674_362E8BDA X-CRM114-Status: GOOD ( 11.50 ) X-Spam-Score: -5.0 (-----) Cc: linux-pci@vger.kernel.org, Tony Luck , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jiang Liu X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yingjoe Chen When using irq_domain_free_irqs_top() directly in irq_domain_ops, gcc generate the following warnings: ../drivers/irqchip/irq-gic.c:879:2: warning: initialization from incompatible pointer type [enabled by default] ../drivers/irqchip/irq-gic.c:879:2: warning: (near initialization for 'gic_irq_domain_hierarchy_ops.free') [enabled by default] Change to use consistent prototype for all irq_domain_free_irqs* Better to fold this into "irqdomain: Introduce new interfaces to support hierarchy irqdomains". Signed-off-by: Yingjoe Chen Signed-off-by: Jiang Liu --- include/linux/irqdomain.h | 9 +++++---- kernel/irq/irqdomain.c | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 640a1ec54772..fbe542967c20 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -270,12 +270,13 @@ extern void irq_domain_set_info(struct irq_domain *domain, unsigned int virq, void *handler_data, const char *handler_name); extern void irq_domain_reset_irq_data(struct irq_data *irq_data); extern void irq_domain_free_irqs_common(struct irq_domain *domain, - int virq, int nr_irqs); + unsigned int virq, + unsigned int nr_irqs); extern void irq_domain_free_irqs_top(struct irq_domain *domain, - int virq, int nr_irqs); + unsigned int virq, unsigned int nr_irqs); static inline int irq_domain_alloc_irqs_parent(struct irq_domain *domain, - int irq_base, unsigned int nr_irqs, void *arg) + unsigned int irq_base, unsigned int nr_irqs, void *arg) { if (domain->parent && domain->parent->ops->alloc) return domain->parent->ops->alloc(domain->parent, irq_base, @@ -284,7 +285,7 @@ static inline int irq_domain_alloc_irqs_parent(struct irq_domain *domain, } static inline void irq_domain_free_irqs_parent(struct irq_domain *domain, - int irq_base, unsigned int nr_irqs) + unsigned int irq_base, unsigned int nr_irqs) { if (domain->parent && domain->parent->ops->free) domain->parent->ops->free(domain->parent, irq_base, nr_irqs); diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 8b0eddee0b21..705fb573e509 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -899,8 +899,8 @@ void irq_domain_reset_irq_data(struct irq_data *irq_data) irq_data->chip_data = NULL; } -void irq_domain_free_irqs_common(struct irq_domain *domain, int virq, - int nr_irqs) +void irq_domain_free_irqs_common(struct irq_domain *domain, unsigned int virq, + unsigned int nr_irqs) { int i; struct irq_data *irq_data; @@ -913,8 +913,8 @@ void irq_domain_free_irqs_common(struct irq_domain *domain, int virq, irq_domain_free_irqs_parent(domain, virq, nr_irqs); } -void irq_domain_free_irqs_top(struct irq_domain *domain, int virq, - int nr_irqs) +void irq_domain_free_irqs_top(struct irq_domain *domain, unsigned int virq, + unsigned int nr_irqs) { int i;