From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751537Ab2KPMha (ORCPT ); Fri, 16 Nov 2012 07:37:30 -0500 Received: from mga03.intel.com ([143.182.124.21]:12816 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817Ab2KPMh0 convert rfc822-to-8bit (ORCPT ); Fri, 16 Nov 2012 07:37:26 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.83,264,1352102400"; d="scan'208";a="218691415" Message-ID: <1353069436.11158.355.camel@smile> Subject: Re: [PATCH 1/2] dw_dmac: check direction properly in dw_dma_cyclic_prep From: Andy Shevchenko To: viresh kumar Cc: Vinod Koul , spear-devel , linux-kernel@vger.kernel.org Date: Fri, 16 Nov 2012 14:37:16 +0200 In-Reply-To: References: <1352989248-28913-1-git-send-email-andriy.shevchenko@linux.intel.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.4.3-1 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2012-11-15 at 20:05 +0530, viresh kumar wrote: > On Thu, Nov 15, 2012 at 7:50 PM, Andy Shevchenko > wrote: > > diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c > > > +static inline bool is_slave_direction(enum dma_transfer_direction direction) > > +{ > > + return (direction == DMA_MEM_TO_DEV) || (direction == DMA_DEV_TO_MEM); > > +} > > I would add this in dmaengine.h and will also include check for DMA_DEV_TO_DEV. I briefly checked the other dma drivers and have noticed that dev-2-dev is not common type of transfer. So, I prefer to keep only those two in the check function. -- Andy Shevchenko Intel Finland Oy