mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>,
	 Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH 0/3] dma: make dma_alloc() and dma_zalloc() fallible
Date: Thu, 22 Oct 2026 12:09:02 +0200	[thread overview]
Message-ID: <179266374251.1192486.15385455426987546348.b4-ty@pengutronix.de> (raw)
In-Reply-To: <20261016-dma-alloc-v1-0-31fc7afe3954@pengutronix.de>


On Fri, 16 Oct 2026 09:36:52 +0200, Sascha Hauer wrote:
> dma_alloc() and dma_zalloc() are implemented with xmemalign() and never
> return NULL. That's unlike malloc() and calloc(), and many callers check
> for NULL anyway, so they never get to handle an allocation failure.
> 
> This series adds dma_xalloc() and dma_xzalloc() for callers that rely on
> the allocation to always succeed, switches all callers that don't check
> the result over to them, and finally lets dma_alloc() return NULL on
> allocation failure.
> 
> [...]

Applied, thanks!

[1/3] dma: add dma_xalloc() and dma_xzalloc()
      https://git.pengutronix.de/cgit/barebox/commit/?id=fbf187a7d59e (link may not be stable)
[2/3] treewide: use dma_xalloc()/dma_xzalloc() where the result isn't checked
      https://git.pengutronix.de/cgit/barebox/commit/?id=54aeb3aabe4e (link may not be stable)
[3/3] dma: let dma_alloc() and dma_zalloc() fail
      https://git.pengutronix.de/cgit/barebox/commit/?id=560334ca9ea0 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




      parent reply	other threads:[~2026-10-22 10:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  7:36 Sascha Hauer
2026-10-16  7:36 ` [PATCH 1/3] dma: add dma_xalloc() and dma_xzalloc() Sascha Hauer
2026-10-16 10:31   ` Ahmad Fatoum
2026-10-16  7:36 ` [PATCH 2/3] treewide: use dma_xalloc()/dma_xzalloc() where the result isn't checked Sascha Hauer
2026-10-16 10:35   ` Ahmad Fatoum
2026-10-16  7:36 ` [PATCH 3/3] dma: let dma_alloc() and dma_zalloc() fail Sascha Hauer
2026-10-16 10:35   ` Ahmad Fatoum
2026-10-22 10:09 ` Sascha Hauer [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=179266374251.1192486.15385455426987546348.b4-ty@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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