From patchwork Mon Jul 28 21:16:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 34440 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9879D202E4 for ; Mon, 28 Jul 2014 21:24:58 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id et14sf56330553pad.10 for ; Mon, 28 Jul 2014 14:24:57 -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=ngCD89hLQx+gV/nSakmpLNssFiOcLtZA08OnzBLe8/g=; b=jKHhtSqGHvHBrnzPcaSs0NOOQrozYSP9XYnzHC9lSF/4XG3kJHalGqqLtZLrx0Uje4 myGj/KsmV62+fiTksXuaTxo9p4syP3N3+myH+kqcduCNVfXGwyXgirPI8sRlnKEXnWCX X3krrMEf7vxePLKOaoAkVOEDfOpUY+gnVfCYPPMhHFYcGuRWsFGbacIMOLAKKTtLNqCo bHOFwj8JPp5ZuWsXV9LB806oaAPR+rgzjcO2QDngqM4ETmgDnZi1USBBFzMz/W0xSlVR QtotHMpMonQJ8+TwMv1ybsy6lmHxCZKO1B/+YmZil114We9IzLyiaemZrpP5me3uwLrm RdBA== X-Gm-Message-State: ALoCoQmgUB1uVskwhmqe6tRZDiuxzrCp+CHiQhScM6Mk0/FI4H3tGy0KGKvpuhhxcfTSUPKJvXIL X-Received: by 10.66.158.193 with SMTP id ww1mr17858602pab.12.1406582697808; Mon, 28 Jul 2014 14:24:57 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.48 with SMTP id e45ls2185205qgd.33.gmail; Mon, 28 Jul 2014 14:24:57 -0700 (PDT) X-Received: by 10.220.46.5 with SMTP id h5mr3605308vcf.55.1406582697598; Mon, 28 Jul 2014 14:24:57 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id id4si8905461vdb.100.2014.07.28.14.24.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jul 2014 14:24:57 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id le20so3501128vcb.14 for ; Mon, 28 Jul 2014 14:24:57 -0700 (PDT) X-Received: by 10.220.15.8 with SMTP id i8mr3627779vca.45.1406582697530; Mon, 28 Jul 2014 14:24:57 -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 tc5csp197389vcb; Mon, 28 Jul 2014 14:24:57 -0700 (PDT) X-Received: by 10.68.137.98 with SMTP id qh2mr41692458pbb.26.1406582696484; Mon, 28 Jul 2014 14:24:56 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kn11si18992844pbd.215.2014.07.28.14.24.55 for ; Mon, 28 Jul 2014 14:24:56 -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 S1752999AbaG1VYQ (ORCPT + 25 others); Mon, 28 Jul 2014 17:24:16 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:55575 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752293AbaG1VRp (ORCPT ); Mon, 28 Jul 2014 17:17:45 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s6SLHIIP004199; Mon, 28 Jul 2014 16:17:18 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6SLHIYn015034; Mon, 28 Jul 2014 16:17:18 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Mon, 28 Jul 2014 16:17:18 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6SLHH8o012850; Mon, 28 Jul 2014 16:17:17 -0500 From: Felipe Balbi To: Tony Lindgren CC: Linux OMAP Mailing List , Linux ARM Kernel Mailing List , , , , , , , Linux Kernel Mailing List , Felipe Balbi Subject: [PATCH 32/35] irq: intc: minor improvement to omap_irq_pending() Date: Mon, 28 Jul 2014 16:16:20 -0500 Message-ID: <1406582183-696-33-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.0.1.563.g66f467c In-Reply-To: <1406582183-696-1-git-send-email-balbi@ti.com> References: <1406582183-696-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 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: balbi@ti.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.169 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: , We already hold the number of Pending registers in omap_nr_pending. Let's use that instead. Signed-off-by: Felipe Balbi --- drivers/irqchip/irq-omap-intc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c index 30f5fa0..c9ba502 100644 --- a/drivers/irqchip/irq-omap-intc.c +++ b/drivers/irqchip/irq-omap-intc.c @@ -175,11 +175,10 @@ static void __init omap_irq_soft_reset(void) int omap_irq_pending(void) { - int irq; + int i; - for (irq = 0; irq < omap_nr_irqs; irq += 32) - if (intc_readl(INTC_PENDING_IRQ0 + - ((irq >> 5) << 5))) + for (i = 0; i < omap_nr_pending; i++) + if (intc_readl(INTC_PENDING_IRQ0 + (0x20 * i))) return 1; return 0; }