Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3514558ioo; Mon, 30 May 2022 03:58:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtmOovsw1yG5dqvRB+TkJmGXRw94+KHZuzeILlM4mVZFtVZzh9tVCGGkgVigwKApXk05gQ X-Received: by 2002:aa7:d614:0:b0:42b:f24e:e4c2 with SMTP id c20-20020aa7d614000000b0042bf24ee4c2mr17124404edr.322.1653908308881; Mon, 30 May 2022 03:58:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653908308; cv=none; d=google.com; s=arc-20160816; b=elQ5EWf4xJSKeNgR8xNI1dL6MrO/Cei7bK6b7JdP395XRdOsrLePowMjNTDlj+NP9r 0PgUQbaymHBn7H5BBP3SG1TPgQxCCZJGCIPBqnvWFgYcU+sIfANywQDegzYw8yeGZlKG QJ8XWjNJJgxoIjweMa84tpzHYxfCI+urbrtW5ZmE8bRTAMqZjpQ4vBTOlP0eGw6+DaBw lxeUrdNW1x8Pm6CVMOPaUVwtARabEaSF/6iE90iy5fLgeR35u2l1rZqAjP84PWtOoByl pHJnZoov4hv6W4kE7mMPlJB1gt+E4yFS40QTzvwEVZGGrEhkKTljSFTYzmFyT0IqkzMs Ez8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zR5wxk1o5yG2X1p3FMRn06KEzqM/Qj4ZRx4DJMWegBI=; b=pcmHgtitGpAlqZkhUQDt7iJCNdHMG6jujFYHRkoCmel8QE3UJmeqv68wQHmnHXNPb8 OUQuQxlzeA/ZJhbgwMJxr8HCm/muZ0cEWhTyljQh9hR2TBTD6Y4H06jz+OMvrIp99Ia5 O8jB8zixNb+k3N2iHBrfydJD7HxdWbjfUmFX1iicpfCrDKCDt+AltBYw5rfsW9JTRXMO ewF9eEVkw5FlXIZP5qRWwUyGNZLHOg/18JTRposhl7vKvRsNdbPwpQXgf82VhjuAMrkK aNjsPL8wfT4Cs1eCmu0WBCvBc7O+db4c31Lx56Oh07sWbAix81iLSjsn1/shtDC43LIy VWEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SdXfO5nz; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a17090613c200b006fed9376070si8126954ejc.155.2022.05.30.03.58.02; Mon, 30 May 2022 03:58:28 -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=@kernel.org header.s=k20201202 header.b=SdXfO5nz; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232302AbiE3Fu1 (ORCPT + 99 others); Mon, 30 May 2022 01:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230251AbiE3Fu0 (ORCPT ); Mon, 30 May 2022 01:50:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE4AA6470B; Sun, 29 May 2022 22:50:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F3337B80B9C; Mon, 30 May 2022 05:50:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9557FC3411A; Mon, 30 May 2022 05:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653889821; bh=zR5wxk1o5yG2X1p3FMRn06KEzqM/Qj4ZRx4DJMWegBI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SdXfO5nzp9kGY8QxfVDAcmiIzQnzWzMbb3UDSPS+uwXYkw3YfpcUswC6iPK74iDtD 6PhQ5KtzLH0RCH+LZ+6AyYbKWIeaingXISyPC3gVt4E8Za3pJtFuqTanJQ0tcvme/4 ltSS7Nm1QfQCGWE1c4/K2YpdZWWrc+BlfWv407E5ZLl626fV5k1kSzCFmx7ethGojw 3ocQbrR7tkwWimvb6w9IGSTzh/aRVrLSadE+nyh6TXCUnQnaSc5sT+uDBlcbFNrPWe 4VDKHGdFfYfPLo8PKAMur+QgaUjFdC0Q2ECsI7DZtXP0KazNGt57+mN5SV/FYAM+vz RVlJqxvTKB3/A== Received: by mail-yb1-f182.google.com with SMTP id h75so11343761ybg.4; Sun, 29 May 2022 22:50:21 -0700 (PDT) X-Gm-Message-State: AOAM533NRMn+CIsYqnLeT8K6SbcjkgS4y0YEUgJkxwkwGuPb0JJ0Etoy 4O880cwkkdqsGrX5sRZ0tcpZbPOpahvWqeepzZE= X-Received: by 2002:a25:7e84:0:b0:650:10e0:87bd with SMTP id z126-20020a257e84000000b0065010e087bdmr31358213ybc.257.1653889820663; Sun, 29 May 2022 22:50:20 -0700 (PDT) MIME-Version: 1.0 References: <0a9aaac329f76ddb17df1786b001117823ffefa5.1653855302.git.dxu@dxuuu.xyz> In-Reply-To: <0a9aaac329f76ddb17df1786b001117823ffefa5.1653855302.git.dxu@dxuuu.xyz> From: Song Liu Date: Sun, 29 May 2022 22:50:09 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next] bpf, test_run: Remove unnecessary prog type checks To: Daniel Xu Cc: bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , open list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Sun, May 29, 2022 at 1:16 PM Daniel Xu wrote: > > These checks were effectively noops b/c there's only one way these > functions get called: through prog_ops dispatching. And since there's no > other callers, we can be sure that `prog` is always the correct type. > > Signed-off-by: Daniel Xu Acked-by: Song Liu