From patchwork Fri Jul 18 13:26:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suthikulpanit, Suravee" X-Patchwork-Id: 33849 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9AD6E208CF for ; Fri, 18 Jul 2014 13:29:04 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id hq11sf7877233vcb.3 for ; Fri, 18 Jul 2014 06:29:04 -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:subject:date:message-id :mime-version:cc:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=nJ950OCsLFKt/dfD1BuUzQRDH2g7hM1iYvOTD5/m9yI=; b=cuAF3tFMLFk4pHFoyeCoD/82sUFOvripvNwALUVOWEEQQ45LzqO5996ZRU9tQemqhG yVGbN041mmsch2KEmk5MllOxi3dHF1Zhn7lp6Fl186h+5tFa+/wB11ONM7hA+MV8j1C6 9TsixVlwJqv5cigWDBnWHmAjEzpdSIn0LZa3YoSV/w4CiZs3REtpTDG6w54odE/UQhHx +esunGf7d2nQFFlE2zNL/xf1NoDO0PP7zf3neu+ESwp4lPCXfBlBJb42M4DxEHGjpZMq tzRX9HbfFwerUy+SGx3yRhlREn/pP1YHbLWfcQMBzHWFrIFVUmTJxIE4Xccg3XqClb0G 7NuA== X-Gm-Message-State: ALoCoQmwEj0uLgFhtVQMHsz96yinciqODI6x4N24qJSgC1q3lLH9EPIESbzYJYuJ+zxSa9Ig0a8J X-Received: by 10.236.171.234 with SMTP id r70mr1960432yhl.45.1405690144409; Fri, 18 Jul 2014 06:29:04 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.50.61.204 with SMTP id s12ls305734igr.38.canary; Fri, 18 Jul 2014 06:29:04 -0700 (PDT) X-Received: by 10.66.139.164 with SMTP id qz4mr2751316pab.151.1405690144275; Fri, 18 Jul 2014 06:29:04 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id vk6si5664363vec.45.2014.07.18.06.29.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 06:29:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hq11so5878319vcb.10 for ; Fri, 18 Jul 2014 06:29:03 -0700 (PDT) X-Received: by 10.52.37.81 with SMTP id w17mr3100981vdj.95.1405690143058; Fri, 18 Jul 2014 06:29:03 -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.221.37.5 with SMTP id tc5csp11225vcb; Fri, 18 Jul 2014 06:29:02 -0700 (PDT) X-Received: by 10.67.21.131 with SMTP id hk3mr4977600pad.25.1405690142137; Fri, 18 Jul 2014 06:29:02 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ez2si5953351pbb.186.2014.07.18.06.29.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 06:29:02 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1X88Bs-0000u0-Vd; Fri, 18 Jul 2014 13:27:12 +0000 Received: from mail-bl2lp0210.outbound.protection.outlook.com ([207.46.163.210] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X88Bp-0000UJ-VS for linux-arm-kernel@lists.infradead.org; Fri, 18 Jul 2014 13:27:10 +0000 Received: from BN1PR02CA0052.namprd02.prod.outlook.com (10.141.56.52) by BN1PR02MB039.namprd02.prod.outlook.com (10.242.210.153) with Microsoft SMTP Server (TLS) id 15.0.990.7; Fri, 18 Jul 2014 13:26:45 +0000 Received: from BY2FFO11FD036.protection.gbl (2a01:111:f400:7c0c::194) by BN1PR02CA0052.outlook.office365.com (2a01:111:e400:2a::52) with Microsoft SMTP Server (TLS) id 15.0.990.7 via Frontend Transport; Fri, 18 Jul 2014 13:26:45 +0000 Received: from atltwp01.amd.com (165.204.84.221) by BY2FFO11FD036.mail.protection.outlook.com (10.1.14.221) with Microsoft SMTP Server id 15.0.980.11 via Frontend Transport; Fri, 18 Jul 2014 13:26:43 +0000 X-WSS-ID: 0N8WTCG-07-2XI-02 X-M-MSG: Received: from satlvexedge01.amd.com (satlvexedge01.amd.com [10.177.96.28]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 29891CAE645; Fri, 18 Jul 2014 08:26:40 -0500 (CDT) Received: from SATLEXDAG03.amd.com (10.181.40.7) by satlvexedge01.amd.com (10.177.96.28) with Microsoft SMTP Server (TLS) id 14.2.328.9; Fri, 18 Jul 2014 08:26:48 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by satlexdag03.amd.com (10.181.40.7) with Microsoft SMTP Server id 14.2.328.9; Fri, 18 Jul 2014 09:26:41 -0400 From: To: , , Subject: [PATCH] irqchip: gicv2m: Clean up logic for detecting MSI support Date: Fri, 18 Jul 2014 08:26:36 -0500 Message-ID: <1405689996-3601-1-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.0 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.221; CTRY:US; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(428002)(199002)(189002)(46102001)(83322001)(19580405001)(86362001)(93916002)(19580395003)(77982001)(86152002)(97736001)(79102001)(4396001)(87936001)(87286001)(229853001)(107046002)(74502001)(74662001)(84676001)(101416001)(99396002)(31966008)(92726001)(92566001)(2201001)(102836001)(50986999)(104166001)(88136002)(53416004)(85852003)(21056001)(50226001)(83072002)(76482001)(62966002)(89996001)(50466002)(80022001)(64706001)(85306003)(77096002)(77156001)(105586002)(106466001)(44976005)(20776003)(47776003)(95666004)(48376002)(36756003)(33646002)(81342001)(81542001); DIR:OUT; SFP:; SCL:1; SRVR:BN1PR02MB039; H:atltwp01.amd.com; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; LANG:en; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 02760F0D1C Received-SPF: None (: amd.com does not designate permitted sender hosts) X-OriginatorOrg: amd4.onmicrosoft.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140718_062710_161282_0646A563 X-CRM114-Status: GOOD ( 12.33 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [207.46.163.210 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [207.46.163.210 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record Cc: Mark Rutland , devicetree@vger.kernel.org, pawel.moll@arm.com, linux-doc@vger.kernel.org, Marc Zyngier , Catalin.Marinas@arm.com, Harish.Kasiviswanathan@amd.com, linux-kernel@vger.kernel.org, Will.Deacon@arm.com, Suravee Suthikulpanit , linux-pci@vger.kernel.org, tglx@linutronix.de, 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: suravee.suthikulpanit@amd.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.220.179 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 From: Suravee Suthikulpanit It's not quite clear that msi-controller is already checked by of_msi_chip_add. So, this patch add a note to clarify. Also, clean up redundant logic and unnecessary pr_info. Cc: Mark Rutland Cc: Marc Zyngier Cc: Jason Cooper Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Suravee Suthikulpanit --- Note: This patch is created against irqchip/gic branch. drivers/irqchip/irq-gic-v2m.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c index e54ca1d..94ed8d6 100644 --- a/drivers/irqchip/irq-gic-v2m.c +++ b/drivers/irqchip/irq-gic-v2m.c @@ -235,15 +235,15 @@ gicv2m_of_init(struct device_node *node, struct device_node *parent) gic->msi_chip.teardown_irq = gicv2m_teardown_msi_irq; ret = of_pci_msi_chip_add(&gic->msi_chip); if (ret) { - /* MSI is optional and not supported here */ - pr_info("GICv2m: MSI is not supported.\n"); + /* + * Note: msi-controller is checked in of_pci_msi_chip_add(). + * MSI support is optional, and enabled only if msi-controller + * is specified. Hence, return 0. + */ return 0; } - ret = gicv2m_msi_init(node, &gic->v2m_data); - if (ret) - return ret; - return ret; + return gicv2m_msi_init(node, &gic->v2m_data); } IRQCHIP_DECLARE(arm_gic_400_v2m, "arm,gic-400-v2m", gicv2m_of_init);