From patchwork Fri Nov 5 20:35:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12605403 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADCC1C433FE for ; Fri, 5 Nov 2021 20:35:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6666C611EE for ; Fri, 5 Nov 2021 20:35:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6666C611EE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id F39C5940015; Fri, 5 Nov 2021 16:35:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EC079940007; Fri, 5 Nov 2021 16:35:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DD7E0940015; Fri, 5 Nov 2021 16:35:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id C8F86940007 for ; Fri, 5 Nov 2021 16:35:38 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8394718523518 for ; Fri, 5 Nov 2021 20:35:38 +0000 (UTC) X-FDA: 78776032356.28.FFBD264 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf03.hostedemail.com (Postfix) with ESMTP id 5E3EC30000B2 for ; Fri, 5 Nov 2021 20:35:31 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 0434561252; Fri, 5 Nov 2021 20:35:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1636144537; bh=+7UKRVqmEaOgoDhdjdGy+rjCLEa9T0ZjVP5xXx9RZW8=; h=Date:From:To:Subject:In-Reply-To:From; b=muLXTV2y+UG2iY78yME2yAXMk3GrnhRaq6tGbHHdpZJ7W56/L/bAaBVJtjScgTfbU HeTN9CbxoFikxH0AMig1xxTNx8PoTaOIEtlF2Lq2sILHl83V00bVCC5IzJrd+GNR8C 2qbAtD7/7+b+qPaAqeTGp5MxTlRrtIQp+v8vCdTA= Date: Fri, 05 Nov 2021 13:35:36 -0700 From: Andrew Morton To: akpm@linux-foundation.org, andreyknvl@gmail.com, bigeasy@linutronix.de, dvyukov@google.com, elver@google.com, glider@google.com, gustavoars@kernel.org, jiangshanlai@gmail.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, ryabinin.a.a@gmail.com, skhan@linuxfoundation.org, tarasmadan@google.com, tglx@linutronix.de, tj@kernel.org, torvalds@linux-foundation.org, vinmenon@codeaurora.org, vjitta@codeaurora.org, walter-zh.wu@mediatek.com Subject: [patch 020/262] lib/stackdepot: remove unused function argument Message-ID: <20211105203536.z6Oj6ZDrj%akpm@linux-foundation.org> In-Reply-To: <20211105133408.cccbb98b71a77d5e8430aba1@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 5E3EC30000B2 X-Stat-Signature: y5pp9did8kwjcuuz3y9ihrrcdknws36f Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=muLXTV2y; dmarc=none; spf=pass (imf03.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1636144531-614123 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Marco Elver Subject: lib/stackdepot: remove unused function argument alloc_flags in depot_alloc_stack() is no longer used; remove it. Link: https://lkml.kernel.org/r/20210913112609.2651084-3-elver@google.com Signed-off-by: Marco Elver Tested-by: Shuah Khan Acked-by: Sebastian Andrzej Siewior Reviewed-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: "Gustavo A. R. Silva" Cc: Lai Jiangshan Cc: Taras Madan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vijayanand Jitta Cc: Vinayak Menon Cc: Walter Wu Signed-off-by: Andrew Morton --- lib/stackdepot.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- a/lib/stackdepot.c~lib-stackdepot-remove-unused-function-argument +++ a/lib/stackdepot.c @@ -102,8 +102,8 @@ static bool init_stack_slab(void **preal } /* Allocation of a new stack in raw storage */ -static struct stack_record *depot_alloc_stack(unsigned long *entries, int size, - u32 hash, void **prealloc, gfp_t alloc_flags) +static struct stack_record * +depot_alloc_stack(unsigned long *entries, int size, u32 hash, void **prealloc) { struct stack_record *stack; size_t required_size = struct_size(stack, entries, size); @@ -309,9 +309,8 @@ depot_stack_handle_t stack_depot_save(un found = find_stack(*bucket, entries, nr_entries, hash); if (!found) { - struct stack_record *new = - depot_alloc_stack(entries, nr_entries, - hash, &prealloc, alloc_flags); + struct stack_record *new = depot_alloc_stack(entries, nr_entries, hash, &prealloc); + if (new) { new->next = *bucket; /*