Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp685480pxr; Mon, 11 Apr 2022 04:44:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzP8alrRu/GFKMxCtHndpRpZ2I8JoK4LM4Y1kLhPmpwqLCN/NswHEHWUa1XfyfjHxrll+xU X-Received: by 2002:a05:6a00:1943:b0:4cb:79c9:fa48 with SMTP id s3-20020a056a00194300b004cb79c9fa48mr32024900pfk.47.1649677471822; Mon, 11 Apr 2022 04:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649677471; cv=none; d=google.com; s=arc-20160816; b=IBeVGh/Y/wS6dSwJflwYZaZWFjaZDy//UPWJpPD1B3HsDU5ReVVBtRGgi96wQVFIFA m1WfKUND7BHAHTCOcVBqVXXsGFxLA0DT5wDuP8X5OlJWNBv9lNoahPmCyENsnEECsCiC j5eH7erFEyB3JwJ6G/SwjudNtgDo2jtNyuwbYqWjYdlh7UzErp4XY79d1fLKs3C78ZNx +aTx50LsHI3vhli1EWEYQGWvuZLyPgZ6QSVkG6eXtUPFxzsNkg+tVNtVNzCTYlvdpSRL 6NGse7BcOVN5AwKFoCJ95BAG+UjDELB6PhFbYhud4ayN21WItS1s0nXlnYjxd+1FeN0X E8RA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Lp811Xhpus0vpIQXccI+kJ+HvSPttYJotJ9EUMN/yrw=; b=KjMg1whMbDSpmBw6VU1MCMAdtoGeF0vAvoZFztNtTaiGmu11+vP0HKvgx7VPDU5sth pMnJAyqjretZiY+A/HTbDU1wBLHvFU/+znMJWBH13m/Wowc5D3Y3wGh5WwtMjNiNa28g +hTnH6V+1H4vmORCx/JNuezpqV5gVcSEdz6eKdR535y9fofIde1foJqqdTdpGoEtakNK tAuu5Yr54nkv/jsG+8GUbjQkqUQF9ymBYjId2LLvjRxDXfTKfzC8zvo4pO8cUAWu/3Xo FB5zvYPmpq1rBElk43JqKINGlk+Y3ryLJltzy+nDTdRMGTCBcFewOAuGq+i8ag3iGFiH XmLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WROxXnAe; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a056a0023c200b004fa3a8e002asi9221579pfc.225.2022.04.11.04.44.18; Mon, 11 Apr 2022 04:44:31 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=WROxXnAe; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbiDJGCm (ORCPT + 99 others); Sun, 10 Apr 2022 02:02:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiDJGCi (ORCPT ); Sun, 10 Apr 2022 02:02:38 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2872C40A10; Sat, 9 Apr 2022 23:00:28 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id j8so11324706pll.11; Sat, 09 Apr 2022 23:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Lp811Xhpus0vpIQXccI+kJ+HvSPttYJotJ9EUMN/yrw=; b=WROxXnAewSuqPxyY89YNJd06KUprjfXmkGDNA0OPwz43LTKmYSzBpOunPqJ6WG8q85 e3Wet3WJgbxdkr1ekVCxZBNRaJbAl5kK/dcAK4b5MPZ9ztITQ3UHsGQWF2IcyF8evP9U 6ntq2Ty6nBmBBnGgAg0HW0r71MjoCEa1xfBR+3pGuRNOJKMcdvHyj4mz/AI2zzRX+ZF0 /mWQNxwnVknGxmajwbb9m0miCCc6FzWvjrWWgjuFSse7yTXVJyfxbjO59Pl/5RNtZi4p K1R9dxkpdviNVqBAOf+SoqlxwYnfpx1NPeffNQ5QWTbxyTpNqeErAL41d6oDPuavzJg/ 1wWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Lp811Xhpus0vpIQXccI+kJ+HvSPttYJotJ9EUMN/yrw=; b=a9GlMTXo1SuuSKde7yDjgOxk7RjHFs4BZcG6u7yXLDdLQd3Lv5zFlclFpef3y84lR2 DQp7fOPZZFvWwD15s4OTEcf1s0p0hK1rhsQUlOUKPnJNYuEIFFj5LWYCRCcoMmcDBCSy 4WCSFUV9LSoSAIPQ/TXdqhEvKp29E+g+Zbs/1AYt26lPcxcL9Hqhqwu0cC6k3z2gMrXG GgDpc+9a/Zpa2s78Sl3RAQBJPGc1QLqOuRmlW6zZm/hhjUBQc7nlptV9YAkrecOWifsB mM+AhO+ULtplXOnhJ0JcJSituec7ybd4E0vnZsAlvDxrgyXkBFqdRp9d0hKTnG+UNW+3 G2tQ== X-Gm-Message-State: AOAM5304GIz3bABt4LH5cH8IOcgzAgcWBYoPCkzUHV5piJEXkqw5SfYV tnVyQ8S885Mkzo1ClImWRv4= X-Received: by 2002:a17:90b:4a02:b0:1c6:c1a1:d65c with SMTP id kk2-20020a17090b4a0200b001c6c1a1d65cmr30457448pjb.97.1649570427505; Sat, 09 Apr 2022 23:00:27 -0700 (PDT) Received: from localhost.localdomain ([223.212.58.71]) by smtp.gmail.com with ESMTPSA id rm5-20020a17090b3ec500b001c7559762e9sm16328046pjb.20.2022.04.09.23.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Apr 2022 23:00:26 -0700 (PDT) From: Yuntao Wang To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Yuntao Wang Subject: [PATCH bpf-next] bpf: Remove redundant assignment to meta.seq in __task_seq_show() Date: Sun, 10 Apr 2022 14:00:19 +0800 Message-Id: <20220410060020.307283-1-ytcoode@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 The seq argument is assigned to meta.seq twice, the second one is redundant, remove it. This patch also removes a redundant space in bpf_iter_link_attach(). Signed-off-by: Yuntao Wang --- kernel/bpf/bpf_iter.c | 2 +- kernel/bpf/task_iter.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/bpf/bpf_iter.c b/kernel/bpf/bpf_iter.c index dea920b3b840..d5d96ceca105 100644 --- a/kernel/bpf/bpf_iter.c +++ b/kernel/bpf/bpf_iter.c @@ -545,7 +545,7 @@ int bpf_iter_link_attach(const union bpf_attr *attr, bpfptr_t uattr, bpf_link_init(&link->link, BPF_LINK_TYPE_ITER, &bpf_iter_link_lops, prog); link->tinfo = tinfo; - err = bpf_link_prime(&link->link, &link_primer); + err = bpf_link_prime(&link->link, &link_primer); if (err) { kfree(link); return err; diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c index d94696198ef8..8c921799def4 100644 --- a/kernel/bpf/task_iter.c +++ b/kernel/bpf/task_iter.c @@ -99,7 +99,6 @@ static int __task_seq_show(struct seq_file *seq, struct task_struct *task, if (!prog) return 0; - meta.seq = seq; ctx.meta = &meta; ctx.task = task; return bpf_iter_run_prog(prog, &ctx); -- 2.35.1