lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Jun 2017 20:22:46 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc:     Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>,
        Richard Weinberger <richard@....at>,
        Marek Vasut <marek.vasut@...il.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Chuanxiao Dong <chuanxiao.dong@...el.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Dinh Nguyen <dinguyen@...nel.org>,
        linux-mtd@...ts.infradead.org,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>,
        Jassi Brar <jaswinder.singh@...aro.org>,
        Brian Norris <computersforpeace@...il.com>,
        Enrico Jorns <ejo@...gutronix.de>
Subject: Re: [PATCH v5 19/23] mtd: nand: denali: fix raw and oob accessors for
 syndrome page layout

2017-06-07 23:09 GMT+09:00 Boris Brezillon <boris.brezillon@...e-electrons.com>:
> On Wed,  7 Jun 2017 20:52:28 +0900
> Masahiro Yamada <yamada.masahiro@...ionext.com> 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.



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ