From patchwork Sun Aug 11 02:45:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 2842670 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A1D199F314 for ; Sun, 11 Aug 2013 02:57:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D367720304 for ; Sun, 11 Aug 2013 02:57:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0AC85202EA for ; Sun, 11 Aug 2013 02:57:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752118Ab3HKCqw (ORCPT ); Sat, 10 Aug 2013 22:46:52 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:34497 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751758Ab3HKCqJ (ORCPT ); Sat, 10 Aug 2013 22:46:09 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r7B2jfHh014457 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 11 Aug 2013 02:45:42 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7B2jfuS008442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Aug 2013 02:45:41 GMT Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7B2jeKJ008936; Sun, 11 Aug 2013 02:45:40 GMT Received: from linux-siqj.site.site (/75.36.254.102) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 10 Aug 2013 19:45:40 -0700 From: Yinghai Lu To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Tony Luck , Bjorn Helgaas , "Rafael J. Wysocki" Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Yinghai Lu , Fenghua Yu , linux-ia64@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 09/28] ia64, irq: Add dummy create_irq_nr() Date: Sat, 10 Aug 2013 19:45:20 -0700 Message-Id: <1376189139-31856-11-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1376189139-31856-1-git-send-email-yinghai@kernel.org> References: <1376189139-31856-1-git-send-email-yinghai@kernel.org> X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, 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 create_irq() will return -1 when fail to allocate. create_irq_nr() will return 0 when fail to allocate. Will use it to fix one return value checking for dmar_msi irq. Signed-off-by: Yinghai Lu Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Cc: stable@vger.kernel.org --- arch/ia64/kernel/irq_ia64.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 1034884..38e46df 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c @@ -429,6 +429,16 @@ int create_irq(void) return irq; } +unsigned int create_irq_nr(unsigned int from, int node) +{ + int irq = create_irq(); + + if (irq < 0) + irq = 0; + + return irq; +} + void destroy_irq(unsigned int irq) { dynamic_irq_cleanup(irq);