From nobody Wed Dec 17 19:02:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E715DC77B71 for ; Tue, 18 Apr 2023 03:34:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230094AbjDRDeO (ORCPT ); Mon, 17 Apr 2023 23:34:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbjDRDeN (ORCPT ); Mon, 17 Apr 2023 23:34:13 -0400 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C16B81FCA for ; Mon, 17 Apr 2023 20:34:09 -0700 (PDT) Received: from SHSend.spreadtrum.com (bjmbx01.spreadtrum.com [10.0.64.7]) by SHSQR01.spreadtrum.com with ESMTP id 33I3XRlX088878; Tue, 18 Apr 2023 11:33:27 +0800 (+08) (envelope-from zhaoyang.huang@unisoc.com) Received: from bj03382pcu.spreadtrum.com (10.0.74.65) by BJMBX01.spreadtrum.com (10.0.64.7) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 18 Apr 2023 11:33:23 +0800 From: "zhaoyang.huang" To: Andrew Morton , Minchan Kim , Joonsoo Kim , , , Zhaoyang Huang , Subject: [PATCH] mm: fix printk format within cma Date: Tue, 18 Apr 2023 11:33:09 +0800 Message-ID: <1681788789-19679-1-git-send-email-zhaoyang.huang@unisoc.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.0.74.65] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX01.spreadtrum.com (10.0.64.7) X-MAIL: SHSQR01.spreadtrum.com 33I3XRlX088878 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Zhaoyang Huang cma and page pointer printed via %p are hash value which make debug to be h= ard. change them to %px. [63321.482751] [c7] cma: cma_alloc(): memory range at 000000000b5e462c is b= usy, retrying [63321.482786] [c7] cma: cma_alloc(): memory range at 000000000f7d6fae is b= usy, retrying [63321.482823] [c7] cma: cma_alloc(): memory range at 00000000e653b59b is b= usy, retrying [63322.378890] [c7] cma: cma_release(page 00000000dd53cf48) [63322.378913] [c7] cma: cma_release(page 00000000315f703d) [63322.378925] [c7] cma: cma_release(page 00000000791e3a5f) Signed-off-by: Zhaoyang Huang --- mm/cma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/cma.c b/mm/cma.c index 4a978e0..dfe9813 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -435,7 +435,7 @@ struct page *cma_alloc(struct cma *cma, unsigned long c= ount, if (!cma || !cma->count || !cma->bitmap) goto out; =20 - pr_debug("%s(cma %p, count %lu, align %d)\n", __func__, (void *)cma, + pr_debug("%s(cma %px, count %lu, align %d)\n", __func__, (void *)cma, count, align); =20 if (!count) @@ -534,7 +534,7 @@ bool cma_pages_valid(struct cma *cma, const struct page= *pages, pfn =3D page_to_pfn(pages); =20 if (pfn < cma->base_pfn || pfn >=3D cma->base_pfn + cma->count) { - pr_debug("%s(page %p, count %lu)\n", __func__, + pr_debug("%s(page %px, count %lu)\n", __func__, (void *)pages, count); return false; } @@ -560,7 +560,7 @@ bool cma_release(struct cma *cma, const struct page *pa= ges, if (!cma_pages_valid(cma, pages, count)) return false; =20 - pr_debug("%s(page %p, count %lu)\n", __func__, (void *)pages, count); + pr_debug("%s(page %px, count %lu)\n", __func__, (void *)pages, count); =20 pfn =3D page_to_pfn(pages); =20 --=20 1.9.1