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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 24 Oct 2012 14:14:19 +0800
From:	Huang Shijie <shijie8@...il.com>
To:	dwmw2@...radead.org
Cc:	dedekind1@...il.com, linux-mtd@...ts.infradead.org,
	linux-kernel@...r.kernel.org, Huang Shijie <shijie8@...il.com>
Subject: Re: [PATCH] mtd: use the NAND_STATUS_FAIL to replace the hardcode

ping

On Mon, Oct 15, 2012 at 11:47 AM, Huang Shijie <shijie8@...il.com> wrote:
> Use the NAND_STATUS_FAIL to replace the hardcode "0x01",
> which make the code more readable.
>
> Signed-off-by: Huang Shijie <shijie8@...il.com>
> ---
>  drivers/mtd/nand/nand_base.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index d5ece6e..4569174 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -899,7 +899,7 @@ static int __nand_unlock(struct mtd_info *mtd, loff_t ofs,
>         /* Call wait ready function */
>         status = chip->waitfunc(mtd, chip);
>         /* See if device thinks it succeeded */
> -       if (status & 0x01) {
> +       if (status & NAND_STATUS_FAIL) {
>                 pr_debug("%s: error status = 0x%08x\n",
>                                         __func__, status);
>                 ret = -EIO;
> @@ -1004,7 +1004,7 @@ int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
>         /* Call wait ready function */
>         status = chip->waitfunc(mtd, chip);
>         /* See if device thinks it succeeded */
> -       if (status & 0x01) {
> +       if (status & NAND_STATUS_FAIL) {
>                 pr_debug("%s: error status = 0x%08x\n",
>                                         __func__, status);
>                 ret = -EIO;
> --
> 1.7.4.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ