From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Mladek via iommu Subject: Re: [PATCH 2/3] tracing: Use pr_crit() instead of long fancy messages Date: Thu, 1 Apr 2021 11:14:47 +0200 Message-ID: References: <20210331093104.383705-1-geert+renesas@glider.be> <20210331093104.383705-3-geert+renesas@glider.be> <20210331094007.77aa5194@gandalf.local.home> Reply-To: Petr Mladek Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617268488; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fNVeVEJsE2NrNnpG1ONXT+uOw5bYJLkau4SXRA3zVtY=; b=GRFP7NyKhoU4R3Df8eXeg/mty4f651aCNMyk12y/rdwQeK6fl4bVrfiimdQlcVB0giY/k6 NLUIG/qpYN1Odp3Xmygn+0Z+MjnFMv47Lp9hQJTw4JhqBOsBl8MNXXPsZhYruek/IXkQzp GNzwnEg1mD2Q4UsVtqYP3SO7sHaryIc= Content-Disposition: inline In-Reply-To: <20210331094007.77aa5194-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Sender: "iommu" To: Steven Rostedt Cc: Marco Elver , linux-embedded-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, John Ogness , Geert Uytterhoeven , Linus Torvalds , Randy Dunlap , Rasmus Villemoes , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Sergey Senozhatsky , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Ingo Molnar , Vlastimil Babka , Andrew Morton , Andy Shevchenko , Will Deacon , Gary R Hook On Wed 2021-03-31 09:40:07, Steven Rostedt wrote: > On Wed, 31 Mar 2021 11:31:03 +0200 > Geert Uytterhoeven wrote: > > > This reduces kernel size by ca. 0.5 KiB. > > If you are worried about size, disable tracing and it will go away > entirely. 0.5KiB is a drop in the bucket compared to what tracing adds in > size overhead. > > Sorry, but NAK. > > This has been very successful in stopping people from adding trace_printk() > to the kernel, and I like to keep it that way. I agree with Steven. I believe that the eye-catching form is important. Anyway, all three patches are replacing text that have many common parts. It is: pr_warn("\n"); pr_warn("**********************************************************\n"); pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n"); pr_warn("** **\n"); pr_warn("** **\n"); pr_warn("** **\n"); pr_warn("** **\n"); pr_warn("** **\n"); pr_warn("** If you see this message and you are not debugging **\n"); pr_warn("** the kernel, report this immediately to your vendor! **\n"); pr_warn("** **\n"); pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n"); pr_warn("**********************************************************\n"); It might be useful to avoid cut&pasting this entire blob and unify the common parts. My only concern is how to define the caller-specific lines so that they fit with the common ones. They should not be longer than the header and footer. We need to find a good compromise between usability and over-engineering. Also we have to keep bikeshading under control ;-) Best Regards, Petr