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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 009D3C433F5 for ; Fri, 1 Oct 2021 20:34:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 78D1661AAB for ; Fri, 1 Oct 2021 20:34:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 78D1661AAB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id D5180940145; Fri, 1 Oct 2021 16:34:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CD996940121; Fri, 1 Oct 2021 16:34:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA0CB940145; Fri, 1 Oct 2021 16:34:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id A5EE7940121 for ; Fri, 1 Oct 2021 16:34:13 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 672E9182332EC for ; Fri, 1 Oct 2021 20:34:13 +0000 (UTC) X-FDA: 78649020786.31.56CA650 Received: from smtprelay.hostedemail.com (smtprelay0154.hostedemail.com [216.40.44.154]) by imf15.hostedemail.com (Postfix) with ESMTP id 20A63D0005DE for ; Fri, 1 Oct 2021 20:34:12 +0000 (UTC) Received: from omf19.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id C58982CFEA; Fri, 1 Oct 2021 20:34:12 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf19.hostedemail.com (Postfix) with ESMTPA id 12B6820D758; Fri, 1 Oct 2021 20:34:11 +0000 (UTC) Message-ID: <06ede4d0c1bf66614c9e9e013098a876aeec883f.camel@perches.com> Subject: Re: [PATCH] memblock: Neaten logging From: Joe Perches To: Mike Rapoport Cc: Andrew Morton , linux-mm , LKML Date: Fri, 01 Oct 2021 13:34:10 -0700 In-Reply-To: References: <623750dd31aa3fe5e45c416be98ab37707e2c45d.camel@perches.com> <6573ccd25ce80f5e28ed35e4c88c898b0f994fbc.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1+PpeNY0Rej3iQW6D3iqR/Yz8Bp9gwCecI= X-HE-Tag: 1633120451-177420 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 20A63D0005DE X-Stat-Signature: m9qa8t6mpzqa74ya7bsp5b4gmn3odojt Authentication-Results: imf15.hostedemail.com; dkim=none; dmarc=none; spf=none (imf15.hostedemail.com: domain of joe@perches.com has no SPF policy when checking 216.40.44.154) smtp.mailfrom=joe@perches.com X-HE-Tag: 1633120452-844666 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 Fri, 2021-10-01 at 09:37 -0700, Mike Rapoport wrote: > On Thu, Sep 30, 2021 at 06:27:15PM -0700, Joe Perches wrote: > > On Thu, 2021-09-30 at 14:12 -0700, Mike Rapoport wrote: > > > Hi Joe, > > > > > > On Wed, Sep 29, 2021 at 09:43:14PM -0700, Joe Perches wrote: > > > > Use more typical kernel logging styles. > > > > > > > > o Add and use #define pr_fmt KBUILD_MODNAME ": " fmt > > > > > > I don't see it as an improvement. On the contrary, the output becomes > > > somewhat tautological: > > > > And rather easier to grep as the prefix is constant. > > memblock_ is perfectly greppable Of course, but only when it's there, 2 instances out of 9. $ git grep '\bpr_' mm/memblock.c mm/memblock.c: pr_info(fmt, ##__VA_ARGS__); \ mm/memblock.c: pr_warn("Could not allocate %pap bytes of mirrored memory\n", mm/memblock.c: pr_err("memblock: Failed to double %s array from %ld to %ld entries !\n", mm/memblock.c: pr_warn("Could not allocate %pap bytes of mirrored memory\n", mm/memblock.c: pr_warn("%s: No memory registered yet\n", __func__); mm/memblock.c: pr_info(" %s.cnt = 0x%lx\n", type->name, type->cnt); mm/memblock.c: pr_info(" %s[%#x]\t[%pa-%pa], %pa bytes%s flags: %#x\n", mm/memblock.c: pr_info("MEMBLOCK configuration:\n"); mm/memblock.c: pr_info(" memory size = %pa reserved size = %pa\n", cheers, Joe