From patchwork Mon Dec 11 12:50:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 10105025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9F2AD60360 for ; Mon, 11 Dec 2017 13:07:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CB692018E for ; Mon, 11 Dec 2017 13:07:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 606732958E; Mon, 11 Dec 2017 13:07:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E5C922018E for ; Mon, 11 Dec 2017 13:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=x2av7a6ENG4H9lwJbDvapd8z+y/icRAX6t3fSAsd8ss=; b=XJtxSS/bAvjz+TwOMQzH3nQKu4 38oiFazrfA3QGcWQ1jeeqY676ivkSmA3fZ4w8EsiyGZekZ0aadmUPlkB7ITLjh2vgECIK0MTi4z2I /r+v4OTtJXpZ7B02NpvSUEjTDc07mTVOIHpOawZXme8wr9qWwgp+QNLGXXak3RbOYEfofx1HczWDi AUWN6wXhBXLW7Ag+BW9Q2y76z/480JEcxlYDJJYyJMuT8RgBCsczoTZhMZVPKwmKGokkCmZG/ixvd cMCnkeUMKoxisN/AWmkxuJuTOQj9oXUN8lMIK+CxEIayX7hZmuqqYrH6yHNpTu0wD3MPSmqHjum0u Ys4TIP+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eONoK-00085r-HK; Mon, 11 Dec 2017 13:07:56 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eONnq-0007Ve-Vd; Mon, 11 Dec 2017 13:07:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=JWgoK9afefGQjnRiHihdqCp0j3QrBwlFdVYG+CbmKZY=; b=giKqBl1jEKHXN1vJQEIa37+/1 xKfb9Fibwgu/nfIGveg8x9rBn8c2F/v+Q8qGvN3a4jjZI9iWFXN6Wo/XCYKlFlX8OeeraMEubU9hC yk6PfvOslfeX0+Oga1ELeXPG+Xe37Gj8BPJcCWs87WqVImqFLd6ICTgSDHU/F7FS5olBK27bEbMjU idQZWFHlvpe5bmvPVAXWxnyjO6dbuLExkKT4yqX191EQWkiDmrVgXq9il/HLubNF0DQO9qCZYBd8s a7zUUH+9OGaxdy2dUwgcNhleDqSSM1sKWzzC/hacA6sOLUQM7It/cnGZex06A6uFxoQ0XCJrnTRos cBZxbktCg==; Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eONZu-00015P-4t; Mon, 11 Dec 2017 12:53:04 +0000 Received: by mail-pg0-x241.google.com with SMTP id b18so10849893pgv.10; Mon, 11 Dec 2017 04:52:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JWgoK9afefGQjnRiHihdqCp0j3QrBwlFdVYG+CbmKZY=; b=GIG/N8ts9L0JRqJHZLAsVD6KCrT1qrSgF9bN+DW6dSjBud03dUsYugBCRQ8p8WiZiM accsuUP2vtVEiBpX7wqTOs8MEdEPyo2lSc39mLhNfp8nvcOaE1R4wwXoi98hei1qA6vm 3O4cMizp6LxGE/Tm5ncE3xP9UkVvpWzDJ9hhNqr3iy56b9gQOCm3WnqlgUrjgZKNqZMI apfiyfSDB3Hi4kUV3kZWRx1noX0MsKohzIzdLlYPzLagMYvpBpEtBhHqjbFsD06KaOv6 7EoqRYA1QaKGC3hb8EKqeNat6sgT/6jm99kjvHmV36dbADH45WHzDXOGFVKfrHlGuC2M hbGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JWgoK9afefGQjnRiHihdqCp0j3QrBwlFdVYG+CbmKZY=; b=gyyagj0/t3g7J1A5pBf9aIOB6miFNjNR5S7NaSUZB668GS6iIdyHU4OdMxS2byXSIk BXm/KcpkPufukW70gtugsrwocL9NhT3pXDo4Z3t4e6R8r/pB8J6Z0BTDrQLI42BIGyjj k/1713xDB65vrT1xSR3Ih9dtynuJOYkE06XR4wAtkREBXUvODrnHYd8NjV7yZBFNRcCS 8UL8Kwo0UC2veXK9hepVECkvjZki80KLFnIxAVVmuzeQzpmkyYT9LgcLkg8mB8FLffAY 4KRxvHRX+z2z+gNQ6u2T9THYeaY+iJRD7Tmfzof7E33gIB5fYixApx6bXckzA/KmPJV9 qxiQ== X-Gm-Message-State: AKGB3mKqUgb7zQt4KwrgAQiElozsJSn50bZPrnmNHuWxKmaCcwjUFext LfsONlQ5yTsv3eAANbErrbM= X-Google-Smtp-Source: ACJfBouo/AKXGADejX+CQGgn30nxuDayH5f8aTBQKht1GNq5+PRD2iawkwWKDObGrDz9z4UppmAxGQ== X-Received: by 10.98.66.77 with SMTP id p74mr260909pfa.183.1512996762317; Mon, 11 Dec 2017 04:52:42 -0800 (PST) Received: from localhost.localdomain ([110.70.53.61]) by smtp.gmail.com with ESMTPSA id j13sm23374380pff.131.2017.12.11.04.52.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:52:41 -0800 (PST) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky To: 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 Subject: [PATCH 10/13] sysfs: do not use print_symbol() Date: Mon, 11 Dec 2017 21:50:22 +0900 Message-Id: <20171211125025.2270-11-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> References: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171211_125302_334538_E1EB51DA X-CRM114-Status: GOOD ( 11.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Mladek , linux-am33-list@redhat.com, linux-ia64@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-sh@vger.kernel.org, x86@kernel.org, Sergey Senozhatsky , LKML , Steven Rostedt , Sergey Senozhatsky , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP print_symbol() uses extra stack space to sprintf() symbol information and then to feed that buffer to printk() char buffer[KSYM_SYMBOL_LEN]; sprint_symbol(buffer, address); printk(fmt, buffer); Replace print_symbol() with a direct printk("%pS") call. Signed-off-by: Sergey Senozhatsky Cc: Greg Kroah-Hartman --- fs/sysfs/file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 39c75a86c67f..bfcbe486d385 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -70,8 +69,8 @@ static int sysfs_kf_seq_show(struct seq_file *sf, void *v) * indicate truncated result or overflow in normal use cases. */ if (count >= (ssize_t)PAGE_SIZE) { - print_symbol("fill_read_buffer: %s returned bad count\n", - (unsigned long)ops->show); + printk("fill_read_buffer: %pS returned bad count\n", + ops->show); /* Try to struggle along */ count = PAGE_SIZE - 1; }