From: Ben Dooks <ben-linux@fluff.org>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: linux@armlinux.org.uk, Ben Dooks <ben-linux@fluff.org>
Subject: [PATCH 2/3] arm: dma-mapping: fix pointer/integer warning
Date: Thu, 21 Jul 2022 22:17:28 +0100 [thread overview]
Message-ID: <20220721211729.451731-3-ben-linux@fluff.org> (raw)
In-Reply-To: <20220721211729.451731-1-ben-linux@fluff.org>
Fix the use of a pointer assignment from integer where false
is being used instead of NULL. Fix the following warning by
usign NULL:
arch/arm/mm/dma-mapping.c:712:52: warning: Using plain integer as NULL pointer
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/mm/dma-mapping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 059cce018570..1483b6a4319d 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -709,7 +709,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
*handle = DMA_MAPPING_ERROR;
allowblock = gfpflags_allow_blocking(gfp);
- cma = allowblock ? dev_get_cma_area(dev) : false;
+ cma = allowblock ? dev_get_cma_area(dev) : NULL;
if (cma)
buf->allocator = &cma_allocator;
--
2.35.1
next prev parent reply other threads:[~2022-07-21 21:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 21:17 some sparse fixes Ben Dooks
2022-07-21 21:17 ` [PATCH 1/3] arm: add definition of arch_irq_work_raise() Ben Dooks
2022-07-21 21:17 ` Ben Dooks [this message]
2022-07-21 21:17 ` [PATCH 3/3] arm: fix undeclared soft_restart Ben Dooks
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=20220721211729.451731-3-ben-linux@fluff.org \
--to=ben-linux@fluff.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/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