Claude review: dma/contiguous: Fix broken build

Claude Code Review Bot
2026-03-31T07:29:36Z

Patch Review

**Correctness:** The patch is correct. The default CMA region is already handled by `add_cma_heaps()` in `cma_heap.c` which calls `dev_get_cma_area(NULL)` to retrieve it, so the removed call in `dma_contiguous_reserve()` was indeed redundant/dead:

```c
- ret = dma_heap_cma_register_heap(dma_contiguous_default_area);
- if (ret)
- pr_warn("Couldn't register default CMA heap.");
```

The header deletion is appropriate — after the parent commit removed the function definition, the header contained only a declaration with no remaining users:

```c
-int dma_heap_cma_register_heap(struct cma *cma);
```

**Completeness:** All include sites of `linux/dma-buf/heaps/cma.h` are covered (only `cma_heap.c` and `contiguous.c`). No other callers of `dma_heap_cma_register_heap()` remain after the parent commit.

**Minor nit (commit message only):** The commit message says "the now unused function definition" but the header file contains a function *declaration* (and an inline stub for the `!CONFIG_DMABUF_HEAPS_CMA` case). The actual function *definition* was in `cma_heap.c` and was presumably removed by the parent commit. This is a cosmetic issue in the commit message and doesn't affect the code.

**Reviewed-by worthy:** Yes, this is a straightforward and correct build fix.

---
Generated by Claude Code Patch Reviewer