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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82EACC71155 for ; Fri, 20 Jun 2025 06:53:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 238326B007B; Fri, 20 Jun 2025 02:53:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1E8A96B0089; Fri, 20 Jun 2025 02:53:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FE886B008A; Fri, 20 Jun 2025 02:53:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 028786B007B for ; Fri, 20 Jun 2025 02:53:57 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 7EC375FD07 for ; Fri, 20 Jun 2025 06:53:56 +0000 (UTC) X-FDA: 83574864072.05.D8EB25C Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf15.hostedemail.com (Postfix) with ESMTP id B3316A0008 for ; Fri, 20 Jun 2025 06:53:54 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1750402434; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RJT9+Mkt8H2d/a3HSD2N4mQOJxVBILSUwLAi0Ye5Gck=; b=wCcFa6Jd+1bk4AxgJ515WXblaJHP+WBe+dd4Bi/G5QzdOrO+g8PYHhS4dGCBalJMKNohYE g2nzENCG/VOk0rNv7Uto6r2T3eH/aNMGWEVqZ8UYCFdvoPq+0BBsCZm/hnC0RxZjz/ldvq UHbXPD8GhQq9ZJ1bry4uT4smS3uKaxo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1750402434; a=rsa-sha256; cv=none; b=NGwT6uMFsdLKn5C7HS80Pg6WR4GBiscWhsCijzjrYdctZ8JmSEn0/i280I4+D2906lRtxp PiTR3M6cmcQ8jtEjZSjhWz3Y8vapGSdgmHQfZN4LXoOy/kpUFIHK2/yCxwtZQKuWkdn4u6 31OqvWzLrGJyB0/5E9yXpFYPHxDTm3c= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 55F9F176A; Thu, 19 Jun 2025 23:53:34 -0700 (PDT) Received: from [10.164.146.15] (J09HK2D2RT.blr.arm.com [10.164.146.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ADD2D3F673; Thu, 19 Jun 2025 23:53:50 -0700 (PDT) Message-ID: <92a89dbb-7031-459a-ad5a-69b29b08cfc8@arm.com> Date: Fri, 20 Jun 2025 12:23:47 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 1/2] lib/vsprintf: Add support for pte_t To: Andy Shevchenko Cc: linux-mm@kvack.org, Rasmus Villemoes , Sergey Senozhatsky , Petr Mladek , Steven Rostedt , Jonathan Corbet , Andrew Morton , David Hildenbrand , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org References: <20250618041235.1716143-1-anshuman.khandual@arm.com> <20250618041235.1716143-2-anshuman.khandual@arm.com> <0d437b3e-37b5-4e98-90bc-afa6c8150e77@arm.com> Content-Language: en-US From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: B3316A0008 X-Stat-Signature: 8tx7bnwdwayy7yq4ciadcpk6ahrneama X-Rspam-User: X-HE-Tag: 1750402434-685914 X-HE-Meta: U2FsdGVkX18aKMJVUlmNWSn4oEJTk0DV+vUO5nZQWdqxmeZexYDI8UOPbeSb6fbY1YLB+HINugmfTBvEaBICg5lbiRCyAgWchLbNJrUHtrRNVZHvZaSvYN5IpnpyTquM/YmD5nTpL6sGtZDVfBbzh07znQDtyX+P8o5c1a7y5tD+d6o+XZXHrMteL3MRMgyg6ZbSQSkEkoTGXGn0Uj1ns3Dg4h4S+fVT06eYjgw+oNSwfJ87qxguYInvmxoQZJEaDoBFiuEraRVSTMJneuhrWoQFYIlLeR8qf1PnqMxQcVz6WFiVUt7SFy4d3WZVPyEL4KOqQe22hjFk2HVApf0sIkMF2aYRw7sv65U0kJ0NSeOmzHwFseLYmJJnPuJ+eUJbhlvOkTbeBdHqDJwGLnRZ2OHrb+xIRxW9MetQqcvaxL/oFHhhXsql8DLHGtS+07RE+W+BLZ0rKlySsqd3rriS4CL1NBpXuwVDtmpvrVJWDdfYXobRr1GetRHxFU/lGG5uFuiH5HtsK132qCyDSP7stJq4wSzR7d77hkTjP7GzIMLDE7LwYpH2LuhnifRwUx2aVJSrIQ5+sTduA5cwMW/jpLTCbnRZLQsSgzbWuFTKw6hMKGJcV7Fpahrf24xipsiwUWt1ZVnm56ndPyypSQ5AO0YhoGDKhKa3tVsNxmTdcXTkb53sKHZoN78lD9XbIoECAyRn0UkrJliLjAAchCANPCFBeGiLoVsn+ldZVp/ZvvZr4Vva4C02zr535Ztj2x1EyLh5lOgsN+4/fcdDr+teEDvMoF4ppEn6jynW28IV+mXme6ZNiUQZAFH5idhhaVMKfsk74xkmAyAiNN6+OqgkxseQgLon1Q5fnXBshdeSA/GElURFViuKMPWB2QFD+mLo7DsF2Uavd5PFkA0b9Es7CYUIFVZt5oJwH98z2lVLdeeSFQdCS9rbpLkcRLNPoSeLByii4HK1zKdP610kTGz gqABWvwN 2qR8vVgI0S3NCkEArVTa7xXJKv+vMcGZwiwfauN90X9Ls2lZ9v8upWjjJO7eKnoYqCBUy9w0y/f/0qzGj7+UWcB2GspsykBAKVlBvdalyJIxu5VdH/I1lqfGwfwscKazEg4+eBTXp0wiX8nrFrAAcZNFEwDFvI5IWR37VsF/r0f/s95AVLIUp/Jnf+WDw2TbGaY5NTbPWf5eOaxW+i3BEmVdCRvYdPJXB6RNodYNKwVvesP3g8nOzFKxS4AmuW78+taGAuzJuz0J2TBS7/njjNQoLFnQxbocytb0uEyhKp7rjniJ59wVoVfIgaYjv4ARckKq424gdL7zoM5maUEYmSnrM8yFB8HgSU2JGSHIAW7lPAPnGeZNIfpGSQOu74d6Ezyb4IAAQeO77/Hy6VgTnyLjJ8yFWL9DddTY8dUmJIvnp/1ExQKlRhCMY+02cQImMRgMMWuZeOBBKZpSDtHHXG8oZucSAS1l7hMWaJhaFY/ZBP+nrTGblUP1Fs3ui+xpiTKU+kDiDR1dziXBroKPjrk4/Le0XczqZnQS+8WYxn4wwNs5tK+OQkZlGGXkJAEVtoYd1VtloTKqAKBG8jX44fu7T7A== 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: List-Subscribe: List-Unsubscribe: On 19/06/25 5:30 PM, Andy Shevchenko wrote: > On Thu, Jun 19, 2025 at 03:05:10PM +0530, Anshuman Khandual wrote: >> On 18/06/25 11:16 PM, Andy Shevchenko wrote: >>> On Wed, Jun 18, 2025 at 09:42:34AM +0530, Anshuman Khandual wrote: >>>> Add a new format for printing page table entries. >>> >>>> Cc: Petr Mladek >>>> Cc: Steven Rostedt >>>> Cc: Jonathan Corbet >>>> Cc: Andrew Morton >>>> Cc: David Hildenbrand >>>> Cc: linux-doc@vger.kernel.org >>>> Cc: linux-kernel@vger.kernel.org >>>> Cc: linux-mm@kvack.org >>> >>> Please. move these to be after the '---' cutter line below. Just leave SoB tag >>> alone. This will have the same effect w/o polluting commit message. >>> >>>> Signed-off-by: Anshuman Khandual >>>> --- >>> >>> (somewhere here is a good place for all your Cc: tags) >> >> Is not it better to also capture the Cc: list in the commit message. > > No it's worse. One may easily get the same from lore. Can you give a good > justification for the polluting message with 8 lines over a single line of the > useful information, please? Will drop the Cc: list from the commit message and move it below '---' cutter line as suggested earlier. > >> Seems like such has been the practice for various patches on the MM >> list. But not sure if that is an expected standard for all patches. > > It's not an MM subsystem. > > ... > >>>> +Print standard page table entry pte_t. >>>> + >>>> +Passed by reference. >>>> + >>>> +Examples for a 64 bit page table entry, given &(u64)0xc0ffee:: >>> >>> What does this mean? >> >> 64 bit address containing value the 0xc0ffee > > Please, make it 64-bit address. The example as is is quite confusing. Agreed it is some what confusing - will fix it. > >>>> + %ppte 0x00c0ffee >>> >>> Can it be ever 64-bit? >> I am sorry - did not get that. pte_t contained value can be 64 >> bits if that's what you meant. > > Yes, see above why I have such a question. Got it. > > ... > >>>> + spec.field_width = 10; >>>> + spec.precision = 8; >>>> + spec.base = 16; >>>> + spec.flags = SPECIAL | SMALL | ZEROPAD; >>> >>> Do not duplicate code we have already in the file. >> I am sorry - did not get that. Is the above flag combination some >> how wrong ? > > It's dup. Please, take your time to find the very similar piece of code in one > of the helper functions we have. Are you referring to special_hex_number() ? > > I recommend you to look at the history of the changes in this file for when the > new specifier was added and how it is implemented> > ... > >> Could you please kindly elaborate on the code duplication problem >> you have mentioned earlier. I might not understand your concern >> here correctly. > > Just find the same or similar pieces of code elsewhere in the same file. > Use them. > Will go through previous print format additions and re-work the patches accommodating various suggestions. Thanks for your review.