From patchwork Mon Oct 15 03:29:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 1592051 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 36B73DFB34 for ; Mon, 15 Oct 2012 03:31:09 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TNbMn-0000l8-SE; Mon, 15 Oct 2012 03:29:21 +0000 Received: from mail-ie0-f177.google.com ([209.85.223.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TNbMk-0000ku-Lt for linux-arm-kernel@lists.infradead.org; Mon, 15 Oct 2012 03:29:19 +0000 Received: by mail-ie0-f177.google.com with SMTP id e14so7911502iej.36 for ; Sun, 14 Oct 2012 20:29:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=McTUax/r6HWFeB72GNRL1TDPAS3NFH+y6s0WtgNuxUU=; b=DvhRYzKAg11yRai6Dn0HmWy/9QuVYb696VGzu6OuolAuvGcQDm4pOvIAR6TWM/HmQJ h4nXmgjck08Z+MhEb2qLh8MU7hYIiCPuHLe5wULexDwniz7YEeyAdJdYr0ZpMrr+6h0o ywpCVNFiyxxlktHYMtNW45PK71JAuFcA2eKAADSDANgi2yedflccQJk0AAq0/2vGJQ0B rGrNaPsPVJI/eHv/SNI37d+Wq/3kyibh4kJY6f7r17FPvlU/Kmjpr3epKTFP4izEjDzZ ddc+yrg7khgrsLXylQ0T2mTyoS/y8VL55q2igFNiMTrXaVXEg/hJB+9JVJWzIBu55sAI 3Bfw== MIME-Version: 1.0 Received: by 10.50.57.169 with SMTP id j9mr3707359igq.16.1350271757575; Sun, 14 Oct 2012 20:29:17 -0700 (PDT) Received: by 10.64.136.210 with HTTP; Sun, 14 Oct 2012 20:29:17 -0700 (PDT) In-Reply-To: <1350053897.10584.172.camel@smile> References: <142ef9170a2c69657d8a05ac127a9970d7b04965.1350051925.git.viresh.kumar@linaro.org> <9688d98010716880c1bbd966ead312c446282204.1350051925.git.viresh.kumar@linaro.org> <1350053897.10584.172.camel@smile> Date: Mon, 15 Oct 2012 08:59:17 +0530 Message-ID: Subject: Re: [PATCH V2 2/3] dmaengine: dw_dmac: Enhance device tree support From: Viresh Kumar To: Andy Shevchenko X-Gm-Message-State: ALoCoQn4Cfvb07pm5bCnpStjHgpMps/4Ohb1YBhk3f6sxdF38tSeQ5tu12Q+2fLrAuWoqNBZaI4H X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.223.177 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: vinod.koul@intel.com, devicetree-discuss@lists.ozlabs.org, spear-devel@list.st.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On 12 October 2012 20:28, Andy Shevchenko wrote: >> + if (last_dw) { >> + if ((last_bus_id == param) && (last_dw == dw)) >> + return false; >> + } > Just came to my mind. > dw can't be NULL, can't it? > Then > if (last_dw) { > ... > } > is unneeded. Fixup for this: * - If dw_dma's platform data is not filled with slave info, then all Reviewed-by: Andy Shevchenko diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index d72c26f..764c159 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c @@ -1196,11 +1196,8 @@ bool dw_dma_generic_filter(struct dma_chan *chan, void *param) * failure. If dw and param are same, i.e. trying on same dw with * different channel, return false. */ - if (last_dw) { - if ((last_bus_id == param) && (last_dw == dw)) - return false; - } - + if ((last_dw == dw) && (last_bus_id == param)) + return false; /* * Return true: