From patchwork Sat Nov 21 11:09:48 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: 7674121 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5C4809F2EC for ; Sat, 21 Nov 2015 11:10:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 82C902052F for ; Sat, 21 Nov 2015 11:10:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E3362055D for ; Sat, 21 Nov 2015 11:10:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752405AbbKULKD (ORCPT ); Sat, 21 Nov 2015 06:10:03 -0500 Received: from smtp-out-098.synserver.de ([212.40.185.98]:1117 "EHLO smtp-out-188.synserver.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752121AbbKULKB (ORCPT ); Sat, 21 Nov 2015 06:10:01 -0500 Received: (qmail 8745 invoked by uid 0); 21 Nov 2015 11:09:59 -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:59 -0000 From: Lars-Peter Clausen To: Vinod Koul Cc: Ludovic Desroches , Andrew Bresticker , dmaengine@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 2/2] dmaengine: img-mdc: Remove unnecessary synchronize_irq() before devm_free_irq() Date: Sat, 21 Nov 2015 12:09:48 +0100 Message-Id: <1448104188-19836-2-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1448104188-19836-1-git-send-email-lars@metafoo.de> References: <1448104188-19836-1-git-send-email-lars@metafoo.de> 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 devm_free_irq() is quite useless. On one hand the IRQ can easily fire again before devm_free_irq() is entered, on the other hand devm_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, dev; @@ -synchronize_irq(irq); devm_free_irq(dev, irq, ...); // Signed-off-by: Lars-Peter Clausen --- drivers/dma/img-mdc-dma.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/dma/img-mdc-dma.c b/drivers/dma/img-mdc-dma.c index 9ca5683..42ae58d 100644 --- a/drivers/dma/img-mdc-dma.c +++ b/drivers/dma/img-mdc-dma.c @@ -979,7 +979,6 @@ static int mdc_dma_remove(struct platform_device *pdev) vc.chan.device_node) { list_del(&mchan->vc.chan.device_node); - synchronize_irq(mchan->irq); devm_free_irq(&pdev->dev, mchan->irq, mchan); tasklet_kill(&mchan->vc.task);