From patchwork Thu Oct 23 15:53:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingjoe Chen X-Patchwork-Id: 39378 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 22DDE24022 for ; Thu, 23 Oct 2014 15:54:39 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id d49sf1005557eek.7 for ; Thu, 23 Oct 2014 08:54:38 -0700 (PDT) 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=gdcnaYp367hw1KnWDlI9r4a36S9IGYMNqso/vD7Zk1I=; b=eFJ3y9V6Cc04hgb+jlNZz5xE/8wb3a/fp8V/gF2C8bFK2lwAmyYJN32m9ve5CdtDiJ IgOUmRcXElTJ8BO3OTmp0qF2VaCBOA4vEhNETlnDxv60susgNuzeqa3MsQVp3Osrf04v DhqbKRgRT8MOUdQ8cucbcn+JEE+97+n1eG580nrS0WQCMuOVxl+toi9+oetuLCa/kyaY V1jfrp1jSox5Hl1qLUx7Qj9mLlJXIvlk9zUgFFhRmbJkbbeiqiF5g6JEyVWRGETo0iLd aocVRrF3Rlmu75YLNc0W8B7HmDakd5m6fYcbNe/Q7KkAJy2VPvf4vbh5U2X1wInXGsDk iu8Q== X-Gm-Message-State: ALoCoQmSPlZsCaSH11L5m/i0K8Gkx8T+UVdRdtNjpwWGiUTezvJY9VWVGh5CsQnjznKLwonR3HkP X-Received: by 10.180.83.134 with SMTP id q6mr2547544wiy.7.1414079678289; Thu, 23 Oct 2014 08:54:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.67 with SMTP id o3ls349446laj.22.gmail; Thu, 23 Oct 2014 08:54:38 -0700 (PDT) X-Received: by 10.112.219.3 with SMTP id pk3mr6163172lbc.18.1414079678101; Thu, 23 Oct 2014 08:54:38 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id wv8si3213365lac.86.2014.10.23.08.54.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Oct 2014 08:54:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id ge10so1125886lab.10 for ; Thu, 23 Oct 2014 08:54:37 -0700 (PDT) X-Received: by 10.112.12.35 with SMTP id v3mr6078006lbb.80.1414079677593; Thu, 23 Oct 2014 08:54:37 -0700 (PDT) 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.84.229 with SMTP id c5csp279621lbz; Thu, 23 Oct 2014 08:54:36 -0700 (PDT) X-Received: by 10.66.139.234 with SMTP id rb10mr2969661pab.146.1414079675817; Thu, 23 Oct 2014 08:54:35 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ce14si1827562pdb.254.2014.10.23.08.54.35 for ; Thu, 23 Oct 2014 08:54:35 -0700 (PDT) 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 S1755680AbaJWPy0 (ORCPT + 28 others); Thu, 23 Oct 2014 11:54:26 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:49967 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751798AbaJWPyR (ORCPT ); Thu, 23 Oct 2014 11:54:17 -0400 X-Listener-Flag: 11101 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1493838430; Thu, 23 Oct 2014 23:54:11 +0800 Received: from mtksdtcf02.mediatek.inc (10.21.12.142) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.181.6; Thu, 23 Oct 2014 23:54:11 +0800 From: Yingjoe Chen To: Rob Herring , Jiang Liu , Marc Zyngier , Matthias Brugger , CC: Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Thomas Gleixner , Jason Cooper , Benjamin Herrenschmidt , Yingjoe Chen , Grant Likely , Hans de Goede , Boris BREZILLON , , , , Olof Johansson , Arnd Bergmann , , , , , , Subject: [PATCH v4 1/7] irqdomain: Fix irq_domain_alloc_irqs return check. Date: Thu, 23 Oct 2014 23:53:09 +0800 Message-ID: <1414079595-26129-2-git-send-email-yingjoe.chen@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1414079595-26129-1-git-send-email-yingjoe.chen@mediatek.com> References: <1414079595-26129-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.215.51 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: , Change virq type from unsigned int to int. Otherwise the return value check for irq_domain_alloc_irqs will always pass. Signed-off-by: Yingjoe Chen --- kernel/irq/irqdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 584be46..dd8d3ab 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -469,7 +469,7 @@ unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data) struct irq_domain *domain; irq_hw_number_t hwirq; unsigned int type = IRQ_TYPE_NONE; - unsigned int virq; + int virq; domain = irq_data->np ? irq_find_host(irq_data->np) : irq_default_domain; if (!domain) {