From patchwork Thu Nov 13 15:37:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingjoe Chen X-Patchwork-Id: 5298911 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 B0A57C11AC for ; Thu, 13 Nov 2014 15:40:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DBDC720211 for ; Thu, 13 Nov 2014 15:40:13 +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 F03C62020F for ; Thu, 13 Nov 2014 15:40:12 +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 1XowT4-0006NI-Qr; Thu, 13 Nov 2014 15:37:54 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XowT0-0006Cf-An for linux-arm-kernel@lists.infradead.org; Thu, 13 Nov 2014 15:37:51 +0000 X-Listener-Flag: 11101 Received: from mtkhts07.mediatek.inc [(172.21.101.69)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 743883043; Thu, 13 Nov 2014 23:37:24 +0800 Received: from mtksdtcf02.mediatek.inc (10.21.12.142) by mtkhts07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.181.6; Thu, 13 Nov 2014 23:37:19 +0800 From: Yingjoe Chen To: Thomas Gleixner , Jiang Liu , Marc Zyngier Subject: [PATCH v6 1/6] irqdomain: Use consistent prototype for irq_domain_free_irqs_* Date: Thu, 13 Nov 2014 23:37:04 +0800 Message-ID: <1415893029-2971-2-git-send-email-yingjoe.chen@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1415893029-2971-1-git-send-email-yingjoe.chen@mediatek.com> References: <1415893029-2971-1-git-send-email-yingjoe.chen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141113_073750_580330_C98A6C3B X-CRM114-Status: GOOD ( 10.01 ) X-Spam-Score: 1.3 (+) Cc: Mark Rutland , Boris BREZILLON , Russell King , Jason Cooper , Pawel Moll , devicetree@vger.kernel.org, hc.yen@mediatek.com, srv_heupstream@mediatek.com, yh.chen@mediatek.com, linux-kernel@vger.kernel.org, Grant Likely , Yijing Wang , Rob Herring , nathan.chung@mediatek.com, yingjoe.chen@gmail.com, Matthias Brugger , Yingjoe Chen , eddie.huang@mediatek.com, Bjorn Helgaas , Sascha Hauer , linux-arm-kernel@lists.infradead.org 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, 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 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 --- include/linux/irqdomain.h | 8 +++++--- kernel/irq/irqdomain.c | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 640a1ec..534dd72 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -270,9 +270,10 @@ 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) @@ -284,7 +285,8 @@ 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 8b0edde..705fb57 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;