Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4558565ybe; Mon, 16 Sep 2019 14:26:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8cwraYlXbN3ds3W2WRA0iCnGYzoMff3hIUS4/zVPNf/6Iwb/bB1qqQVHHMEzBoOe5iMZr X-Received: by 2002:a50:91d0:: with SMTP id h16mr1495553eda.152.1568669187419; Mon, 16 Sep 2019 14:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568669187; cv=none; d=google.com; s=arc-20160816; b=bUBg3zP5PCkHDYcue7KCFFlCAkMv5eHa9zTbpyM1z6LzQ8QNU3zjlraPfuwl//7eBd CO0cdkSVpcFeptEempMwZdxG7mBnvM3rivg75kBaz8pBZkeVLgPCpzIG7RZqqlI2ZVGE VjQgAdSS3E0BtEkmpNANHIPxb5BmZ3rSI9qf7HkWswS6N7C5kCRAgnxUpwzGi18zWFEi dUZbYbI8Wczvx35TM/ADXqEjkpaUEcLtTmE6Osu/dHt/bhiPAo0sR0P3t4t8tNtxc9ta +NJ4zFyOTRJDuuJnFcPAw1d1KO1SJmX6ZPpX+JIN6bjyv3/PcL5SIYijRM0rKRdKhv9/ vUsw== 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=jCVsoiANbO0A0rAsPONqC8CmNnKvwITi8BzVSSbb6XQ=; b=f1gVmG5e52Xrm45y64pRPGbWhoxsu0p8hakbxEg3aJw7SaPxpRn1RLqnm8dj2ltNxW ObMyNq/KKQxw5XOJ8RgLWWfgNNBN7Qz7K1gWfrCtdaAr3hW8eGnGH9dF3ytNjgbQjrgl lmQlpoHEhhVPXcXbzzY50grFAL/XpAt01a19/rsqJ6hbhKyAd+OrtaXEA/z/6uXNRH34 eQNpgV0FOp8MAQZcd0mL/xDY9PgC5H5h1OAWjPnEAEg15kFSkqcXaaIdckz8KIqapuSD Auq1wrqh3/1C6OxWtFSgi5gPnaaJPo2NgQHPiY84DSoJmNyNjo1VZ1wqkKxR0+cfqjNZ Fteg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l0IZ2qlW; 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 g24si67334ejo.355.2019.09.16.14.26.01; Mon, 16 Sep 2019 14:26:27 -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=l0IZ2qlW; 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 S1732540AbfIPOqz (ORCPT + 99 others); Mon, 16 Sep 2019 10:46:55 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45957 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732374AbfIPOqy (ORCPT ); Mon, 16 Sep 2019 10:46:54 -0400 Received: by mail-pf1-f196.google.com with SMTP id y72so10087pfb.12 for ; Mon, 16 Sep 2019 07:46:54 -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=jCVsoiANbO0A0rAsPONqC8CmNnKvwITi8BzVSSbb6XQ=; b=l0IZ2qlWNiFhcK1qlGvKwC1wuMV95H42NFba70/jxZptHT9Rbemzw5VlpIuap1kS+d BX18/2l1ApbcJoKmv7zOkvQWoHljxRBunQDUfccRw5l0+ZqMcxOpjERJlc9byEy5VUuq MWOBQ0M7hMpOYmGcR2h8EG7yBUrQq0nQg6fHWj+QbiUV5M0fE6m3/t+dKCJuaMg/9k2r bqJTJSajXVA6+5QTIUssK8713gmQXTyFyEr7269syveyZwN1RGjO9pj6xW/eYT+/OpxV hGVhx+/ZSgzb+S+Qm6Gvj8RJ/X5TPS6XSU4KeA2bI8MZOvJw62IsUUx1+lSiKCDVfpTG 5F8A== 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=jCVsoiANbO0A0rAsPONqC8CmNnKvwITi8BzVSSbb6XQ=; b=IqTz7TxQLMNdVGTgcITTxUwaHaOvDN1syLZ0om1VeM1uzIDbCBIIyTaNUpXOR0tR4o BosxNmIbmFpw1aNol69fhDjxeHZkxDu7Wv0T7FOdzny08sGqATvaiUUw+8S1aR8RDiIA ccmAcwssCnIXbvRjmZdHV189esUXmrfxsKz3J7uOV5ne1i/LLOVRfsHb4306zZo/1os0 zqp4K8RVH80yknEgM75EVNamzoNUTVaQ54ezfn8gHAu8bsfwvQZ9LqAx5ipEI7LxSSRV t55ms3l3g4HSeSshHhYRmEHYLG+6b/TlduzTdsxKjKXYXC9ehTMo3wg/Oo9EKT7tfaj4 DinQ== X-Gm-Message-State: APjAAAUYSnfa+e7e7nXY3KWwZiPAyePm17D5mDPjpnPGo8OsYtGaRs+w OpUHmdMoes496VMU0afkKl0= X-Received: by 2002:a17:90a:ca0e:: with SMTP id x14mr108909pjt.70.1568645214399; Mon, 16 Sep 2019 07:46:54 -0700 (PDT) Received: from localhost.localdomain.localdomain ([2408:823c:c11:160:b8c3:8577:bf2f:3]) by smtp.gmail.com with ESMTPSA id d190sm15036004pgc.25.2019.09.16.07.46.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 07:46:53 -0700 (PDT) From: Pengfei Li To: akpm@linux-foundation.org Cc: vbabka@suse.cz, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, guro@fb.com, Pengfei Li Subject: [PATCH v5 3/7] mm, slab_common: Use enum kmalloc_cache_type to iterate over kmalloc caches Date: Mon, 16 Sep 2019 22:45:54 +0800 Message-Id: <20190916144558.27282-4-lpf.vector@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190916144558.27282-1-lpf.vector@gmail.com> References: <20190916144558.27282-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 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 df030cf9f44f..23054b8b75b6 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.21.0