Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5322484imm; Tue, 21 Aug 2018 09:45:28 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyv0vjD6WgENZ+xj+RXDTqWj+vAfALqASqN5Sekf3xQh/umBN42XE7bi92cn5dqVnfPAXAE X-Received: by 2002:a63:27c1:: with SMTP id n184-v6mr13041278pgn.298.1534869928641; Tue, 21 Aug 2018 09:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534869928; cv=none; d=google.com; s=arc-20160816; b=ZJrMdhVE2ESkCwOqBcNP6pG/jjie8Edv1n/Hs6bs3TqfED9zDCttx66qm8/5q+0bEJ 3DCpM5o4wCnqhIPa32Pv4gVWHOPQq/sQmGBkwyMu9az7cu8KCJrF+61atDJ6gslplmE6 4tsPs1kBvSqHRu8YlxvQgnYil9XQvfKES30zwLR7Xc8YFXPUfi2vUYlnsgqfe5qoHiM3 lP5VWEjjbo7XfCTc2jFUsw8L1/89KwXsCcx275cbB+1mzOyib3kIZb303lA6z0+1ghnO ArGlkZhESCpULbOAorlsqfTpYo020VLMzu1MuHOydyzrsXuHyLu6k81dYswW35ykf2sB 8DYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=sFaPtY6nI7qDQThR+HnBM/AIrP7kAf9zPQVSwd4WFro=; b=k3hNb2LLHrtqfB+hCZT/KBjUG4ZKIHAexEpgoocOl9X6iwX8t7x1e31GbM3Fdd600V RIgZUzvSJJcEI3yYklcvmGRBwMshq4XHngx5XdXvg5+gPhfbMhOlSTqt7WZUpL5BtHEv MXi39qGPEEsun6ORUUAh8i1HQVo3o/j1j1bcnYe2H0eVCaxb4N+HI/U1DQ3F1YGETkki pAZMvPvTUgzSi4tw0qUokx9E50kzBDjjsmjCMKS+QyAFTcDE62yriPqi/fhpuSu0Fsws hPb5Zj6UoPMMfXdqXxf71nUExlJq+MY8gZr+coAJ9lPPinvCEaycXDboKRcP6lfpgpwC w6Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M54wSS+H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t70-v6si164563pgd.561.2018.08.21.09.45.13; Tue, 21 Aug 2018 09:45:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M54wSS+H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728341AbeHUTdz (ORCPT + 99 others); Tue, 21 Aug 2018 15:33:55 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:38366 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728325AbeHUTdz (ORCPT ); Tue, 21 Aug 2018 15:33:55 -0400 Received: by mail-pf1-f196.google.com with SMTP id x17-v6so8727429pfh.5; Tue, 21 Aug 2018 09:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=sFaPtY6nI7qDQThR+HnBM/AIrP7kAf9zPQVSwd4WFro=; b=M54wSS+HLqZ8tZ7/AlZlC38i6CkbvrfchoRTiGzzrLfk3X5guCfM4ze6TftX6yn7EB GAgY1Z5HXPM8rOl1lf2KTf3Ww/PoiAKkfLOfwnffUWnkDq9+xwB2H+gmGYHzC9Mrvi5o 0WAmRqtAFy2QSyLfrc1kYpOLffIZm4MGkFmgaZ/6e/I74VUz1vEc2mCroj69BlZI08B5 ajWk6dRcZfIhRYqcaRjXvq4LdpMMZP8E5zJqO+YKMyJVkUCQjUZlyLL8AP01ssNauR1E dINFhZHLTUT6ZqhAn/Kdj3r84/brZzSMuvbPzAPv+ftWP8TW4+Fw0rx+IA6j1jO1ADuW O6qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sFaPtY6nI7qDQThR+HnBM/AIrP7kAf9zPQVSwd4WFro=; b=WyKw9PRQS/q+bUYls6e4Sc5JAUi431Pp+I+hMTHmlBnkmfEBk35G3Wfn1JPwaIJq7t 8ADDJpHDqPHOHmNT1iDx2CDQqNIM06UPHxHYEwSzg5jq7ZEKpWVhlJ3S0JVkiiu+z0kI ZO6h1CEyajSDTVtu5a6NBSfxF9hCaRJqxvaJt0t3bWjevk2v9CJQeX0MtqVVeZaJPrs1 /yw5fRCQuzSf6y0edDz72CwD7T1Y9fTQQnlGb8Vl8qi8pRFWUy0WqXdQHld6L1lFfaYH b9VupOyA5kgYFRMyUI9aJjx/11hkoqI2+qBjjHNVYGs5l9xmF2+akBbWRDw6oTYCsmLs pCeA== X-Gm-Message-State: APzg51D8mYU/Up4Ts+DtgYK2jQXLSpTm/cN8/prXiq7x70se/mBlXk6z 2+m85Ncutpi+guiapwXYjsM= X-Received: by 2002:a65:65c6:: with SMTP id y6-v6mr2378035pgv.436.1534867989805; Tue, 21 Aug 2018 09:13:09 -0700 (PDT) Received: from localhost.localdomain ([211.196.191.92]) by smtp.gmail.com with ESMTPSA id n29-v6sm18049183pgl.30.2018.08.21.09.13.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 09:13:08 -0700 (PDT) From: Taeung Song To: Daniel Borkmann , Alexei Starovoitov Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jakub Kicinski Subject: [PATCH] libbpf: Remove the duplicate checking of function storage Date: Wed, 22 Aug 2018 01:12:58 +0900 Message-Id: <20180821161258.19718-1-treeze.taeung@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After the commit eac7d84519a3 ("tools: libbpf: don't return '.text' as a program for multi-function programs"), bpf_program__next() in bpf_object__for_each_program skips the function storage such as .text, so eliminate the duplicate checking. Cc: Jakub Kicinski Signed-off-by: Taeung Song --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 2abd0f112627..8476da7f2720 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -2336,7 +2336,7 @@ int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr, bpf_program__set_expected_attach_type(prog, expected_attach_type); - if (!bpf_program__is_function_storage(prog, obj) && !first_prog) + if (!first_prog) first_prog = prog; } -- 2.17.1