Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751505AbeAEKDK (ORCPT + 1 other); Fri, 5 Jan 2018 05:03:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:32940 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750978AbeAEKDG (ORCPT ); Fri, 5 Jan 2018 05:03:06 -0500 Date: Fri, 5 Jan 2018 11:03:00 +0100 From: Petr Mladek To: Sergey Senozhatsky Cc: Andrew Morton , Russell King , Catalin Marinas , Mark Salter , Tony Luck , David Howells , Yoshinori Sato , Guan Xuetao , Borislav Petkov , Greg Kroah-Hartman , Thomas Gleixner , Peter Zijlstra , Vineet Gupta , Fengguang Wu , Steven Rostedt , LKML , linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-am33-list@redhat.com, linux-sh@vger.kernel.org, linux-edac@vger.kernel.org, x86@kernel.org, linux-snps-arc@lists.infradead.org, Sergey Senozhatsky Subject: Re: [PATCH 00/13] replace print_symbol() with printk()-s Message-ID: <20180105100300.j3svmcvvpfe2iows@pathway.suse.cz> References: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Mon 2017-12-11 21:50:12, Sergey Senozhatsky wrote: > Hello, > > A rather automatic replacement of print_symbol() > with direct printk() calls. print_symbol() uses extra stack > buffer (KSYM_SYMBOL_LEN 128 bytes) and, basically, should > be identical to printk(%pS). To make it clear, both print_symbol() and printk(%pS) print the adress using sprint_symbol(). And even printk(%pS) uses the buffer on the stack, see: char *symbol_string(char *buf, char *end, void *ptr, struct printf_spec spec, const char *fmt) { [...] char sym[KSYM_SYMBOL_LEN]; [...] sprint_symbol(sym, value); } Anyway, print_symbol() is an old weird API and it would be nice to eventually get rid of it. I could take this patches into printk.git. Would you mind if I change the commit messages to something like?: print_symbol() is an old weird API. It has been obsoleted by printk() and %pS format specifier. Best Regards, Petr