Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp823960ybn; Tue, 24 Sep 2019 10:03:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5WDYLoxso3ohbmZllMHFX0ynJw031umqwD0TVHKEuHyz5pDLUUO6PeitZ4HNit6FlFpCO X-Received: by 2002:a2e:5b9a:: with SMTP id m26mr2631254lje.90.1569344617623; Tue, 24 Sep 2019 10:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569344617; cv=none; d=google.com; s=arc-20160816; b=xp++BEXtYxBA+N1PlMTmVdUfaitivA4c8doPJZDUFvht3P6LNSnYLqnb+ioGwZG/Pi nSDugDnpYJaMuWxruWag+Ub1EVjajCh1+n9zFJp36qr9UGbREN4s1Gac6RAnTbDCFQYA l7CJs4GS1zlqrfMX0IJ3rjRpGYQWSUISsPYdghvTXSW37ZGMb0ESXWWrHMhJMWqz1hoD 5p+28XNqiaSa9pK1AlGew4YD5wJzB7f4CO9IMbydAgO3Oj8ytBB+Lvnwy0xVRP4UWVvB eERySjDfvicNvMvD2G0yEwQ2FawLahRn6b4JZYPqP3DRemrk9/SnK7J3usADflszpbIR HwrA== 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:dkim-signature; bh=03so5hEuCjEkXpyCihuO2zHclFe8bmVrBB9FSkG22OM=; b=o9Gk6sQ00yLwHTqf4674woB/lNhwZbaDvbuZgYNK4/o4xu9/1PMwDEfPcWdGs0ITV6 v8bacUbKTyBOqD2z22I8YuqGrh6OGkGemtE24UGbK2kcXlQF4x24KhqavWVGJbu7hwa7 qGanEySBvm+tYq2inhoFLRKlq9n4zxXJ6wVgX2WfRl9ZSDKMmnwSURg5EXfP5vQEfWXa BFpYIBimZHta/SEvCbnfBZfSJqddCoD+LgPi8/eNQRqkZQIKhySiOBjGDYNzpAn43f+H fD4/QfxwMPa0XycH3LY8p2SEnkh3/cLpaZbDwpD1KGkeSn5HrJ+hoZrV64Zlz1VUK/3Z gVaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RIBpICZ4; 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 ng7si1269672ejb.91.2019.09.24.10.03.14; Tue, 24 Sep 2019 10:03:37 -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=RIBpICZ4; 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 S2439241AbfIWM2F (ORCPT + 99 others); Mon, 23 Sep 2019 08:28:05 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33335 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730038AbfIWM2F (ORCPT ); Mon, 23 Sep 2019 08:28:05 -0400 Received: by mail-pf1-f193.google.com with SMTP id q10so9080006pfl.0 for ; Mon, 23 Sep 2019 05:28:04 -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; bh=03so5hEuCjEkXpyCihuO2zHclFe8bmVrBB9FSkG22OM=; b=RIBpICZ4WLYndiQAE/IeijNc44sypCjrVq2F/rtq1yhPQ9NZdaMvkepKWSx9IP+RCB VFgjBp41CN+U9SOM0z6zKmt2QD22vjncJ7DcgkvzjrIgKLGWiZ59TOV1pmvXTajfB2v+ 8C2m5MIcepSUwgIgo7UOpat5TfvNTXJl9BJ97PPautknwyPRVnE4s8WlOoCX0IJR3z3D ddQ1fA7SpVR5TSO8ISPsNqvbkry3cG0OgZXgfIWc8JwnbZv9lyjwJX2mDvCwagFQnnJG 0dD0vLABMjcW5GMPo584H81m68SLOdI28aHSQutaU3ff5sNvLQm9oqfjutjX/U52RiZX OYqg== 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=03so5hEuCjEkXpyCihuO2zHclFe8bmVrBB9FSkG22OM=; b=QB4XHQvye5r1IW/uDZQUV+yJDcC6g14+oNE7fRMWI1YYLXcrfxu8bi0SfxaUeux+7/ svwERoYzXQj7vKOT2btiZPEKbaK6VUj/o7B9sF6BA8KYDzELAwW9gHU6sQPA5aFWDdI/ 0Iw0RQ0ZXaXz27NzQdulPjh8CDwHrzhZw0A92QS2SEyuE8CeKsLEHbdYCpR4W28UrfAK s6gGlcQ5lEKiy2qz/mYyTieAU1hVav6PER2xc4tl9kyfzbKpL+iJn50v48CZ1Evd053c s7mVIK+YBs/P7aJ+NmsitX9VNTc66QH7mPvyP2XoxPnAfA7iZkqLe0YodIKH059BEJVz r/Lw== X-Gm-Message-State: APjAAAV6/MBObzvaadubRhvZK9Jq8/t5+erjn1w1ye2FUaE0WlAbswm7 G7D1pVkNeFrLvYyYV6BmCfA= X-Received: by 2002:a63:504b:: with SMTP id q11mr28835160pgl.188.1569241684556; Mon, 23 Sep 2019 05:28:04 -0700 (PDT) Received: from mi-OptiPlex-7050.mioffice.cn ([43.224.245.180]) by smtp.gmail.com with ESMTPSA id 202sm9692016pfu.161.2019.09.23.05.28.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Sep 2019 05:28:04 -0700 (PDT) From: Pengfei Li To: akpm@linux-foundation.org Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, vbabka@suse.cz, guro@fb.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pengfei Li Subject: [PATCH v6 3/3] mm, slab_common: Use enum kmalloc_cache_type to iterate over kmalloc caches Date: Mon, 23 Sep 2019 20:27:28 +0800 Message-Id: <1569241648-26908-4-git-send-email-lpf.vector@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1569241648-26908-1-git-send-email-lpf.vector@gmail.com> References: <1569241648-26908-1-git-send-email-lpf.vector@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The type of local variable *type* of new_kmalloc_cache() should be enum kmalloc_cache_type instead of int, so correct it. Signed-off-by: Pengfei Li Acked-by: Vlastimil Babka Acked-by: Roman Gushchin Acked-by: David Rientjes --- mm/slab_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/slab_common.c b/mm/slab_common.c index df030cf..23054b8 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1192,7 +1192,7 @@ void __init setup_kmalloc_cache_index_table(void) } static void __init -new_kmalloc_cache(int idx, int type, slab_flags_t flags) +new_kmalloc_cache(int idx, enum kmalloc_cache_type type, slab_flags_t flags) { if (type == KMALLOC_RECLAIM) flags |= SLAB_RECLAIM_ACCOUNT; @@ -1210,7 +1210,8 @@ new_kmalloc_cache(int idx, int type, slab_flags_t flags) */ void __init create_kmalloc_caches(slab_flags_t flags) { - int i, type; + int i; + enum kmalloc_cache_type type; for (type = KMALLOC_NORMAL; type <= KMALLOC_RECLAIM; type++) { for (i = KMALLOC_SHIFT_LOW; i <= KMALLOC_SHIFT_HIGH; i++) { -- 2.7.4