From patchwork Wed Jun 15 06:14:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 881102 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5F6E9tx024933 for ; Wed, 15 Jun 2011 06:14:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751331Ab1FOGOJ (ORCPT ); Wed, 15 Jun 2011 02:14:09 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:60291 "EHLO relmlor1.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750947Ab1FOGOI (ORCPT ); Wed, 15 Jun 2011 02:14:08 -0400 Received: from relmlir2.idc.renesas.com ([10.200.68.152]) by relmlor1.idc.renesas.com ( SJSMS) with ESMTP id <0LMT001K5INJDT90@relmlor1.idc.renesas.com> for linux-sh@vger.kernel.org; Wed, 15 Jun 2011 15:14:07 +0900 (JST) Received: from relmlac2.idc.renesas.com ([10.200.69.22]) by relmlir2.idc.renesas.com ( SJSMS) with ESMTP id <0LMT00JTUINJORD0@relmlir2.idc.renesas.com> for linux-sh@vger.kernel.org; Wed, 15 Jun 2011 15:14:07 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 7F0B628088; Wed, 15 Jun 2011 15:14:07 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 74DEF28076; Wed, 15 Jun 2011 15:14:07 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id RAA20463; Wed, 15 Jun 2011 15:14:07 +0900 Date: Wed, 15 Jun 2011 15:14:07 +0900 X-IronPort-AV: E=Sophos; i="4.65,369,1304262000"; d="scan'208"; a="32088522" Received: from unknown (HELO PG10870.renesas.com) ([172.30.8.159]) by relmlii1.idc.renesas.com with ESMTP; Wed, 15 Jun 2011 15:14:07 +0900 Message-id: To: Paul Mundt Cc: Magnus , Linux-SH , Guennadi , Kuninori Morimoto In-reply-to: References: From: Kuninori Morimoto Subject: [PATCH 3/5] 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 (demeter2.kernel.org [140.211.167.43]); Wed, 15 Jun 2011 06:14:09 +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 8748df3..f7b3c06 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); }