Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp278601ybt; Wed, 17 Jun 2020 00:15:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjlXmdfZmkz1IST8My+IOj0KB/Ofcd/82oxYjbUh6n73bi4uv1nD3LMmdlvGe0UbcejRJy X-Received: by 2002:a17:906:6a0a:: with SMTP id o10mr6235122ejr.192.1592378132789; Wed, 17 Jun 2020 00:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592378132; cv=none; d=google.com; s=arc-20160816; b=gMk7o0HFUoySK0D1e7dfEMOqqopRvKEc21mDIdibY+2VtNcetaUBuZAJXrJdknfmAn 2/Zrq9VCJMP8hFvnE+SziScv/B/qGjAP0f64BnBVpO0zh2R4IkByplXZJewg74+7z9QR zeXo9W/7dcjElI4ZBd+FlD6JLhSJpDyWiBBS9M47sfIu5oDwhY13MyATccHZPBqBQOQR AQ/L9d2VGVLR7bbfUaD3SoaAf1GHtlG6tE+IZsXFbLbLc/q9r7hYDmLO9GVaZObTun+y QBmrMzRLU+79g9m0WClYO94LRgSr43Hdqw7guqGFKBZ82W92XmMEbiifPesXjDqGqCPh 7BiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=KgSloNZbqZ04vGOnHmlFAyoa4obhbJvubzeUtuPEPp4=; b=gKQxzRYxT15iQW7oNAtoDk9g40fnRYcqSXpnkW6kMSQ+oxa3Z5jnNDiGDAdl0an5jT O+3ssxBJCOb3O4AoehxMTufjqnExAlA9sf3MBogNU8XUkucZvBN3m+4bdqfcPU8mn/+/ vOVlQgyeFwwMDXhcJIWpdP318fB93d+oAcO5QViXPVU8T4jGgP2fQe4EehppldXC+Dve 50ZmtUlDcARfdjjjkeumPMxOzJl/4ccTE4QFPCWL/7JoW3WtVJ0ECLy2aUKNt33PxJh1 o0ZdaTxieKMLo8b+Ai0iNJPYZ/qD14voU6QaB+0I9BJd4VpyCxflu9L6gtnJFqeyT3ln RFIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si12450742ejm.315.2020.06.17.00.15.10; Wed, 17 Jun 2020 00:15:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726496AbgFQHNZ (ORCPT + 99 others); Wed, 17 Jun 2020 03:13:25 -0400 Received: from mxhk.zte.com.cn ([63.217.80.70]:34294 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725536AbgFQHNY (ORCPT ); Wed, 17 Jun 2020 03:13:24 -0400 Received: from mse-fl2.zte.com.cn (unknown [10.30.14.239]) by Forcepoint Email with ESMTPS id 86EBB8D48A63CAD36D11; Wed, 17 Jun 2020 15:13:22 +0800 (CST) Received: from notes_smtp.zte.com.cn (notes_smtp.zte.com.cn [10.30.1.239]) by mse-fl2.zte.com.cn with ESMTP id 05H7DK4g028206; Wed, 17 Jun 2020 15:13:20 +0800 (GMT-8) (envelope-from wang.yi59@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2020061715134070-3975772 ; Wed, 17 Jun 2020 15:13:40 +0800 From: Yi Wang To: cl@linux.com Cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn, wang.yi59@zte.com.cn, wang.liang82@zte.com.cn, Liao Pingfang Subject: [PATCH] mm, slab: Use kmem_cache_zalloc() instead of kmem_cache_alloc() with flag GFP_ZERO. Date: Wed, 17 Jun 2020 15:15:56 +0800 Message-Id: <1592378156-7748-1-git-send-email-wang.yi59@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2020-06-17 15:13:41, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2020-06-17 15:13:23, Serialize complete at 2020-06-17 15:13:23 X-MAIL: mse-fl2.zte.com.cn 05H7DK4g028206 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Liao Pingfang Use kmem_cache_zalloc instead of manually calling kmem_cache_alloc with flag GFP_ZERO. Signed-off-by: Liao Pingfang --- include/linux/slab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/slab.h b/include/linux/slab.h index 6d45488..1fa62d9 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -656,7 +656,7 @@ extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, unsigned long); */ static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags) { - return kmem_cache_alloc(k, flags | __GFP_ZERO); + return kmem_cache_zalloc(k, flags); } /** -- 2.9.5