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: 40874 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1AF3621175 for ; Sat, 15 Nov 2014 14:23:48 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id n15sf10098002lbi.2 for ; Sat, 15 Nov 2014 06:23:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=KtrTBHrb9pc930BCT2p9EXmsPrtJbAl6HOKZtUOF6H8=; b=QmWQ6S/aL7hdWKg0ZDltaqdKNhz1zeMrVwZzDpCGQ+mtd2aKl+Wme5/q7bz3QHgsv8 GM7AaS/QiPMwFRwvq44D99Yz1iGDRx9uEUwz0I1yqKqLJwZYr+IAyptm8/cpiT834gWp vP8rYAoWP3JKpEpyZ9hnfq2Pdnl57eFVRQJD7tuJpevt0r0AVGrDWBPYQOeAn7tycRn0 31oaOrA1ysVNpMgWB0gUxyW6s5KUYkbLLzHD7RTPsYB4XHhK1UUNsRoGbAxrByeEFd0g pjdg8hJxtqfPLD8U8AnQNup8JiehAG52pcjEf8+QFNlQOzdhqDzzG4XjvZerugj63+79 A8Yg== X-Gm-Message-State: ALoCoQndAh0jrT28SZCaMYWtO7OPcToTnq5fAYA4KCU5TpAS9bI7WNfrYmxwOJ/wqi4dMw39fPHU X-Received: by 10.112.29.52 with SMTP id g20mr6606529lbh.7.1416061427107; Sat, 15 Nov 2014 06:23:47 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.226 with SMTP id r2ls1180123lal.49.gmail; Sat, 15 Nov 2014 06:23:46 -0800 (PST) X-Received: by 10.152.243.37 with SMTP id wv5mr10109964lac.10.1416061426967; Sat, 15 Nov 2014 06:23:46 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id pz8si45053874lbb.36.2014.11.15.06.23.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 15 Nov 2014 06:23:46 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id w7so5378523lbi.5 for ; Sat, 15 Nov 2014 06:23:46 -0800 (PST) X-Received: by 10.112.14.69 with SMTP id n5mr14150847lbc.34.1416061426880; Sat, 15 Nov 2014 06:23:46 -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 ew9csp930738lbc; Sat, 15 Nov 2014 06:23:46 -0800 (PST) X-Received: by 10.70.41.46 with SMTP id c14mr16891318pdl.101.1416061425058; Sat, 15 Nov 2014 06:23:45 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si30810453pdo.234.2014.11.15.06.23.44 for ; Sat, 15 Nov 2014 06:23:45 -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 S1754796AbaKOOXm (ORCPT + 26 others); Sat, 15 Nov 2014 09:23:42 -0500 Received: from mga01.intel.com ([192.55.52.88]:61402 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754071AbaKOOVb (ORCPT ); Sat, 15 Nov 2014 09:21:31 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 15 Nov 2014 06:21:30 -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 Cc: Tony Luck , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jiang Liu 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> 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: linux-kernel-owner@vger.kernel.org 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.174 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: , 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;