diff options
author | Barry Song <song.bao.hua@hisilicon.com> | 2020-08-24 02:03:09 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-09-01 10:19:43 +0300 |
commit | 2281f797f5524abb8fff66bf8540b4f4687332a2 (patch) | |
tree | 13ce4ce2bf6a70c115809e883e5c5e6f10f9e58a /kernel/dma/contiguous.c | |
parent | c6303ab9b91e7ca20a49ff494338309259ed7c65 (diff) | |
download | linux-2281f797f5524abb8fff66bf8540b4f4687332a2.tar.xz |
mm: cma: use CMA_MAX_NAME to define the length of cma name array
CMA_MAX_NAME should be visible to CMA's users as they might need it to set
the name of CMA areas and avoid hardcoding the size locally.
So this patch moves CMA_MAX_NAME from local header file to include/linux
header file and removes the hardcode in both hugetlb.c and contiguous.c.
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'kernel/dma/contiguous.c')
-rw-r--r-- | kernel/dma/contiguous.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c index aa53384fd7dc..f4c150810fd2 100644 --- a/kernel/dma/contiguous.c +++ b/kernel/dma/contiguous.c @@ -119,7 +119,7 @@ void __init dma_pernuma_cma_reserve(void) for_each_online_node(nid) { int ret; - char name[20]; + char name[CMA_MAX_NAME]; struct cma **cma = &dma_contiguous_pernuma_area[nid]; snprintf(name, sizeof(name), "pernuma%d", nid); |