From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08B10C433DB for ; Thu, 28 Jan 2021 14:50:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 863DB64D99 for ; Thu, 28 Jan 2021 14:50:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 863DB64D99 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9BF3F6B0078; Thu, 28 Jan 2021 09:50:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 995A06B007B; Thu, 28 Jan 2021 09:50:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D4B56B007D; Thu, 28 Jan 2021 09:50:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id 776B56B0078 for ; Thu, 28 Jan 2021 09:50:32 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1EF7E363E for ; Thu, 28 Jan 2021 14:50:32 +0000 (UTC) X-FDA: 77755469904.07.top21_4a0cb2c275a0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id EAA041803F9C6 for ; Thu, 28 Jan 2021 14:50:31 +0000 (UTC) X-HE-Tag: top21_4a0cb2c275a0 X-Filterd-Recvd-Size: 2862 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Thu, 28 Jan 2021 14:50:30 +0000 (UTC) IronPort-SDR: yNh4YRb3f8X1qZ7opjtBbS6vOlAPwHEo34uesT51Oi/oaC95lh81RAw/JHxBTvFZfuAfFY2jSt ysorV86yJuCw== X-IronPort-AV: E=McAfee;i="6000,8403,9877"; a="159416506" X-IronPort-AV: E=Sophos;i="5.79,382,1602572400"; d="scan'208";a="159416506" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2021 06:50:29 -0800 IronPort-SDR: u4n4TMgqT90ApYC1tY2cmk2pdY+umiWpga+sUTa6uZD/jBdyeY6Tdvz9+WFVyf7OQLXAyrsbcv ZCbqKUOwRGxA== X-IronPort-AV: E=Sophos;i="5.79,382,1602572400"; d="scan'208";a="354197851" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2021 06:50:25 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l58cn-0004Pc-5q; Thu, 28 Jan 2021 16:50:21 +0200 Date: Thu, 28 Jan 2021 16:50:21 +0200 From: Andy Shevchenko To: Yafang Shao Cc: David Hildenbrand , Vlastimil Babka , Christoph Lameter , penberg@kernel.org, David Rientjes , iamjoonsoo.kim@lge.com, Andrew Morton , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Rasmus Villemoes , Linux MM , LKML Subject: Re: [PATCH 3/3] printk: dump full information of page flags in pGp Message-ID: References: <20210128021947.22877-1-laoar.shao@gmail.com> <20210128021947.22877-4-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jan 28, 2021 at 09:18:24PM +0800, Yafang Shao wrote: > On Thu, Jan 28, 2021 at 8:11 PM Andy Shevchenko > wrote: ... > Thanks for the explanation. > I will change it as you suggested. You are welcome! Just note, that kasprintf() should work for this as well as for the rest printf() cases. That's why it's very important to return proper buffer pointer. Also read `man snprintf(3)` RETURN VALUE section to understand it. -- With Best Regards, Andy Shevchenko