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: 40775 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BC0BD240ED for ; Thu, 13 Nov 2014 15:37:41 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id q1sf9218946lam.4 for ; Thu, 13 Nov 2014 07:37:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=YecjOGDW9nyDVngTVPdLnb+KSwPOezLJ9Tpc/wdb098=; b=e+dvSaDVFmwCDBe0Z5TJuMOmosMW8KbQHEZBjEIaKCwxYj3YibG3ps8WPy5RM9UOpm xUUbhYBZ8M+b9sI7rtIJr/nmhvJ79CR1IFCz7C01oUCcB05bfE0eqX7MIdqrpYI251Si S9xQmPEmPjtCGtV1NvO/5/6IDiRn1ni05OvjLZQcwuCp3fXXZUJxY/3qVnJ755MhLaD6 eSqVM8WQQtpmIu4sOzB0Z6R6ZiMs4cU3faEbvy6SpPFeaIEnLWz1gVlaxeK1aq0i4nMe S88paI5Qfj6Njy5Yj5jn/v2q0ee4i+5w3SGTCFs8zXzMQa2cVLN6eiMT3yI3pXTYK6uP pd7w== X-Gm-Message-State: ALoCoQloj616DT0RYi/x9Fs01d7OykdnL+sRAtCK4NrzqAOY2sYypLbELZupLSmz5pFmuyk/F6cx X-Received: by 10.194.239.200 with SMTP id vu8mr3637177wjc.3.1415893060705; Thu, 13 Nov 2014 07:37:40 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.67 with SMTP id z3ls844972lag.74.gmail; Thu, 13 Nov 2014 07:37:40 -0800 (PST) X-Received: by 10.112.12.35 with SMTP id v3mr3116313lbb.80.1415893060489; Thu, 13 Nov 2014 07:37:40 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id cb5si38965888lad.16.2014.11.13.07.37.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Nov 2014 07:37:39 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id w7so2618612lbi.15 for ; Thu, 13 Nov 2014 07:37:39 -0800 (PST) X-Received: by 10.112.52.37 with SMTP id q5mr3131395lbo.32.1415893059871; Thu, 13 Nov 2014 07:37:39 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp607506lbc; Thu, 13 Nov 2014 07:37:38 -0800 (PST) X-Received: by 10.70.89.41 with SMTP id bl9mr3431709pdb.55.1415893058134; Thu, 13 Nov 2014 07:37:38 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yn7si25955352pab.122.2014.11.13.07.37.35 for ; Thu, 13 Nov 2014 07:37:38 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754086AbaKMPhd (ORCPT + 26 others); Thu, 13 Nov 2014 10:37:33 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:46335 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753959AbaKMPh3 (ORCPT ); Thu, 13 Nov 2014 10:37:29 -0500 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 CC: Rob Herring , Pawel Moll , Mark Rutland , Matthias Brugger , Russell King , Jason Cooper , Yingjoe Chen , Grant Likely , Boris BREZILLON , , , , Bjorn Helgaas , Yijing Wang , , , , , , , Sascha Hauer 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: yingjoe.chen@mediatek.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;