From patchwork Thu Jun 16 05:08:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 884262 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5G57JAW020258 for ; Thu, 16 Jun 2011 05:08:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751479Ab1FPFIT (ORCPT ); Thu, 16 Jun 2011 01:08:19 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:36049 "EHLO relmlor4.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280Ab1FPFIT (ORCPT ); Thu, 16 Jun 2011 01:08:19 -0400 Received: from relmlir4.idc.renesas.com ([10.200.68.154]) by relmlor4.idc.renesas.com ( SJSMS) with ESMTP id <0LMV00CBOA9UNW50@relmlor4.idc.renesas.com> for linux-sh@vger.kernel.org; Thu, 16 Jun 2011 14:08:18 +0900 (JST) Received: from relmlac1.idc.renesas.com ([10.200.69.21]) by relmlir4.idc.renesas.com ( SJSMS) with ESMTP id <0LMV0036SA9U9CF0@relmlir4.idc.renesas.com> for linux-sh@vger.kernel.org; Thu, 16 Jun 2011 14:08:18 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 7696C80086; Thu, 16 Jun 2011 14:08:18 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 7678E800A2; Thu, 16 Jun 2011 14:08:18 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id QBB12308; Thu, 16 Jun 2011 14:08:18 +0900 Date: Thu, 16 Jun 2011 14:08:18 +0900 X-IronPort-AV: E=Sophos; i="4.65,373,1304262000"; d="scan'208"; a="32369196" Received: from unknown (HELO PG10870.renesas.com) ([172.30.8.159]) by relmlii2.idc.renesas.com with ESMTP; Thu, 16 Jun 2011 14:08:18 +0900 Message-id: To: Paul Mundt Cc: Guennadi , Magnus , Linux-SH , Kuninori Morimoto In-reply-to: References: From: Kuninori Morimoto Subject: [PATCH 2/3 v2] dmaengine: shdma: tidyup spin_unlock_bh on sh_chan_xfer_ld_queue User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-2022-JP-2?B?U2Fuag==?= =?ISO-2022-JP-2?B?GyQoRCtXGyhC?=) APEL/10.6 Emacs/23.2 (i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO) MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 16 Jun 2011 05:08:20 +0000 (UTC) It is not readable that there is any spin_unlock_bh on same function. Signed-off-by: Kuninori Morimoto --- drivers/dma/shdma.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index d2fb16d..3d22eb8 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c @@ -766,10 +766,8 @@ static void sh_chan_xfer_ld_queue(struct sh_dmae_chan *sh_chan) spin_lock_bh(&sh_chan->desc_lock); /* DMA work check */ - if (dmae_is_busy(sh_chan)) { - spin_unlock_bh(&sh_chan->desc_lock); - return; - } + if (dmae_is_busy(sh_chan)) + goto sh_chan_xfer_ld_queue_end; /* Find the first not transferred descriptor */ list_for_each_entry(desc, &sh_chan->ld_queue, node) @@ -783,6 +781,7 @@ static void sh_chan_xfer_ld_queue(struct sh_dmae_chan *sh_chan) break; } +sh_chan_xfer_ld_queue_end: spin_unlock_bh(&sh_chan->desc_lock); }