From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e28smtp03.in.ibm.com (e28smtp03.in.ibm.com [122.248.162.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id AA5311A02A4 for ; Thu, 12 Jun 2014 14:41:33 +1000 (EST) Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Jun 2014 10:11:28 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id BF8E53940067 for ; Thu, 12 Jun 2014 10:11:22 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5C4fYJw62193722 for ; Thu, 12 Jun 2014 10:11:34 +0530 Received: from d28av03.in.ibm.com (localhost [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5C4fKkJ028982 for ; Thu, 12 Jun 2014 10:11:21 +0530 From: "Aneesh Kumar K.V" To: Joonsoo Kim , Andrew Morton , Marek Szyprowski , Michal Nazarewicz Subject: Re: [PATCH v2 01/10] DMA, CMA: clean-up log message In-Reply-To: <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> References: <1402543307-29800-1-git-send-email-iamjoonsoo.kim@lge.com> <1402543307-29800-2-git-send-email-iamjoonsoo.kim@lge.com> Date: Thu, 12 Jun 2014 10:11:19 +0530 Message-ID: <87y4x2pwnk.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Cc: Russell King - ARM Linux , kvm@vger.kernel.org, linux-mm@kvack.org, Gleb Natapov , Greg Kroah-Hartman , Alexander Graf , kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Minchan Kim , Paul Mackerras , Paolo Bonzini , Joonsoo Kim , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Joonsoo Kim writes: > We don't need explicit 'CMA:' prefix, since we already define prefix > 'cma:' in pr_fmt. So remove it. > > And, some logs print function name and others doesn't. This looks > bad to me, so I unify log format to print function name consistently. > > Lastly, I add one more debug log on cma_activate_area(). > > Signed-off-by: Joonsoo Kim > > diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c > index 83969f8..bd0bb81 100644 > --- a/drivers/base/dma-contiguous.c > +++ b/drivers/base/dma-contiguous.c > @@ -144,7 +144,7 @@ void __init dma_contiguous_reserve(phys_addr_t limit) > } > > if (selected_size && !dma_contiguous_default_area) { > - pr_debug("%s: reserving %ld MiB for global area\n", __func__, > + pr_debug("%s(): reserving %ld MiB for global area\n", __func__, > (unsigned long)selected_size / SZ_1M); Do we need to do function(), or just function:. I have seen the later usage in other parts of the kernel. > > dma_contiguous_reserve_area(selected_size, selected_base, > @@ -163,8 +163,9 @@ static int __init cma_activate_area(struct cma *cma) > unsigned i = cma->count >> pageblock_order; > struct zone *zone; > > - cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > + pr_debug("%s()\n", __func__); why ? > > + cma->bitmap = kzalloc(bitmap_size, GFP_KERNEL); > if (!cma->bitmap) > return -ENOMEM; > > @@ -234,7 +235,8 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > > /* Sanity checks */ > if (cma_area_count == ARRAY_SIZE(cma_areas)) { > - pr_err("Not enough slots for CMA reserved regions!\n"); > + pr_err("%s(): Not enough slots for CMA reserved regions!\n", > + __func__); > return -ENOSPC; > } > > @@ -274,14 +276,15 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base, > *res_cma = cma; > cma_area_count++; > > - pr_info("CMA: reserved %ld MiB at %08lx\n", (unsigned long)size / SZ_1M, > - (unsigned long)base); > + pr_info("%s(): reserved %ld MiB at %08lx\n", > + __func__, (unsigned long)size / SZ_1M, (unsigned long)base); > > /* Architecture specific contiguous memory fixup. */ > dma_contiguous_early_fixup(base, size); > return 0; > err: > - pr_err("CMA: failed to reserve %ld MiB\n", (unsigned long)size / SZ_1M); > + pr_err("%s(): failed to reserve %ld MiB\n", > + __func__, (unsigned long)size / SZ_1M); > return ret; > } > > -- > 1.7.9.5