Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752101AbdFMEmj (ORCPT ); Tue, 13 Jun 2017 00:42:39 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:33181 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751871AbdFMEmi (ORCPT ); Tue, 13 Jun 2017 00:42:38 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com v5D4gRLX010556 X-Nifty-SrcIP: [209.85.161.182] MIME-Version: 1.0 In-Reply-To: References: <1496836352-8016-1-git-send-email-yamada.masahiro@socionext.com> <1496836352-8016-20-git-send-email-yamada.masahiro@socionext.com> <20170607160935.6b064eef@bbrezillon> From: Masahiro Yamada Date: Tue, 13 Jun 2017 13:42:26 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 19/23] mtd: nand: denali: fix raw and oob accessors for syndrome page layout To: Boris Brezillon Cc: Cyrille Pitchen , Richard Weinberger , Marek Vasut , David Woodhouse , Chuanxiao Dong , Linux Kernel Mailing List , Dinh Nguyen , linux-mtd@lists.infradead.org, Masami Hiramatsu , Artem Bityutskiy , Jassi Brar , Brian Norris , Enrico Jorns Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 962 Lines: 34 2017-06-08 20:22 GMT+09:00 Masahiro Yamada : > 2017-06-07 23:09 GMT+09:00 Boris Brezillon : >> On Wed, 7 Jun 2017 20:52:28 +0900 >> Masahiro Yamada wrote: >> >>> >>> +static void denali_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) >>> +{ >>> + struct denali_nand_info *denali = mtd_to_denali(mtd); >>> + int i; >>> + >>> + iowrite32(MODE_11 | BANK(denali->flash_bank) | 2, denali->flash_mem); >> >> What is this '| 2'? You seem to use it a lot. Can you define a macro >> and maybe add a comment if the macro name is not self-descriptive. > > The type of access. > > bit[1:0] == 0 : command cycle > 1 : address cycle > 2 : data read/write cycle > > I will replace magic numbers > with macros or something. I will add this magic-number/macro consolidation at the tail of v6. -- Best Regards Masahiro Yamada