Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp224935imm; Thu, 10 May 2018 19:13:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpyJpfR2899w0HtY0us+nUoBpKqcLfAfGPdGMonQXukk3TF/kst4apyJE4d1jYS1bt+uHbH X-Received: by 2002:a63:344c:: with SMTP id b73-v6mr2961742pga.258.1526004816298; Thu, 10 May 2018 19:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526004816; cv=none; d=google.com; s=arc-20160816; b=h5xRx4GwD7X6w2G0OtfqZoyBaTLdNH3rL2aKmDWa95FwfFH+7dMru2k6GFVpimHMTG 6PsMhPG7ROxJlD34pzaJXvzmVKLVcQZ/u590wilvynf7lx1UfrmDvLZCn5FJEFpXoWVh CJWN5mXkbxtgLhqF5QeRRiIt1f3rufBxnJUyxLc42a2gD0sEolrOJUZulLyLTFaREq1j fkbNpRkvViN7Cj2Et6Ht9XWiTxpXNpxkYxfJBqrWpswzheJ8q6kdfUjFKwnDhxG6JkD/ DZhKd6/LjrO64ERuXHCbgPeAy5ZnDZa+HnO0XPNArxzbQ1yF2EAWOkvMh65vIpj9Mlvp F5Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=j0aOLJkH0Utk2euEDup8TUR/6kgy3InzMA6JIM6kgn4=; b=XW0axrOoGgAPrVMVOkScCeKl8Kxm0vOF43jBsT7G79Jls4OEHxtcGOhQMQSMB71mXl 65/0M9zSNyteACdDKL3aDzXBpv77LVX9YLeh2vJFAzkqRHEpZQqsXKHww4XXfBquhePA rDQTf8M6/2smOnoU7hVIMChSGwiu3sNQ2pSx8Ljx2jYekZFBZWy36WsOZRFOC69MuamU Mj7YcoYV5m38KsQxgJQKFn+VxMe6dC0cnnTO76tELjcsZMSMseiJ+2D59PGvCXbiHnZc DHApK9VWLmQAJmqztuhuxUoZLukbZ4crkPasiqAYkLMwnQSP0DZa4FdM6MpKA2BsKLeN 4q2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3-v6si1713776pgv.504.2018.05.10.19.13.21; Thu, 10 May 2018 19:13:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752096AbeEKCNB (ORCPT + 99 others); Thu, 10 May 2018 22:13:01 -0400 Received: from smtprelay0217.hostedemail.com ([216.40.44.217]:58973 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750805AbeEKCNA (ORCPT ); Thu, 10 May 2018 22:13:00 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id 044AA181D3368; Fri, 11 May 2018 02:13:00 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:800:960:968:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:2693:2828:2895:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3874:4250:4321:4605:5007:6119:7514:7875:7903:10004:10400:10848:11026:11232:11658:11914:12043:12296:12740:12760:12895:13069:13311:13357:13439:14093:14096:14097:14181:14659:14721:21080:21451:21627:21740:30041:30054:30091,0,RBL:47.151.150.235:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:21,LUA_SUMMARY:none X-HE-Tag: chalk40_715bf17666d21 X-Filterd-Recvd-Size: 2951 Received: from XPS-9350.home (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA; Fri, 11 May 2018 02:12:58 +0000 (UTC) Message-ID: <8cbdd3e5d08c3faf3e7d10e19e8261f3222ce27c.camel@perches.com> Subject: Re: [PATCH 03/18] printk: Convert pr_fmt from blank define to KBUILD_MODNAME From: Joe Perches To: Sergey Senozhatsky Cc: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , linux-kernel@vger.kernel.org Date: Thu, 10 May 2018 19:12:57 -0700 In-Reply-To: <18d24efb4d5dafae2360cb2103b366098311998a.camel@perches.com> References: <20180511015140.GB895@jagdpanzerIV> <18d24efb4d5dafae2360cb2103b366098311998a.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-05-10 at 18:57 -0700, Joe Perches wrote: > On Fri, 2018-05-11 at 10:51 +0900, Sergey Senozhatsky wrote: > > On (05/10/18 08:45), Joe Perches wrote: > > > There are more than 1000 uses of #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > > Make that the default define so these uses can be removed later via script. > > > > > > Signed-off-by: Joe Perches > > > > In general, the idea looks OK to me, so FWIW > > Acked-by: Sergey Senozhatsky > > > > A quick question: > > > > - Would "can be removed later via script" be so trivial? > > What about these guys? > > > > drivers/of/address.c:#define pr_fmt(fmt) "OF: " fmt > > drivers/of/base.c:#define pr_fmt(fmt) "OF: " fmt > > drivers/of/dynamic.c:#define pr_fmt(fmt) "OF: " fmt > > drivers/of/fdt.c:#define pr_fmt(fmt) "OF: fdt: " fmt > > drivers/of/fdt_address.c:#define pr_fmt(fmt) "OF: fdt: " fmt > > drivers/of/irq.c:#define pr_fmt(fmt) "OF: " fmt > > drivers/of/of_numa.c:#define pr_fmt(fmt) "OF: NUMA: " fmt > > drivers/of/of_reserved_mem.c:#define pr_fmt(fmt) "OF: reserved mem: " fmt > > drivers/of/overlay.c:#define pr_fmt(fmt) "OF: overlay: " fmt > > drivers/of/platform.c:#define pr_fmt(fmt) "OF: " fmt > > drivers/of/property.c:#define pr_fmt(fmt) "OF: " fmt > > drivers/of/resolver.c:#define pr_fmt(fmt) "OF: resolver: " fmt > > What about them? > > All those defines above are non-generic as they are > specified to start with "OF: " and then some optional > extra bit. > > Why should these defines be updated or modified? What would be good, and is something that I will eventually work on, is to make the KBUILD_MODNAME ": " use a singleton looked up and inserted by the printk subsystem instead of stored with each format.