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 4489BC433F5 for ; Fri, 1 Oct 2021 23:12:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23DFE61A7A for ; Fri, 1 Oct 2021 23:12:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230492AbhJAXNw (ORCPT ); Fri, 1 Oct 2021 19:13:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:39680 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230009AbhJAXNv (ORCPT ); Fri, 1 Oct 2021 19:13:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 97D1E61A56; Fri, 1 Oct 2021 23:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633129926; bh=zXrRFKYFnzDxZpyFAhZ2wpdjQvNuybBFe1IPJSuaa68=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fYmNRF74XZxBmlqjGgKWDIrgfg9KxKGnnkE1wwh/3WzmmEY+FuMgA78aVn6pQTpcD kY2c7m0r3p9UtBGBYHyCt3SZPRWTEgO8xgMpy3h/hAVRZv0Y1QRF1KKglkQLX69LxP Lz45hgAMzqsuFMblCoSq0cbHCLHl5o28JEdU8WVvYuQblHw/lETlC35WgGck2owN/G PMYfGU7keSJIzK+cS0eW5wwY50D48snRa4Lp/yX5lw/j3KPDfaDJRH5xfrhIAMv2QT y5AcSDBrOqcW+wCWrjakq1p7xOFLFT2apdqInjDNVYXX4Qn9VVWICv0WHOXc5UJtN0 KxFHnGsfa6VEA== Date: Fri, 1 Oct 2021 16:12:00 -0700 From: Mike Rapoport To: Joe Perches Cc: Andrew Morton , linux-mm , LKML Subject: Re: [PATCH] memblock: Neaten logging Message-ID: References: <623750dd31aa3fe5e45c416be98ab37707e2c45d.camel@perches.com> <6573ccd25ce80f5e28ed35e4c88c898b0f994fbc.camel@perches.com> <06ede4d0c1bf66614c9e9e013098a876aeec883f.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06ede4d0c1bf66614c9e9e013098a876aeec883f.camel@perches.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 01, 2021 at 01:34:10PM -0700, Joe Perches wrote: > 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. I didn't object to the patch as a whole. I just don't like the pr_fmt definition. > $ git grep '\bpr_' mm/memblock.c > 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", These can have %s for __func__ as a prefix, > mm/memblock.c: pr_warn("%s: No memory registered yet\n", __func__); this one already has it, > 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", and these are just fine now even without the prefix. -- Sincerely yours, Mike.