From patchwork Sun Jan 20 06:36:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 156132 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp5049216jaa; Sat, 19 Jan 2019 22:38:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN6B46yH/oFAb53a8UekBffu0TD2+cTJxteX8S/pv7bt/xY1N2I1ZfEyoaB1CCAKNOb6Mhna X-Received: by 2002:a63:ca02:: with SMTP id n2mr23938791pgi.187.1547966296504; Sat, 19 Jan 2019 22:38:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547966296; cv=none; d=google.com; s=arc-20160816; b=NFfLbwODS4j9nvFlZssjcYydL9yjL/Bk0pI/GqYX7AX6Ts8J3J0LUjXB4YFpymJThE uefcRCtkzXzrPFJz0NIAtXQ8kjOqFXLNCz8HaYOoZDufjgu7yrMWKF4ZqFNujml0TepU Jl+RZNHIrzjJTwWwToiwBsQ6jOZIECi4OkR4nJHanTo6VDVkYcG8wKNniNzjEtGtoSWl EpHSjfDBBUEWxPJKlNyhIjn2IVwvksPfMUNFhXPNHPoQjZXM9ipHrHmi05POPNfdjAqh vYOXRZeFhvYZdY/7n5kdP9zn5u7cW4xWekQ6erNolJ6IHF0tw98vpHG6gy+SNhZM/KYf 4DNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=yKHjMKelZlB047DtdnkayxcX1E6fIe0cJsC2AqEv0bA=; b=vnrXI8e/CcwpWJzkbaNa/LsGWXNIDdfmBxAhZQdv77AuJVanSdJ7Ay4qQA1WG2NhJp jBn3VeXqquJxaJU2hLak16VAo3sLPFhPBaRDoYgOnelZeOQMFwNzc9VlesGmTFCdcwMx yIYc/Q8QS7D9EmD1wU7sdGlvKQhG5J09d11TCsFrRG6iyR33PxUdRN0p19bXfXfdWGUh 2eayIiBkg7XQoHR0ZMf+k7hYdj1D0+A73Ap02kDi55R4BYYZj9BxXexshB2u8IRIR62M K3thq590MNb9R5HShnIZgBfpA0Lwc3aWqfmINZSSRW30Ndyn0joHnW27dYgPDI0JIKC8 OB4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TIyIB6Jf; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2si9321320plb.152.2019.01.19.22.38.15; Sat, 19 Jan 2019 22:38:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TIyIB6Jf; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726071AbfATGiP (ORCPT + 3 others); Sun, 20 Jan 2019 01:38:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:49790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbfATGiP (ORCPT ); Sun, 20 Jan 2019 01:38:15 -0500 Received: from localhost.localdomain (unknown [122.178.235.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EC41F2084F; Sun, 20 Jan 2019 06:38:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547966294; bh=AECpNFCeNWM1vEsxHlkzEBvj5LMn+JXALV3YGV6nOc4=; h=From:To:Cc:Subject:Date:From; b=TIyIB6JfJuU1dIzOzZfKaijzy//RqZo+k9GgGdSS/Ua4o92OvblEnMg0YuQzJVkGH HIRonMM7K/glEagDK5t0ZH0mRzfmCkR1Qx5SEH83ucDhrW0fD4Z2eY0ixkFaOAjdPw vyP4Vqq7kjAZBa2NOWeg1dXWOUecRiX12zsG6VSk= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: festevam@gmail.com, Vinod Koul Subject: [PATCH 1/2] dmaengine: imx-dma: change variable 'now' type to size_t Date: Sun, 20 Jan 2019 12:06:10 +0530 Message-Id: <20190120063611.11237-1-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org now is used to keep size and it is better to change the variable type to size_t Signed-off-by: Vinod Koul --- drivers/dma/imx-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index fa3ef43fe314..aba1380c3321 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -283,7 +283,7 @@ static inline int imxdma_sg_next(struct imxdma_desc *d) struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan); struct imxdma_engine *imxdma = imxdmac->imxdma; struct scatterlist *sg = d->sg; - unsigned long now; + size_t now; now = min_t(size_t, d->len, sg_dma_len(sg)); if (d->len != IMX_DMA_LENGTH_LOOP) From patchwork Sun Jan 20 06:36:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 156133 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp5049230jaa; Sat, 19 Jan 2019 22:38:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN73tJknzyFVdDG2GL90YmX/yyhceg13f+dAftY5YsBYUA5yo39TMCD8ulzeausvBMKEc+n6 X-Received: by 2002:a62:ca03:: with SMTP id n3mr1959028pfg.241.1547966297706; Sat, 19 Jan 2019 22:38:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547966297; cv=none; d=google.com; s=arc-20160816; b=iQkdor/LKmfeTzeXgyoIxSNsP3LfzZPXzIci3qr6/EsQfU7+mA71lw7P6CxgWGp4LX iMxjYWNt1H3fg6PJ2nqR2TlMG9NrTTg6P6C8W1iZ6vbbI1EZ2Vkgbtd6wlEtbeKR+blL y35c93XQKpMvcnn/HFYk8T6yHRzlesWXSVIGXkRMRj0ank1SMjbhCVTpLutNnHk59HA/ CkgfJ6byeq21bg1cwdWY79yO3GYwlYtieXiysF54L5hWTZL/kLp7UToEFB4B0xGHACAt qaQnljw6rqBLduIVV9op2kNNGcsEzUsVGRh5I84cAwTPf/w0Vc04EMg/Z4hH5p4LrSUR VcWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2x6tszflgtRP0jPclJP9A56COc1fG3JAoBFZU+dIvaY=; b=Q5Po52n/L1D9N6AoGYumHABBp7kN9PFaub2/m9H6XjZyKDCF79FouWV8/ix4W58Yzq MdJ6XAEoNIganY/A5Psp52T/pvaWOicWteqXOR5YX9FzVLnxz2HLrrjtcoeleMMRex3o 2qwtvi9DD5MA/Df2uAP2HrgWhZoo20kRK52PuDBZgdtkEcVmY9I09jhmMGjXb5Jc7CVT SA/ubopCelIoVKUorcxUh+CiIL8f51BAEH7n07pscl0opnq1GvIseewW6c+ATc4QXKcz pj7oE6S3Ve99/idj9EHPbcrvsotWvsClOnBoLWzHYSCca6l76XyyI3U+AfV68AfBf4vb FtiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZsS7X5xB; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2si9321320plb.152.2019.01.19.22.38.17; Sat, 19 Jan 2019 22:38:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZsS7X5xB; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726353AbfATGiR (ORCPT + 3 others); Sun, 20 Jan 2019 01:38:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:49818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbfATGiR (ORCPT ); Sun, 20 Jan 2019 01:38:17 -0500 Received: from localhost.localdomain (unknown [122.178.235.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1C42F2087B; Sun, 20 Jan 2019 06:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547966296; bh=oNOo1yl3Ob9/DCJ86Sgi9BeVvBDWnhZJ1imGE58Nby8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZsS7X5xBnJu2TjeXtDFrYrlklH0QwlwZ8pPBe7wk70ButJNpJ3PDKOZTztS66/1gk VCwrMoy4gpLn6vyjZ8kgzi6REw29JWvN5IbiBcETguLcG+iMFYHSq1iSyUj+7YLWi4 GHH/X1bhMY/up6JWvERJRrrcbuW29iOZ/1F0jic8= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: festevam@gmail.com, Vinod Koul Subject: [PATCH 2/2] dmaengine: imx-dma: change return of 'imxdma_sg_next' to void Date: Sun, 20 Jan 2019 12:06:11 +0530 Message-Id: <20190120063611.11237-2-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190120063611.11237-1-vkoul@kernel.org> References: <20190120063611.11237-1-vkoul@kernel.org> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org The return value of function 'imxdma_sg_next' is not checked anywhere, so make it void return type. Signed-off-by: Vinod Koul --- drivers/dma/imx-dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.20.1 diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index aba1380c3321..5a923490dc8b 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -278,7 +278,7 @@ static int imxdma_hw_chain(struct imxdma_channel *imxdmac) /* * imxdma_sg_next - prepare next chunk for scatter-gather DMA emulation */ -static inline int imxdma_sg_next(struct imxdma_desc *d) +static inline void imxdma_sg_next(struct imxdma_desc *d) { struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan); struct imxdma_engine *imxdma = imxdmac->imxdma; @@ -303,8 +303,6 @@ static inline int imxdma_sg_next(struct imxdma_desc *d) imx_dmav1_readl(imxdma, DMA_DAR(imxdmac->channel)), imx_dmav1_readl(imxdma, DMA_SAR(imxdmac->channel)), imx_dmav1_readl(imxdma, DMA_CNTR(imxdmac->channel))); - - return now; } static void imxdma_enable_hw(struct imxdma_desc *d)