From patchwork Mon Sep 15 21:15:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 37433 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 33AE3206A5 for ; Mon, 15 Sep 2014 21:16:17 +0000 (UTC) Received: by mail-we0-f198.google.com with SMTP id p10sf2564763wes.5 for ; Mon, 15 Sep 2014 14:16:16 -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=SWSDutOQsjqICW2x04C39qCmCOTxyOWFEaolkJN3+kU=; b=HssDiNBv9vkN90HD3QGPiiVAT9cWD3/E7G/ic3qkpX2oLwqlDhFbVIL4buaTeVITnj y7YyEkW8ks3CgIKdh1jEErchdRq58ckR0tBdTgkTivtoAIugEYrIgGyaoNX5r102D2Ml 6d900GRgPWx72HeCrxfRcy7NdLa3wXYrdMYI4wgnfCrRQpsOVt3j0v2dthnL/DJBxrgi BrZOXnId68uSPFz5KESr76rtGVdyT55xf3FbSBsFvR16HUkEclIAtw02b5jwWOD869m1 9i4JAvJZXq801rtwJnbNtEWTP0Z/+pSRoUhaQdP64zY3InWzXu4qWSNTMjHFUiVm6hBk 5ywA== X-Gm-Message-State: ALoCoQn0AhRjiqaifCCgel90grmPVrFVvCMrGmcHho1Bw9ZE52LxO7bLRri3fGcnPM/H07YvtEJO X-Received: by 10.180.24.70 with SMTP id s6mr5855144wif.3.1410815776325; Mon, 15 Sep 2014 14:16:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.230 with SMTP id r6ls430346lal.92.gmail; Mon, 15 Sep 2014 14:16:16 -0700 (PDT) X-Received: by 10.152.87.146 with SMTP id ay18mr6434835lab.92.1410815776176; Mon, 15 Sep 2014 14:16:16 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by mx.google.com with ESMTPS id df2si21111509lac.21.2014.09.15.14.16.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Sep 2014 14:16:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id gq15so2869711lab.39 for ; Mon, 15 Sep 2014 14:16:16 -0700 (PDT) X-Received: by 10.112.4.33 with SMTP id h1mr29193337lbh.67.1410815776111; Mon, 15 Sep 2014 14:16:16 -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.130.169 with SMTP id of9csp289808lbb; Mon, 15 Sep 2014 14:16:15 -0700 (PDT) X-Received: by 10.66.102.7 with SMTP id fk7mr9200931pab.127.1410815773945; Mon, 15 Sep 2014 14:16:13 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fk2si25356202pdb.228.2014.09.15.14.16.13 for ; Mon, 15 Sep 2014 14:16:13 -0700 (PDT) Received-SPF: none (google.com: linux-omap-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 S1754613AbaIOVQH (ORCPT + 5 others); Mon, 15 Sep 2014 17:16:07 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:37402 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754409AbaIOVQF (ORCPT ); Mon, 15 Sep 2014 17:16:05 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s8FLFZNa020431; Mon, 15 Sep 2014 16:15:35 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s8FLFZhW010266; Mon, 15 Sep 2014 16:15:35 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Mon, 15 Sep 2014 16:15:35 -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 s8FLFYFY013790; Mon, 15 Sep 2014 16:15:34 -0500 From: Felipe Balbi To: Tony Lindgren CC: Jason Cooper , Linux OMAP Mailing List , Linux ARM Kernel Mailing List , Felipe Balbi Subject: [PATCH 3/9] irqchip: omap-intc: minor improvement to omap_irq_pending() Date: Mon, 15 Sep 2014 16:15:03 -0500 Message-ID: <1410815709-462-4-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.0.1.563.g66f467c In-Reply-To: <1410815709-462-1-git-send-email-balbi@ti.com> References: <1410815709-462-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@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.215.52 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. Acked-by: Jason Cooper 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 1478f1a..2933760 100644 --- a/drivers/irqchip/irq-omap-intc.c +++ b/drivers/irqchip/irq-omap-intc.c @@ -174,11 +174,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; }