From patchwork Sat Nov 21 11:09:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 7674111 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 387EEBF90C for ; Sat, 21 Nov 2015 11:10:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6E5E22056C for ; Sat, 21 Nov 2015 11:10:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5DE212052F for ; Sat, 21 Nov 2015 11:10:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752257AbbKULKC (ORCPT ); Sat, 21 Nov 2015 06:10:02 -0500 Received: from smtp-out-098.synserver.de ([212.40.185.98]:1569 "EHLO smtp-out-188.synserver.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751814AbbKULKB (ORCPT ); Sat, 21 Nov 2015 06:10:01 -0500 Received: (qmail 8717 invoked by uid 0); 21 Nov 2015 11:09:57 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 8629 Received: from ppp-188-174-124-62.dynamic.mnet-online.de (HELO lars-laptop.fritz.box) [188.174.124.62] by 217.119.54.77 with SMTP; 21 Nov 2015 11:09:57 -0000 From: Lars-Peter Clausen To: Vinod Koul Cc: Ludovic Desroches , Andrew Bresticker , dmaengine@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 1/2] dmaengine: at_xdmac: Remove unnecessary synchronize_irq() before free_irq() Date: Sat, 21 Nov 2015 12:09:47 +0100 Message-Id: <1448104188-19836-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 2.1.4 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Patch was generated using the following semantic patch: // @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // Signed-off-by: Lars-Peter Clausen Acked-by: Ludovic Desroches --- drivers/dma/at_xdmac.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index 7f039de..d02276f 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -1995,8 +1995,6 @@ static int at_xdmac_remove(struct platform_device *pdev) dma_async_device_unregister(&atxdmac->dma); clk_disable_unprepare(atxdmac->clk); - synchronize_irq(atxdmac->irq); - free_irq(atxdmac->irq, atxdmac->dma.dev); for (i = 0; i < atxdmac->dma.chancnt; i++) {