Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6982028imm; Tue, 24 Jul 2018 06:34:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeWMZrVSEnHSOQ/J+lrCdnxKA1nXmMvOZpu/yrii4LqazOcqo0TfZYEBTlm+R4qsO6bPVjq X-Received: by 2002:a63:d15:: with SMTP id c21-v6mr16573818pgl.322.1532439249600; Tue, 24 Jul 2018 06:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532439249; cv=none; d=google.com; s=arc-20160816; b=zR2FD44/Z75aYNmS4GdOwTQD56Vy3/iPvw2zliHcF3mow+95nQ8+pzUzlFNNSJRrkU gQblhW6k/OxTrO/szvPoI44hgIk8k5kVH7enH0nBvRA2FDgVG0jOzMGVBPCtA0B6efGV 4GSgZPJH0ziGTteGmLAej31SnYZgmSXgEwnoF3biRlUzxnr+v30RoAR5mb/8vW72kEjd 7rCLCbhp4/mRVsOAwbOPatSn4WS3gvSQh0g9R+ISu3QQBfFrWdLTLN/Zsz5auIZTCvZh d0gRxiPU1wp7qG4Hp1z89oYXKCpcteTagNw4g6toHqp01vG1k0XOKTsmfuAU3JFMTtKO pvmA== 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=csn0n9osfEVm9kFlfMiAZizpuEnH7eKX32GOTRoxiV8=; b=Fs+iOQFyptJ/FzoUMcWpEf9DYbgSk5L32yPlf1EGvnWFfmz7Kul5QQX0JLBzwFKhUe 8Von32DmmLY7NVPE6W2QsutzMycNT3HoJENobdYFf6dw1A71KmVM6aSjRHSpZIr4+KHo 3Cm4X5O1xpAkyLvUBOpMuh4v+rE4KDlWolqFEQvHf7+OkhwMzXJ/ti43wE8jJmppJepW +76h7KW3kMcqNN1KuQMk79+29kjjWJniwVXjKyWIyDCadB1zj44lFzEKIig6QU25g97u OmPKRVE0qmt895uQW07oq1nkZfqrMdKgt9t2u+jWUIOFan6koTqYnPO2gAsyENWOhnk4 MDAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AVFzAGgc; 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 x19-v6si10716456pgl.660.2018.07.24.06.33.55; Tue, 24 Jul 2018 06:34:09 -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=AVFzAGgc; 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 S2388427AbeGXOjI (ORCPT + 99 others); Tue, 24 Jul 2018 10:39:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:54660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388297AbeGXOjI (ORCPT ); Tue, 24 Jul 2018 10:39:08 -0400 Received: from localhost (unknown [171.61.90.205]) (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 B62E220856; Tue, 24 Jul 2018 13:32:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532439157; bh=PctJpB7TXl1394sq1RvHD9J14gPvnXZh01hD3dVmxIU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AVFzAGgcBjtx9BKgbajJhE1kNbJ0qF5XzIRiB7QzV1Al9wswmOkAYm/ZQe7xjdizb N3rxXfKcLtX8H/ZX3fC+VOjT8NNwgU68g0mhF632l5EpEOlaLEdB1rPWChISeNmd+I +ITA1xR2rJLRTotXAVgejB2LB3YL+CQqXXIwRVLA= Date: Tue, 24 Jul 2018 19:02:29 +0530 From: Vinod To: Paul Cercueil Cc: Rob Herring , Mark Rutland , Ralf Baechle , Paul Burton , James Hogan , Zubair Lutfullah Kakakhel , Mathieu Malaterre , Daniel Silsby , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org Subject: Re: [PATCH v3 07/18] dmaengine: dma-jz4780: Add support for the JZ4770 SoC Message-ID: <20180724133229.GG3661@vkoul-mobl> References: <20180721110643.19624-1-paul@crapouillou.net> <20180721110643.19624-8-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180721110643.19624-8-paul@crapouillou.net> 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 21-07-18, 13:06, Paul Cercueil wrote: > +static inline void jz4780_dma_chan_enable(struct jz4780_dma_dev *jzdma, > + unsigned int chn) right justified and aligned with preceding please. While adding new code to a existing driver it is a good idea to conform to existing style > +{ > + if (jzdma->version == ID_JZ4770) > + jz4780_dma_ctrl_writel(jzdma, JZ_DMA_REG_DCKES, BIT(chn)); > +} > + > +static inline void jz4780_dma_chan_disable(struct jz4780_dma_dev *jzdma, > + unsigned int chn) > +{ > + if (jzdma->version == ID_JZ4770) > + jz4780_dma_ctrl_writel(jzdma, JZ_DMA_REG_DCKEC, BIT(chn)); so if another version has this feature we would do: if (jzdma->version == ID_JZ4770) || if (jzdma->version == ID_JZXXXX)) and so on.. why not add a value, clk_enable in the description and use that. For each controller it is set to true or false -- ~Vinod