From patchwork Sat Jun 8 13:04:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 2692461 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 4980DDF24C for ; Sat, 8 Jun 2013 13:11:34 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UlIvR-0008ED-8h; Sat, 08 Jun 2013 13:11:21 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UlIvO-0005Ux-IO; Sat, 08 Jun 2013 13:11:18 +0000 Received: from mail-ea0-x22a.google.com ([2a00:1450:4013:c01::22a]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UlIvL-0005Ta-PB for linux-arm-kernel@lists.infradead.org; Sat, 08 Jun 2013 13:11:16 +0000 Received: by mail-ea0-f170.google.com with SMTP id h10so4214610eaj.29 for ; Sat, 08 Jun 2013 06:10:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=36Nwa3MHsn/M68MM/70FmiV9VynTKvEeBpfk+OcDy9c=; b=OpDbMM612qgRktSE3Sk+rA7tLxluMCKmUMI+UqyAbg5dqGB6Ko78UJQkru8OPScNYp cGkmCkxCqqCeE8oN7wYs9UuVXdKdHPfbETaGmVDGHDv6A+LIwk7ShHtwa7OoryT6S3xk Vmy23abqssw58rRad/tsnNvpduYep1wYgsipznGD/XFe0IjDYMndH8UT+ybrZPpY150l MZjQdXPGpo6HudIGE0k9iPG67/zIiwLPmRJaX1F7+gCz1WGlrnEPjDrGA43GNcqoGG0j 6Bz9kiiSob6tcJmS5Hf02oQx+l4FAKeMaPffvo+6KqH2n5EcLF1KwSUIBSBLmZsf5Lum Us1Q== X-Received: by 10.15.54.198 with SMTP id t46mr3142159eew.74.1370697040976; Sat, 08 Jun 2013 06:10:40 -0700 (PDT) Received: from localhost (host86-180-104-153.range86-180.btcentralplus.com. [86.180.104.153]) by mx.google.com with ESMTPSA id b14sm6231264ees.16.2013.06.08.06.10.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Jun 2013 06:10:39 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 776FD3E070E; Sat, 8 Jun 2013 14:04:47 +0100 (BST) From: Grant Likely To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] irqchip: Return -EPERM for reserved IRQs Date: Sat, 8 Jun 2013 14:04:46 +0100 Message-Id: <1370696686-1666-1-git-send-email-grant.likely@linaro.org> X-Mailer: git-send-email 1.8.1.2 X-Gm-Message-State: ALoCoQkRGPn2/x1WQZ3F72hMmgUR0G3mxCCqVuAKksasxIyIMrPnnyFZyJswchghYXhIte0lKDuG X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130608_091115_935495_9F0B89D6 X-CRM114-Status: GOOD ( 17.06 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Grant Likely , Linus Walleij X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The irqdomain core will report a log message for any attempted map call that fails unless the error code is -EPERM. This patch changes the Versatile irq controller drivers to use -EPERM because it is normal for a subset of the IRQ inputs to be marked as reserved on the various Versatile platforms. Signed-off-by: Grant Likely Cc: Linus Walleij Acked-by: Linus Walleij --- drivers/irqchip/irq-versatile-fpga.c | 2 +- drivers/irqchip/irq-vic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c index 065b7a3..47a52ab 100644 --- a/drivers/irqchip/irq-versatile-fpga.c +++ b/drivers/irqchip/irq-versatile-fpga.c @@ -119,7 +119,7 @@ static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq, /* Skip invalid IRQs, only register handlers for the real ones */ if (!(f->valid & BIT(hwirq))) - return -ENOTSUPP; + return -EPERM; irq_set_chip_data(irq, f); irq_set_chip_and_handler(irq, &f->chip, handle_level_irq); diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c index 884d11c..2bbb004 100644 --- a/drivers/irqchip/irq-vic.c +++ b/drivers/irqchip/irq-vic.c @@ -197,7 +197,7 @@ static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq, /* Skip invalid IRQs, only register handlers for the real ones */ if (!(v->valid_sources & (1 << hwirq))) - return -ENOTSUPP; + return -EPERM; irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq); irq_set_chip_data(irq, v->base); set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);