From patchwork Mon Jan 30 20:49:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 50468 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2390583wrn; Mon, 30 Jan 2023 12:53:09 -0800 (PST) X-Google-Smtp-Source: AK7set9JxXF09StHLo1LHFCAcmFvdtZN4Hlui0ya3js4DHEeUv+hKesHaaMsGXnN/levQzNWe1dR X-Received: by 2002:a17:906:4fd5:b0:889:5ca0:1470 with SMTP id i21-20020a1709064fd500b008895ca01470mr1049849ejw.69.1675111989668; Mon, 30 Jan 2023 12:53:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675111989; cv=none; d=google.com; s=arc-20160816; b=xjDuM/ovxjYc7FF2L8YnuXg0mtPdKIYx27sVcSlUU8DogNnNrXu8wK1zo9VK0zKign DqqhSmSYOLDycmCBigJNYpbZ70KicZKqowji1b2CotpFOD7IYV4U3IKwHtKq9BvS7Qf9 8z/Cak7GowxznvgAcUBJDLUDih8xbwGqA5zm/Q11zLspohlWmx5yhtwoR6j6JEkxhmou HZz792gDiiVMX7iinL9goXCtENXKtCNcN09xZ2QJFI+dlSVIhosCcUZBB/NDLX4uIjbk jp0k4RZ70MSL7jvgoXYW6PfG5lRqzIwXZksk+whdWCwxBFEaoSrlKgfrg2Rkr00g1CrH UMrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=57d540mJERXvBQP3H394VQ1KkYAn0jgbzOXp+cklDfk=; b=lzd+tdOh+RrtQeRshgO3da8DChK9od+k/i25m878IPtO13D4Zwd97yag4ngvDwj9cx gzID5glCWnB2vH79/SDrYhkmpC4p+oImKyOHnYQwWVsaXzgSMHlpANRTQmrWWfsXAcjG MnRLyNC2IiNIsFMZvHQPod5UFRVDZ+9Y5GSB6hYU4b6xJUkt3esWYtfHG1jXYw+1Kou7 XAPKyRgd7ey8UiaQ+LWhoTASLtOE7gMaP+s688UpMTDqGO1WsMP6/sodQzEs+fuNqNue Aqruwdmy4jEucKc/8JIcg9O4OLuLPvFORY6a+LkyCSmkYXNwu/Y27DYK+aAMJs9U2XlA 49Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tFaC4h3n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gc29-20020a1709072b1d00b00885e13adf87si6061710ejc.929.2023.01.30.12.52.46; Mon, 30 Jan 2023 12:53:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tFaC4h3n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230051AbjA3UvL (ORCPT + 99 others); Mon, 30 Jan 2023 15:51:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbjA3Uu5 (ORCPT ); Mon, 30 Jan 2023 15:50:57 -0500 Received: from out-123.mta0.migadu.com (out-123.mta0.migadu.com [IPv6:2001:41d0:1004:224b::7b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 916272B0A5 for ; Mon, 30 Jan 2023 12:50:56 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1675111853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=57d540mJERXvBQP3H394VQ1KkYAn0jgbzOXp+cklDfk=; b=tFaC4h3ny4KHK6KzVpTLfphtX0wgv6hr2F1IlbR9lxqmNdFBdXy03CvsRXm9O6MKj4NsAn CTqvr8DlBi/FIBP/httW9sIeE7tRDO0I9xlzY7K90zPiYCGkwIi2vq/DRFu1UdbXz8pOf4 xyLsJWVX1RFdwNDIWgGGCX387z78BgY= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH 10/18] lib/stackdepot: rename init_stack_slab Date: Mon, 30 Jan 2023 21:49:34 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756482229304365275?= X-GMAIL-MSGID: =?utf-8?q?1756482229304365275?= From: Andrey Konovalov Rename init_stack_slab to depot_init_slab to align the name with depot_alloc_stack. No functional changes. Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko --- lib/stackdepot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index cddcf029e307..69b9316b0d4b 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -220,7 +220,7 @@ int stack_depot_init(void) } EXPORT_SYMBOL_GPL(stack_depot_init); -static bool init_stack_slab(void **prealloc) +static bool depot_init_slab(void **prealloc) { if (!*prealloc) return false; @@ -268,12 +268,12 @@ depot_alloc_stack(unsigned long *entries, int size, u32 hash, void **prealloc) /* * smp_store_release() here pairs with smp_load_acquire() from * |next_slab_inited| in stack_depot_save() and - * init_stack_slab(). + * depot_init_slab(). */ if (depot_index + 1 < STACK_ALLOC_MAX_SLABS) smp_store_release(&next_slab_inited, 0); } - init_stack_slab(prealloc); + depot_init_slab(prealloc); if (stack_slabs[depot_index] == NULL) return NULL; @@ -402,7 +402,7 @@ depot_stack_handle_t __stack_depot_save(unsigned long *entries, * lock. * * The smp_load_acquire() here pairs with smp_store_release() to - * |next_slab_inited| in depot_alloc_stack() and init_stack_slab(). + * |next_slab_inited| in depot_alloc_stack() and depot_init_slab(). */ if (unlikely(can_alloc && !smp_load_acquire(&next_slab_inited))) { /* @@ -438,7 +438,7 @@ depot_stack_handle_t __stack_depot_save(unsigned long *entries, * We didn't need to store this stack trace, but let's keep * the preallocated memory for the future. */ - WARN_ON(!init_stack_slab(&prealloc)); + WARN_ON(!depot_init_slab(&prealloc)); } raw_spin_unlock_irqrestore(&depot_lock, flags);