Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753922AbcC1PCR (ORCPT ); Mon, 28 Mar 2016 11:02:17 -0400 Received: from vern.gendns.com ([50.115.127.205]:35424 "EHLO vern.gendns.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752620AbcC1PCP (ORCPT ); Mon, 28 Mar 2016 11:02:15 -0400 Subject: Re: [PATCH v3 02/16] mfd: da8xx-cfgchip: New header file for CFGCHIP registers. To: Sergei Shtylyov References: <1458863503-31121-1-git-send-email-david@lechnology.com> <1458863503-31121-3-git-send-email-david@lechnology.com> <56F573F3.90500@cogentembedded.com> Cc: petr@barix.com, David.Laight@ACULAB.COM, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Sekhar Nori , Kevin Hilman , Kishon Vijay Abraham I , Greg Kroah-Hartman , Alan Stern , Bin Liu , Lee Jones , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , "moderated list:ARM PORT" , "open list:USB SUBSYSTEM" From: David Lechner Message-ID: <56F94772.7070009@lechnology.com> Date: Mon, 28 Mar 2016 10:02:10 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56F573F3.90500@cogentembedded.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 962 Lines: 26 On 03/25/2016 12:22 PM, Sergei Shtylyov wrote: > On 03/25/2016 02:51 AM, David Lechner wrote: >> +/* register offsets */ >> +#define CFGCHIP_REG(n) (n * 4) >> +#define CFGCHIP0_REG CFGCHIP_REG(0) >> +#define CFGCHIP1_REG CFGCHIP_REG(1) >> +#define CFGCHIP2_REG CFGCHIP_REG(2) >> +#define CFGCHIP3_REG CFGCHIP_REG(3) >> +#define CFGCHIP4_REG CFGCHIP_REG(4) > > Why not just use CFGCHIP_REG(n) directly? I considered that, but I went this way because A) the TRM uses, for example, "CFGCHIP2", so I wanted to keep "CFGCHIP" and "2" together and B) this tells you how many CFGCHIP registers there are, i.e. there is no CFGCHIP5_REG. >> @@ -53,7 +31,6 @@ struct da8xx_ohci_root_hub { >> /* Time from power on to power good (in 2 ms units) */ >> u8 potpgt; >> }; >> - > > Why? Unintentional. Must have sneaked in through rebasing or something.