From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Miquel Raynal <miquel.raynal@free-electrons.com>
Cc: Richard Weinberger <richard@nod.at>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: nand: marvell: Fix missing memory allocation modifier
Date: Sat, 20 Jan 2018 14:56:59 +0100 [thread overview]
Message-ID: <20180120145659.7761e4ef@bbrezillon> (raw)
In-Reply-To: <20180119173901.30430-1-miquel.raynal@free-electrons.com>
On Fri, 19 Jan 2018 18:39:01 +0100
Miquel Raynal <miquel.raynal@free-electrons.com> wrote:
> The function marvell_nfc_init_dma() allocates a DMA buffer without the
> GFP_KERNEL modifier, that triggers this warning:
> "marvell_nfc_init_dma() error: no modifiers for allocation."
>
> Fix this by using (GFP_KERNEL | GFP_DMA) instead of only GFP_DMA as the
> probe happens in non-interrupt context.
Applied.
Thanks,
Boris
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
> ---
> drivers/mtd/nand/marvell_nand.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
> index 48d78ca0d71c..5f49c4e0e9e1 100644
> --- a/drivers/mtd/nand/marvell_nand.c
> +++ b/drivers/mtd/nand/marvell_nand.c
> @@ -2670,7 +2670,7 @@ static int marvell_nfc_init_dma(struct marvell_nfc *nfc)
> * for DMA transfers and then copy the desired amount of data to
> * the provided buffer.
> */
> - nfc->dma_buf = kmalloc(MAX_CHUNK_SIZE, GFP_DMA);
> + nfc->dma_buf = kmalloc(MAX_CHUNK_SIZE, GFP_KERNEL | GFP_DMA);
> if (!nfc->dma_buf)
> return -ENOMEM;
>
prev parent reply other threads:[~2018-01-20 13:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 17:39 [PATCH] mtd: nand: marvell: Fix missing memory allocation modifier Miquel Raynal
2018-01-20 13:56 ` Boris Brezillon [this message]
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=20180120145659.7761e4ef@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@free-electrons.com \
--cc=richard@nod.at \
/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