Received: by 10.223.185.116 with SMTP id b49csp1137811wrg; Fri, 16 Feb 2018 13:10:53 -0800 (PST) X-Google-Smtp-Source: AH8x224dN7h7YWntcWSxNSozmlGDRctGa6EQG9OEZO9aSk5kx9EL/1iYhlaX94oez6OgyQQiQ2Y8 X-Received: by 2002:a17:902:a617:: with SMTP id u23-v6mr6925978plq.201.1518815453830; Fri, 16 Feb 2018 13:10:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518815453; cv=none; d=google.com; s=arc-20160816; b=rzwzjydHfCVDhwSmq2JRGGJytyhECouKjsZyna0mwM2Hj1vIyFQ05LdOeMqSPkWhSK nnXmLaYawdpzieoaXnZ7w68XsDdO4PvsI9wjsuzp6mNhqck90CEKSZ5RXuUCwuhVDEyG ipg5GE80zxyah4xRp+oeNZ/3I81stnJ1vDFtQHbBnjfzDrAtk7RSB2y85o+a/Nr0Uxw9 CVUU/izcHMvMloW5pjdOSrj6HGkBIpCgo5GiFG+YNXyOeWvOG7Nuo4XTF385Pg7CaE4g e+JlWIfczrqqVOoOaFiEOGvAF3O5h06D63KQN5FHVGta7tb2JTmfh7ZaDN7iDgPlrKJ2 vOxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=NTuIRPtJO4DkBe550pT5hZiBroeV2RP5RhHr8jqWG3s=; b=t6qpdMViNc/EshJF0kB/Tdti4vIDpIKbu3TvdVTT+vOdBW3WPefal5PYPWVoh2gs3w xF9STzt88rj9DpbcWHjJwYsWLtHWmGzKhFaa7ykQ1S5c83bZSn+iT+rHE/xybQrz35gy 8BFfmcV/FDmYM+PfBePrk1/5IeRjg9X0R7p/eOLhWkEMt+oUYs2P5ERzG9OwJlnJoEZJ CpjJ2BxDWtkERt3vM60PjhgyiLxU9NmZdie5LxzAqJ+VPZxoD0ol5MGZS4XfyqxuqNMI PhmnxyVcMdefeiNVdJZuHzQLmruJo4vN2Neg36xeR90M/fFU328FNMm6uwyCbQD5jrNU rzRw== 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 y67si350447pgy.24.2018.02.16.13.10.39; Fri, 16 Feb 2018 13:10:53 -0800 (PST) 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 S1751009AbeBPVI7 (ORCPT + 99 others); Fri, 16 Feb 2018 16:08:59 -0500 Received: from mga11.intel.com ([192.55.52.93]:22428 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750763AbeBPVHQ (ORCPT ); Fri, 16 Feb 2018 16:07:16 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Feb 2018 13:07:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,520,1511856000"; d="scan'208";a="28656847" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2018 13:07:14 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 34003130; Fri, 16 Feb 2018 23:07:13 +0200 (EET) From: Andy Shevchenko To: "Tobin C . Harding" , linux@rasmusvillemoes.dk, Petr Mladek , Joe Perches , linux-kernel@vger.kernel.org, Andrew Morton Cc: Andy Shevchenko Subject: [PATCH v2 5/9] lib/vsprintf: Move pointer_string() upper Date: Fri, 16 Feb 2018 23:07:07 +0200 Message-Id: <20180216210711.79901-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180216210711.79901-1-andriy.shevchenko@linux.intel.com> References: <20180216210711.79901-1-andriy.shevchenko@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As preparatory patch to further clean up. No functional change. Signed-off-by: Andy Shevchenko --- lib/vsprintf.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index c789d265311b..87dbced51b1a 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1347,6 +1347,20 @@ char *uuid_string(char *buf, char *end, const u8 *addr, return string(buf, end, uuid, spec); } +static noinline_for_stack +char *pointer_string(char *buf, char *end, const void *ptr, + struct printf_spec spec) +{ + spec.base = 16; + spec.flags |= SMALL; + if (spec.field_width == -1) { + spec.field_width = 2 * sizeof(ptr); + spec.flags |= ZEROPAD; + } + + return number(buf, end, (unsigned long int)ptr, spec); +} + int kptr_restrict __read_mostly; static noinline_for_stack @@ -1634,20 +1648,6 @@ char *device_node_string(char *buf, char *end, struct device_node *dn, return widen_string(buf, buf - buf_start, end, spec); } -static noinline_for_stack -char *pointer_string(char *buf, char *end, const void *ptr, - struct printf_spec spec) -{ - spec.base = 16; - spec.flags |= SMALL; - if (spec.field_width == -1) { - spec.field_width = 2 * sizeof(ptr); - spec.flags |= ZEROPAD; - } - - return number(buf, end, (unsigned long int)ptr, spec); -} - static bool have_filled_random_ptr_key __read_mostly; static siphash_key_t ptr_key __read_mostly; -- 2.15.1