Re: [PATCH v2] mm: cma: print cma name as well in cma_alloc debug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 07, 2023 at 03:57:42PM +0530, Anshuman Khandual wrote:
> LGTM, cma->name is an identifying attribute for the region for which the allocation
> request was made. But how about using cma_get_name() helper instead ? Very few call
> sites have been using the helper.

It's not really a "helper", is it?  The function name is longer than
its implementation.

cma_get_name(cma)
vs
cma->name

Plus there's the usual question about whether a "got" name needs to be
"put" (does it grab a refcount?)

I think it's useful that this function exists since it lets us not expose
struct cma outside of mm/, but it really should be called cma_name()
and I don't think we should be encouraging its use within cma.c.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux