From patchwork Tue Sep 7 14:13:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Elver X-Patchwork-Id: 12478819 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.3 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, 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 2E33BC433EF for ; Tue, 7 Sep 2021 14:14:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C376D61101 for ; Tue, 7 Sep 2021 14:14:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C376D61101 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 54718940008; Tue, 7 Sep 2021 10:14:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4F4F8940007; Tue, 7 Sep 2021 10:14:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40B1C940008; Tue, 7 Sep 2021 10:14:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id 2D021940007 for ; Tue, 7 Sep 2021 10:14:07 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D010A181B0493 for ; Tue, 7 Sep 2021 14:14:06 +0000 (UTC) X-FDA: 78560971692.26.F679DC3 Received: from mail-qk1-f201.google.com (mail-qk1-f201.google.com [209.85.222.201]) by imf12.hostedemail.com (Postfix) with ESMTP id 94E5810000A3 for ; Tue, 7 Sep 2021 14:14:06 +0000 (UTC) Received: by mail-qk1-f201.google.com with SMTP id e22-20020a05620a209600b003d5ff97bff7so14665223qka.1 for ; Tue, 07 Sep 2021 07:14:06 -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=N/5YJhYADcqy8sBs5vH/zCaS3u8GV2W+ZzJdQ0X+ILI=; b=LRISar8+QTrl1Cr1oyWe4vLdGfZUfkMlRlMDd/NK0Kmk7Y/DRBslXQaQ0X7mSxUXmi wm531M1XS426nqxMn1W8GRMqNBjylH38g87qY5EpxICYsHkCs5qHSUKERzjptpi6719j /H4m3kZq8l2uvNx0QnqHX3MM5QXCLSysyxGeMIbtYrxq/s1FGDvWMfmDgG9F/ec3c3xj idHtizK63LEw5945mpWMf49WMrAuJykA23g6B0zm+xUHYrMwrU9WiHBpfUfzb2yEvcES 922lt7ECnXTIRcMYgYMWsz6BweWTWVC1fORFAVsMLnaSefXxhf96MSDLdFD0jEgeaOy2 4+QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=N/5YJhYADcqy8sBs5vH/zCaS3u8GV2W+ZzJdQ0X+ILI=; b=KE1h2ldioA+aL4mK30iunwvwl7N9rsNIsXJ1pimYkRA6Q5d0vP4hgm7QFKp+HEfR4d 0oy5/1VFd0KsjXHeKAKX98b+RxpJDIC5pyApriyXZ5VDhVE8fyj0vRoiRP7GP0rDuFyH y2Liax/L5BNsos1m4eOflMg1MAao59lvCvTX7dQ4J6j81jVRiqXn1RW1ij6ymYKjphMQ cp5KdG2wOAZrpNT8d4ueUJxDl0SREgmNZFta79S15C6fKlyf3y9MBccjFGY9JsvoY6hq ijEir2LXbYgZ6lIkVHqJSpkYep5kt/daQpBUKknNwcMydWDtu8/3+SKRPFXMn54nTrrG yD9w== X-Gm-Message-State: AOAM531p1diZMCPfe+mhYEND+zyIvVU10aqo2kbkTqORWAXFfdGiIlR0 8/yH8czVsT8yGjZKgiC53O8I0SceQA== X-Google-Smtp-Source: ABdhPJyR8jDVjdhyUz93LlcEeykwrpaVXBAWFlVsgNr0Lvtqc/eGJKRewlggnz5eecPqJQAot9SMUph8Aw== X-Received: from elver.muc.corp.google.com ([2a00:79e0:15:13:6800:c1ea:4271:5898]) (user=elver job=sendgmr) by 2002:a0c:be85:: with SMTP id n5mr17013941qvi.59.1631024045883; Tue, 07 Sep 2021 07:14:05 -0700 (PDT) Date: Tue, 7 Sep 2021 16:13:03 +0200 In-Reply-To: <20210907141307.1437816-1-elver@google.com> Message-Id: <20210907141307.1437816-3-elver@google.com> Mime-Version: 1.0 References: <20210907141307.1437816-1-elver@google.com> X-Mailer: git-send-email 2.33.0.153.gba50c8fa24-goog Subject: [PATCH 2/6] lib/stackdepot: remove unused function argument From: Marco Elver To: elver@google.com Cc: Andrew Morton , Shuah Khan , Tejun Heo , Lai Jiangshan , Andrey Konovalov , Walter Wu , 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: imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=LRISar8+; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf12.hostedemail.com: domain of 3rXM3YQUKCIIkr1kxmuumrk.iusrot03-ssq1giq.uxm@flex--elver.bounces.google.com designates 209.85.222.201 as permitted sender) smtp.mailfrom=3rXM3YQUKCIIkr1kxmuumrk.iusrot03-ssq1giq.uxm@flex--elver.bounces.google.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 94E5810000A3 X-Stat-Signature: om6bbzrsw99e1esx4fretn3gauhxiqpe X-HE-Tag: 1631024046-1495 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 Reviewed-by: Alexander Potapenko --- 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; /*