From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D844BC433FE for ; Mon, 30 May 2022 05:50:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232552AbiE3Fu2 (ORCPT ); Mon, 30 May 2022 01:50:28 -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-Google-Smtp-Source: ABdhPJyx/idoF+26OybQl9WinGG6SC8BnaZd3+wjIH3J3SjDiGty9Q4ujOgCIxhagSXt+BCokd88FxWx82/VYxoLP6M= 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" 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