From patchwork Mon Sep 13 11:26:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Elver X-Patchwork-Id: 12488577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-26.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B1B6C433F5 for ; Mon, 13 Sep 2021 11:26:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9DCDD60ED8 for ; Mon, 13 Sep 2021 11:26:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9DCDD60ED8 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 4382E6B0073; Mon, 13 Sep 2021 07:26:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C11A6B0074; Mon, 13 Sep 2021 07:26:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2B233900002; Mon, 13 Sep 2021 07:26:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0004.hostedemail.com [216.40.44.4]) by kanga.kvack.org (Postfix) with ESMTP id 1E46B6B0073 for ; Mon, 13 Sep 2021 07:26:33 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E2D078249980 for ; Mon, 13 Sep 2021 11:26:32 +0000 (UTC) X-FDA: 78582322224.15.477881C Received: from mail-qk1-f202.google.com (mail-qk1-f202.google.com [209.85.222.202]) by imf25.hostedemail.com (Postfix) with ESMTP id 98541B000185 for ; Mon, 13 Sep 2021 11:26:32 +0000 (UTC) Received: by mail-qk1-f202.google.com with SMTP id v21-20020a05620a0a9500b003d5c1e2f277so40514486qkg.13 for ; Mon, 13 Sep 2021 04:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=heQI9hJRYZNN0F3wqdwBsNM0iszmJ1+UNOx43ei/BCA=; b=i2hbw8Fe7sVHU566q0FLXy62ugeDqkJJyt5CZ0CRDVVlErfT6R2EnyiQMD2UU2/8b0 ScsIl8ZafYdGmTDU17WrkZjAdWMBTxCG84VNlB90cTj1wPLvAbpdRu5MzsQCort61cMg 62WdBVzIcnTrZR5wU6SLRHuQPFSjZNCt/uUuQfyR84h4tq6uZoRPBXGeR6Bt69NhJd/8 nn7Kd4Bl1ctKe69OVC4+J5P9F+lHpQcq2TthmzMBZKOs7YMXnuXxKLh2KJ/WGDKyXb/C eMBlk2cF39wbq6Z8BALvgLIF4+TBDj+vD93yBLW4fvWl0PLVrsDqhQhFeBcpTMwHL6lg PW1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=heQI9hJRYZNN0F3wqdwBsNM0iszmJ1+UNOx43ei/BCA=; b=HWJcCFmvd/a03LXH49weX+kH7LZjSwdoxTOjyrRyEDYxEvg1wJ8WPlSYaipgkY4i4u Z62HCxbXQh3tS42uN5Gok3wwpm/VwjO0A5DyruuuyXAtha0ETiasWEQ+r7vVOKabrINa lKiIRPagUlQSZQKbQm74xI24YqN05md1QjC6g2VJ7J7Qu1VNrDN+T18d4bMizMxkGZx0 K9yDERCDXyA83l52UtHWO3HADYWDVUVxgt362xDn6qHVhW+pSxmC11XLm5MB9kRIWgt3 O6LNC4fm7zJMYRPCXpfdUf1zbRaV2BC1AeMvEbWXbfWGIyr3utAi3n+xnJUPsloXosmP tGjw== X-Gm-Message-State: AOAM533EjBVdo7EI8ymE6qvuK+CoicVD8ZaNk/Csg96damaQqcafa1QC PBUSDHRPCezdNchuAcsclWIFdxbYlA== X-Google-Smtp-Source: ABdhPJyW/EhPrZl53ptstiIf3nFkaM5zOt+a6HCqqc/9uUTbLofGIrfJ/QCoYU1DvLk95ohhAm6quwmfXQ== X-Received: from elver.muc.corp.google.com ([2a00:79e0:15:13:1f19:d46:38c8:7e48]) (user=elver job=sendgmr) by 2002:a05:6214:250f:: with SMTP id gf15mr10095078qvb.2.1631532391965; Mon, 13 Sep 2021 04:26:31 -0700 (PDT) Date: Mon, 13 Sep 2021 13:26:05 +0200 In-Reply-To: <20210913112609.2651084-1-elver@google.com> Message-Id: <20210913112609.2651084-3-elver@google.com> Mime-Version: 1.0 References: <20210913112609.2651084-1-elver@google.com> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog Subject: [PATCH v2 2/6] lib/stackdepot: remove unused function argument From: Marco Elver To: elver@google.com, Andrew Morton Cc: Shuah Khan , Tejun Heo , Lai Jiangshan , Andrey Konovalov , Walter Wu , Sebastian Andrzej Siewior , Thomas Gleixner , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Vijayanand Jitta , Vinayak Menon , "Gustavo A. R. Silva" , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Aleksandr Nogikh , Taras Madan Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=i2hbw8Fe; spf=pass (imf25.hostedemail.com: domain of 3ZzU_YQUKCN4ELVERGOOGLE.COMLINUX-MMKVACK.ORG@flex--elver.bounces.google.com designates 209.85.222.202 as permitted sender) smtp.mailfrom=3ZzU_YQUKCN4ELVERGOOGLE.COMLINUX-MMKVACK.ORG@flex--elver.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 98541B000185 X-Stat-Signature: 345scb9g7yawm5semyfqcjoh4xhs5pqi X-HE-Tag: 1631532392-835133 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: alloc_flags in depot_alloc_stack() is no longer used; remove it. Signed-off-by: Marco Elver Tested-by: Shuah Khan Acked-by: Sebastian Andrzej Siewior --- lib/stackdepot.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index 0a2e417f83cb..c80a9f734253 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -102,8 +102,8 @@ static bool init_stack_slab(void **prealloc) } /* 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(unsigned long *entries, 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; /*