Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2184467ybe; Tue, 3 Sep 2019 09:07:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkykTBPxpASdqAMddsPVldzaO6JZ0gajH1fquBjLlXcmIzyUdJMMc9y+bF5TWz6asMKKJG X-Received: by 2002:a17:90a:e505:: with SMTP id t5mr51399pjy.68.1567526860726; Tue, 03 Sep 2019 09:07:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567526860; cv=none; d=google.com; s=arc-20160816; b=V6GtGhSbZyuz1PEY6ZuQoZH/zrX8tk8N8qPS+Jxt4sLlkUfcl3ycqgBp3K/wcv0tHW tWjpK15YInNkx1FtS0fJQKRCQAV3Fn+/dw5wFvN2Xg+HzEdByALLpcy1wpb2HFerFM10 p+9jxknvUmp11DP7gytpZfTxR9AWra6Yc8DHCe3o+S+//roHxPCfvqBF4tL9tJIoM+G+ 9DZh6hGamrRD1coAg+EKwBuMgQS+URcUwOf2arIXaGNdXVJabsHrBVGvEWYBtSG0uMOu O9wR6pasjPIVv+K+V/LI1eif18vNuayL4KZyyyvK0ik17MQP+nTBl/pASnGcc7l9nOpz Rysw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oDjYh1SsltbOsBEB420dFALj+pbpv/F7VefYy840/EY=; b=qS9MSUmhcnNy26+sLY2tBYaNaLmpx1Me+YZCH85z7AH6FmKctfMgWPgTqHOVqLOx1H RHhBpC6TQsNh6tOjaNhs2VTM3jnPh78Eu/NpHLgddGN/EIF6Pq/F+KvcWYKF/c1h0RHu q+JYfNnny8AZGOZT8haW01QVJLWwuYgPkIofufc+EKxBdiC7UalbdL6xnx0c/IAmPowG WfY3Wk0r+GUYmhpJRx3PrTztRy4YkWF869P3ExI8BD80o3okW/Pavq1qjJHr2n9aLJ/q dhZqo5Z94qlZQFb5LAccYviQJd3l3t8W8NG1dZHc351wm8dqaPsSk/Skh0PKBxcE6YEV jDpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GsrgTbga; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w14si9356632plq.38.2019.09.03.09.07.24; Tue, 03 Sep 2019 09:07:40 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GsrgTbga; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729919AbfICQFv (ORCPT + 99 others); Tue, 3 Sep 2019 12:05:51 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46907 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728854AbfICQFu (ORCPT ); Tue, 3 Sep 2019 12:05:50 -0400 Received: by mail-pf1-f194.google.com with SMTP id q5so3199565pfg.13 for ; Tue, 03 Sep 2019 09:05:50 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=oDjYh1SsltbOsBEB420dFALj+pbpv/F7VefYy840/EY=; b=GsrgTbgaFBhQFrgMq1YXV4RcR8zjQ92lvCgtyccS3iRm7gcJ5k1MEg9O6oXgHMo1uw GjDU6QjiPGgWmOnRQawMZ0TDo+gQ4THlJHPVk9GT/RLACj4Q7n+i6nIKI3WTzBlmBorM Oaeizkzy5iXh5H/4je9rGcysSeMPbIY76OHNUfmoPxnj8ypctXVBadQ7ZvKK5cb6uFgL UBAr3eR8Ub+H5/3P+4O/KzsjzvkQwLTTYI7uocFkQ6ZEUiVLYY00fYEK2pcRNZHkflf6 cH2mY/iB0eqUuBnGejO+Urv3EfLgYnwLRot8i4xUkb3sG5+yRbVpbDH1W4O+gFwQ0ML/ GCQw== 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:mime-version:content-transfer-encoding; bh=oDjYh1SsltbOsBEB420dFALj+pbpv/F7VefYy840/EY=; b=Gwyf29IIB8ls9FydS/lhvqqhP3/0LwsF5h3F746bz9H1skJHn8h6rKfp6ZpeENLcJN WH+u27YZR8chzhhqfdVCM6fcPBL/0w5KBEie6bQK88aPa0yQEjjrlSGvpCzrmiy/Q8QS AkoP6P56Rb2WZnvUl/Ydck4kIQMu4S2/PnWQUH/0hsZ43NjNFpIRqSaqNYWqWw1af7Ox zRuQNaEZywIUNeHfyufxBDDWPHJd3/qT3xAB3qAzW9d6oyZBL4OhDFr9TAdSNb9Wrg4b dkH7PS8ffrrKpLzO3XvSCkwP9J1Bbicinsigdbqq7UjsKxTdyr6TgN+ihDhRMFGS6yfA 1Lgw== X-Gm-Message-State: APjAAAUP+dlJeP5YbZJO4jUq8k1E2gqRMcBLfAiZCnwucanRKHGufZ3o rtYpU3OkxOK0fnxU48MRk7g= X-Received: by 2002:a63:4c5a:: with SMTP id m26mr30382871pgl.270.1567526750106; Tue, 03 Sep 2019 09:05:50 -0700 (PDT) Received: from localhost.localdomain.localdomain ([2408:823c:c11:160:b8c3:8577:bf2f:3]) by smtp.gmail.com with ESMTPSA id t11sm18501567pgb.33.2019.09.03.09.05.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 09:05:49 -0700 (PDT) From: Pengfei Li To: akpm@linux-foundation.org Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pengfei Li Subject: [PATCH 2/5] mm, slab_common: Remove unused kmalloc_cache_name() Date: Wed, 4 Sep 2019 00:04:27 +0800 Message-Id: <20190903160430.1368-3-lpf.vector@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190903160430.1368-1-lpf.vector@gmail.com> References: <20190903160430.1368-1-lpf.vector@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the name of kmalloc can be obtained from kmalloc_info[], remove the kmalloc_cache_name() that is no longer used. Signed-off-by: Pengfei Li --- mm/slab_common.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/mm/slab_common.c b/mm/slab_common.c index 7bd88cc09987..002e16673581 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1191,21 +1191,6 @@ void __init setup_kmalloc_cache_index_table(void) } } -static const char * -kmalloc_cache_name(const char *prefix, unsigned int size) -{ - - static const char units[3] = "\0kM"; - int idx = 0; - - while (size >= 1024 && (size % 1024 == 0)) { - size /= 1024; - idx++; - } - - return kasprintf(GFP_NOWAIT, "%s-%u%c", prefix, size, units[idx]); -} - static void __init new_kmalloc_cache(int idx, int type, slab_flags_t flags) { -- 2.21.0