From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaehoon Chung Date: Mon, 15 Oct 2012 20:03:53 +0900 Subject: [U-Boot] [PATCH v2 1/4] mmc: dw-mmc: support DesignWare MMC Controller In-Reply-To: <20121015090148.0bb9aeab@lilith> References: <4FF2A609.9070206@samsung.com> <507BACF0.4080100@samsung.com> <20121015090148.0bb9aeab@lilith> Message-ID: <507BED99.60301@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Albert, On 10/15/2012 04:01 PM, Albert ARIBAUD wrote: > Hi Jaehoon, > >>>> + desc->des0 = des0; >>>> + desc->des1 = des1; >>>> + desc->des2 = des2; >>>> + desc->des3 = (unsigned int)desc + sizeof(struct dwmci_idmac); >>> >>> >>> Also, is there a reason that you've decided to label the 4 fields of >>> your descriptor (which appear to reflect flags, count, address, >>> pointer to next descriptor) as des0-3? >> In DesigneWare IP spec, descriptors are used to those label. > > Makes the code pretty cryptic. Better name the struct membder by their > function and comment with their IP spec designations, or maybe name > them by both their IP name and function, e.g. desc->des0_flags, > desc->des1_count etc. > > But in any case, local variables (des0, des1...) have zero reason to > be named after the IP spec. These must be renamed according to their > function. Thanks for your comment. I will modify that...e.g. desc->flags/cnt/cur_addr/next_addr or others. Best Regards, Jaehoon Chung > > Amicalement, >