From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753448AbbGMUkG (ORCPT ); Mon, 13 Jul 2015 16:40:06 -0400 Received: from www.linutronix.de ([62.245.132.108]:55688 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752949AbbGMUkC (ORCPT ); Mon, 13 Jul 2015 16:40:02 -0400 Message-Id: <20150712211408.150489454@linutronix.de> User-Agent: quilt/0.63-1 Date: Mon, 13 Jul 2015 20:39:54 -0000 From: Thomas Gleixner To: LKML Cc: Dan Williams , Vinod Koul , dmaengine@vger.kernel.org, Jiang Liu Subject: [patch 2/2] dma/ipu: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc References: <20150712210847.937269270@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=dma-ipu-Use-irq_desc_get_xxx-to-avoid-redundant-lookup-o.patch X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiang Liu Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we already have a pointer to corresponding irq_desc. This is also a preparation for the removal of the 'irq' argument from interrupt flow handlers. Signed-off-by: Jiang Liu Cc: Dan Williams Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Signed-off-by: Thomas Gleixner --- drivers/dma/ipu/ipu_irq.c | 2 +- drivers/gpu/ipu-v3/ipu-common.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Index: tip/drivers/dma/ipu/ipu_irq.c =================================================================== --- tip.orig/drivers/dma/ipu/ipu_irq.c +++ tip/drivers/dma/ipu/ipu_irq.c @@ -268,7 +268,7 @@ int ipu_irq_unmap(unsigned int source) /* Chained IRQ handler for IPU error interrupt */ static void ipu_irq_err(unsigned int irq, struct irq_desc *desc) { - struct ipu *ipu = irq_get_handler_data(irq); + struct ipu *ipu = irq_desc_get_handler_data(desc); u32 status; int i, line; Index: tip/drivers/gpu/ipu-v3/ipu-common.c =================================================================== --- tip.orig/drivers/gpu/ipu-v3/ipu-common.c +++ tip/drivers/gpu/ipu-v3/ipu-common.c @@ -915,8 +915,8 @@ static void ipu_irq_handle(struct ipu_so static void ipu_irq_handler(unsigned int irq, struct irq_desc *desc) { struct ipu_soc *ipu = irq_desc_get_handler_data(desc); + struct irq_chip *chip = irq_desc_get_chip(desc); const int int_reg[] = { 0, 1, 2, 3, 10, 11, 12, 13, 14}; - struct irq_chip *chip = irq_get_chip(irq); chained_irq_enter(chip, desc); @@ -928,8 +928,8 @@ static void ipu_irq_handler(unsigned int static void ipu_err_irq_handler(unsigned int irq, struct irq_desc *desc) { struct ipu_soc *ipu = irq_desc_get_handler_data(desc); + struct irq_chip *chip = irq_desc_get_chip(desc); const int int_reg[] = { 4, 5, 8, 9}; - struct irq_chip *chip = irq_get_chip(irq); chained_irq_enter(chip, desc);