Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751616AbbHTFqZ (ORCPT ); Thu, 20 Aug 2015 01:46:25 -0400 Received: from mga14.intel.com ([192.55.52.115]:46008 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbbHTFqX (ORCPT ); Thu, 20 Aug 2015 01:46:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,713,1432623600"; d="scan'208";a="772214478" Date: Thu, 20 Aug 2015 11:18:28 +0530 From: Vinod Koul To: Rameshwar Prasad Sahu Cc: dan.j.williams@intel.com, herbert@gondor.apana.org.au, davem@davemloft.net, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org, arnd@arndb.de, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jcm@redhat.com, patches@apm.com Subject: Re: [PATCH v1 3/4] Crypto: Add support for APM X-Gene SoC CRC32C h/w accelerator driver Message-ID: <20150820054828.GY13546@localhost> References: <1438258268-3099-1-git-send-email-rsahu@apm.com> <1438258268-3099-4-git-send-email-rsahu@apm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438258268-3099-4-git-send-email-rsahu@apm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 945 Lines: 36 On Thu, Jul 30, 2015 at 05:41:07PM +0530, Rameshwar Prasad Sahu wrote: > + nents = sg_nents(req->src); > + sg_count = dma_map_sg(dev, req->src, nents, DMA_TO_DEVICE); > + if (!sg_count) { > + dev_err(dev, "Failed to map src sg"); > + return -ENOMEM; mapping error shouldn't be no mem error > + } > + > + if (sg_count > XGENE_DMA_MAX_FLYBY_SRC_CNT) { > + dev_err(dev, "Unsupported src sg len\n"); would be worth printing length > + goto err; > + } > + > + flags = DMA_CTRL_ACK; why ACK? > + > + tx = dchan->device->device_prep_dma_crc32c(dchan, req->src, > + req->nbytes, > + reqctx->seed, > + req->result, > + flags); We should add helper for this -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/