dma: make dma_alloc() and dma_zalloc() fallible
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected] change-id 20261016-dma-alloc-d79532c3c096Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | dma: add dma_xalloc() and dma_xzalloc()drivers/ include/ | +29 | 1 reply | |
| 2/3 | treewide: use dma_xalloc()/dma_xzalloc() where the result isn't checkedcommands/ common/ drivers/ +23 more | +46 | 1 reply | |
| 3/3 | dma: let dma_alloc() and dma_zalloc() faildrivers/ | +1 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Ahmad Fatoum |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] dma: make dma_alloc() and dma_zalloc() fallible
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.
---
Sascha Hauer (3):
dma: add dma_xalloc() and dma_xzalloc()
treewide: use dma_xalloc()/dma_xzalloc() where the result isn't checked
dma: let dma_alloc() and dma_zalloc() fail
commands/mmc_extcsd.c | 2 +- common/block.c | 2 +- drivers/ata/disk_ata_drive.c | 2 +- drivers/dma/map.c | 19 ++++++++++++++++++- drivers/input/usb_kbd.c | 2 +- drivers/mci/mci-core.c | 10 +++++----- drivers/net/bcmgenet.c | 2 +- drivers/net/designware.c | 4 ++-- drivers/net/dsa.c | 6 +++--- drivers/net/e1000/main.c | 2 +- drivers/net/fsl-fman.c | 2 +- drivers/net/fsl_enetc.c | 2 +- drivers/net/macb.c | 2 +- drivers/net/orion-gbe.c | 2 +- drivers/net/r8169_main.c | 4 ++-- drivers/net/usb/smsc95xx.c | 2 +- drivers/usb/core/usb.c | 8 ++++---- drivers/usb/gadget/function/dfu.c | 2 +- drivers/usb/gadget/function/u_serial.c | 2 +- drivers/usb/gadget/udc/fsl_udc.c | 2 +- drivers/usb/storage/transport.c | 6 +++--- drivers/usb/storage/usb.c | 8 ++++---- drivers/video/mipi_dbi.c | 4 ++-- drivers/video/ramfb.c | 2 +- fs/ext4/ext_barebox.c | 4 ++-- include/dma.h | 12 ++++++++++++ include/linux/slab.h | 6 +++--- include/net.h | 2 +- 28 files changed, 76 insertions(+), 47 deletions(-)
---
base-commit: 7a1f6c08dc94cc8b6a2388d760e9ef793bf64e5b
change-id: 20261016-dma-alloc-d79532c3c096
Best regards,
Signature · 1 line
Sascha Hauer <[email protected]>