From patchwork Wed Dec 2 13:59:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 7747181 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 12AAABEEE1 for ; Wed, 2 Dec 2015 14:07:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 682DB2063B for ; Wed, 2 Dec 2015 14:07:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EF912063C for ; Wed, 2 Dec 2015 14:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758311AbbLBOAL (ORCPT ); Wed, 2 Dec 2015 09:00:11 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:50308 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757343AbbLBOAH (ORCPT ); Wed, 2 Dec 2015 09:00:07 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id tB2DxaD2015318; Wed, 2 Dec 2015 07:59:36 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id tB2Dxa3C013592; Wed, 2 Dec 2015 07:59:36 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.224.2; Wed, 2 Dec 2015 07:59:35 -0600 Received: from dlep33.itg.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id tB2DxSph005929; Wed, 2 Dec 2015 07:59:32 -0600 From: Peter Ujfalusi To: , , CC: , , , , , , , Subject: [RFC v03 01/15] dmaengine: core: Skip mask matching when it is not provided to private_candidate Date: Wed, 2 Dec 2015 15:59:11 +0200 Message-ID: <1449064765-27427-2-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1449064765-27427-1-git-send-email-peter.ujfalusi@ti.com> References: <1449064765-27427-1-git-send-email-peter.ujfalusi@ti.com> MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 If mask is NULL skip the mask matching against the DMA device capabilities. Signed-off-by: Peter Ujfalusi --- drivers/dma/dmaengine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index daf54a39bcc7..6311e1fc80be 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -515,7 +515,7 @@ static struct dma_chan *private_candidate(const dma_cap_mask_t *mask, { struct dma_chan *chan; - if (!__dma_device_satisfies_mask(dev, mask)) { + if (mask && !__dma_device_satisfies_mask(dev, mask)) { pr_debug("%s: wrong capabilities\n", __func__); return NULL; }