mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: ejo@pengutronix.de
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] nand: denali: remove undefined GFP_DMA flag
Date: Wed, 14 Nov 2018 14:55:31 -0800	[thread overview]
Message-ID: <CAHQ1cqEiST3eJwRmRYP3s1WDdb4jL0Bv-ETK-xP8G9=OYDM9DQ@mail.gmail.com> (raw)
In-Reply-To: <20181114151454.8326-1-ejo@pengutronix.de>

On Wed, Nov 14, 2018 at 7:15 AM Enrico Jorns <ejo@pengutronix.de> wrote:
>
> This was a remnant from porting kernel code to barebox.
> While being uncritical so far, this will now cause a compiler error
> since kzalloc is not a define but a static inline function.
>
> As the kzalloc() 'mode' argument was ignored before and still will be,
> it is safe to remove the parameter.
>
> Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
> ---
>  drivers/mtd/nand/nand_denali.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/nand_denali.c b/drivers/mtd/nand/nand_denali.c
> index 8b09b3722f..ef3395864c 100644
> --- a/drivers/mtd/nand/nand_denali.c
> +++ b/drivers/mtd/nand/nand_denali.c
> @@ -1387,7 +1387,7 @@ int denali_init(struct denali_nand_info *denali)
>         }
>
>         /* allocate a temporary buffer for nand_scan_ident() */
> -       denali->buf.buf = kzalloc(PAGE_SIZE, GFP_DMA | GFP_KERNEL);
> +       denali->buf.buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
>         if (!denali->buf.buf)
>                 return -ENOMEM;

Just as a suggestion, maybe just replace this call with xzalloc,
getting rid of meaningless GFP_KERNEL as well, and dropping the OOM
check below?

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-11-14 22:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14 15:14 Enrico Jorns
2018-11-14 22:55 ` Andrey Smirnov [this message]
2018-11-16  9:43   ` Enrico Joerns
2018-11-19  8:08 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHQ1cqEiST3eJwRmRYP3s1WDdb4jL0Bv-ETK-xP8G9=OYDM9DQ@mail.gmail.com' \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=ejo@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox