From patchwork Mon Dec 11 12:50:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 846960 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oovJ4B1Y"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="WkaUZzny"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ywNGX59DGz9s4q for ; Mon, 11 Dec 2017 23:55:16 +1100 (AEDT) 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=SRxrPhb784cZqwJ2RsOjpJfx1XVWkSJkPgsn698UEZI=; b=oovJ4B1Yatis/CzJDtqoxdLe9I n3cs4Zf2IPMRqXK99GlOly87ULSiMJ1SP3Ko5dqXxfdRqLPEx2HhIpnfJ6fWTxyvjZc46KR7I24Iq D7izZVa+VZ99k3Wsvwfs1j4SKE7aBFhG7QPn+29VL95gs65XeoHAdyfuMM4BAhMif7zSWaUB5l290 Vps0m7P4NN6v89GaE+EtgkjYN+KQxs4g9+l983HHsc1hW3p7WGLxG4FrjxdidWclInE/oUYhdqh5D BnlQDenXbV1Q5QO9NkCQpFm2SCePyCTU5Ckg9c1JGK75vI3Y10tHC4ZNYKAfs1a5TLWnnfNPNFHkp PPtdBGlQ==; 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 1eONc3-0002yN-0l; Mon, 11 Dec 2017 12:55:15 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eONZj-000054-AX; Mon, 11 Dec 2017 12:54:09 +0000 Received: by mail-pg0-x242.google.com with SMTP id b18so10849557pgv.10; Mon, 11 Dec 2017 04:52:31 -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=S4BBQHxRzTI99Ok7t1usBu9CO4rOWRUAfLyoo44tKFI=; b=WkaUZzny2ozJ8bD3fuWrHUtYDqb0CmcEb8WacjGz7TNmQ0M39fbUTaWQSZtpD2xzLg CKbBBoTuTL6FMbIkHrbX8VABZKNNNrifERX8yncSS5af1Il2U7EU5QT7ZsiTfVxqcSst pjp+cU+x5bzYkpEM1m73V1WAXJyd2P6Vcwm6nLFvvy+JEuQtlG/XqAEi6ukfPMCNxoXk hw93EaxPsYay1Yddk4lU4NYPIEq9ZuHJ1+bEobmolaXoj53BYYb16yQXnLjkJbToKyBo uBVKgyg/05toTXS1kn8P6P1JZ1BIWWHn2afPHaZPmA2gOiE1InfyYVK0OevcppSoWRSQ dSMA== 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=S4BBQHxRzTI99Ok7t1usBu9CO4rOWRUAfLyoo44tKFI=; b=dYTWIPsGeaJ+cQ6gb+uiVF2xE6SVBdNuiUPmbW16pv25E3GCOO0Zj5WMJn4aprl13v G2YBe98clLrE7mD9S/0tmgNBNYzvfxTypuib/m1hTFWmMPdFHfYS3myUVbS2LzTTZKdW EY/YIqQ0meTgRn/Zcxl5Ua+J+GIgLwBf73wExNCDOlyFbRdeOfSfvENFdGy9tChB9Pnw E/f6ab8MsXxlvTpp11wgJ0/2gCV0QHy1+Gp5HzD6sDMtwE3D5LLVaij4/3uaHr1hTnYo l28wPc/limPsKRSXoxYrUaMC6xMcn6gtXCfk8zw4e6pRNJ2U0GtkoX7DfrsAsCTnJ1h0 i4+g== X-Gm-Message-State: AKGB3mJ6xW5QSqMXVzCmcO/Eo5jSIT3Qo5ChUS/LI57cKdB9exArxrKK YPtYlhDfiCvArDpfM7C3icw= X-Google-Smtp-Source: ACJfBosP+OzqDk4xnorBMaOhwtecHBCU2nXmdcFrSkKkr3khKFmNq7Z2i69b8iv1LiU8zDjaKr14LQ== X-Received: by 10.84.168.37 with SMTP id e34mr309979plb.10.1512996750771; Mon, 11 Dec 2017 04:52:30 -0800 (PST) Received: from localhost.localdomain ([110.70.53.61]) by smtp.gmail.com with ESMTPSA id j13sm23374380pff.131.2017.12.11.04.52.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:52:29 -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 09/13] drivers: do not use print_symbol() Date: Mon, 11 Dec 2017 21:50:21 +0900 Message-Id: <20171211125025.2270-10-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_045252_258465_D681DD88 X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sergey.senozhatsky.work[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors 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-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- drivers/base/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index bf45587bcb46..36e20498159b 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -685,8 +684,8 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr, if (dev_attr->show) ret = dev_attr->show(dev, dev_attr, buf); if (ret >= (ssize_t)PAGE_SIZE) { - print_symbol("dev_attr_show: %s returned bad count\n", - (unsigned long)dev_attr->show); + printk("dev_attr_show: %pS returned bad count\n", + dev_attr->show); } return ret; }