Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp736488imm; Fri, 29 Jun 2018 05:40:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcgKqMQAEnNbq41Q/RZaYoMtl43xkEs/xXbeeLDa+WJb9Mlk2E3sc3s9FWp537cPCRaBSG5 X-Received: by 2002:a17:902:d807:: with SMTP id a7-v6mr5693053plz.214.1530276048238; Fri, 29 Jun 2018 05:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530276048; cv=none; d=google.com; s=arc-20160816; b=j9JNfSx4hW5YFhVMi4L1OjpZvZbaq40goyFapQj0T2K0L/VPMS9v1olOqxJTdPOFG9 vc3wY7YxW9qFX7SrEyfA5gwnOp97OQpD/rfFuHm/eoHitWASsnACBfQ2GGIpOGGM9egK nME8Yge3veSMDFKsW/l/ExKNBeiwNi1rfxQ1UQsVb0Pj1QFlh8vVUoh08EMdWCOkLyah WFsfoZ4VNLf2QpdeE6sJh7NnK2eVtMtdnOtSMwCUmJRlR6IkMEiY8F1QvTKm1wQkreXr Lx5fL/EOwMw2UWC6tt52YjuH6FV922hbF4ZtDnO10pLeEwYBNmen8Vm4pQrIQm68Y3xU gD3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ri3dZFjTeiBKlsDyUrgI+YZoQuZLlOhe6A1PdP03v0s=; b=1A94ZFGHXLRmYZ8/XGhjhRiBMEtFzPX8rCBtRVss0BgwvnODQwYhs1DHCwPebjBwkv uV8D8n4BwP7anduy/yltcK7zeCoecM/46WXIYK8HRAoJL3eTdWMmSfXDpHmf/irHagbS fCAFnNCIPSGKyJiDPclS+tzSUsy1zSx/fIAej7MiLnAFiY9abIU5Co7mveKs0FwEwzWc 1dRTXyjGKmY+bCPdPs2XgRAdg7ICed++bIdd5u/uVbye8EGEUu11leZIpddifh1ZuZ7Q 71YBmp8DlK7a0/7+D8Y3pCLu8mo2BtjvSHWoO4qhN+I+sCkQBRmhS1xYlDm+dfsJhsAv cIdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mlXdOIfO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 c10-v6si8819938pll.275.2018.06.29.05.40.33; Fri, 29 Jun 2018 05:40:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=mlXdOIfO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S934931AbeF2IUY (ORCPT + 99 others); Fri, 29 Jun 2018 04:20:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:39292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934450AbeF2ITx (ORCPT ); Fri, 29 Jun 2018 04:19:53 -0400 Received: from localhost (unknown [122.167.66.23]) (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 3920627BD0; Fri, 29 Jun 2018 08:19:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1530260393; bh=NfPIYk9xddzrsPnC3APkgW7Qri6Vca9Zw0aXZdd8NeY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mlXdOIfOhivzBqG8V1/kzvvXlOPKGBBI4ClCSWrb3T/I8SOtc4Aa2OPBz99xm7kCu AHMpP2kJoehsjrnQOKaySaoUXK92WfSwxVoLpZHPBONJYR2nQiTICaLS2PoQvWLoq+ cCBzZZ7wwY0NN/IAIEpul8AoLBINBfDAv6jTFdZE= Date: Fri, 29 Jun 2018 13:49:39 +0530 From: Vinod To: Andrea Merello Cc: dan.j.williams@intel.com, michal.simek@xilinx.com, appana.durga.rao@xilinx.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel , Radhey Shyam Pandey Subject: Re: [PATCH v3 1/5] dmaengine: xilinx_dma: in axidma slave_sg and dma_cylic mode align split descriptors Message-ID: <20180629081939.GA22377@vkoul-mobl> References: <20180625092724.22164-1-andrea.merello@gmail.com> <20180629072552.GY22377@vkoul-mobl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29-06-18, 09:46, Andrea Merello wrote: > On Fri, Jun 29, 2018 at 9:25 AM, Vinod wrote: > >> + > >> + if ((copy + sg_used < period_len) && > >> + chan->xdev->common.copy_align) { > >> + /* > >> + * If this is not the last descriptor, make sure > >> + * the next one will be properly aligned > >> + */ > >> + copy = rounddown(copy, > >> + (1 << chan->xdev->common.copy_align)); > >> + } > > > > same code pasted twice, can we have a routine for this... perhaps more > > code can be made common too > > Yes, I see.. Indeed there was duplicated code before this series and > it is still there after it. > > I can see if we can have a routine as you suggested at least for the > code portions touched by this patch. Do you eventually want this extra > change to be done in the same patch 1/5 or do you want a separate > patch i.e. 2/6 or 6/6 ? Each patch should do one thing, so would make sense to move first and then add you on top of that. 1/6 commonize and 2/6 add this bit. -- ~Vinod