From patchwork Fri Jul 17 18:47:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonghong Song X-Patchwork-Id: 1331400 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=fb.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=fb.com header.i=@fb.com header.a=rsa-sha256 header.s=facebook header.b=ZH57aRgN; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4B7g8h2wtSz9s1x for ; Sat, 18 Jul 2020 04:47:16 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728200AbgGQSrP (ORCPT ); Fri, 17 Jul 2020 14:47:15 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:13882 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728175AbgGQSrM (ORCPT ); Fri, 17 Jul 2020 14:47:12 -0400 Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06HIYaBE025407 for ; Fri, 17 Jul 2020 11:47:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=facebook; bh=0ztTVug7x2t80UXoWNU42SxtICydLJeqvLLBtfZ/gFo=; b=ZH57aRgNwXUGjsDrOG46XZRwG4YkfTZblDAAgKXIoOF2FxdAOIW/6+7S32Asjvg7BRqx Gpm9T/f/6kK7kv4cZMwKqZp9mf27gBFfcVjN6W9y8RCT3lj4qjiAJBK/vaAeszimInZC DH1Tthv6AzvEbR4kAlC3an6i2wHy+P/t4l8= Received: from mail.thefacebook.com ([163.114.132.120]) by mx0a-00082601.pphosted.com with ESMTP id 32au0anntc-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 17 Jul 2020 11:47:12 -0700 Received: from intmgw003.08.frc2.facebook.com (2620:10d:c085:208::f) by mail.thefacebook.com (2620:10d:c085:11d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Fri, 17 Jul 2020 11:47:11 -0700 Received: by devbig003.ftw2.facebook.com (Postfix, from userid 128203) id 65E193704CE3; Fri, 17 Jul 2020 11:47:06 -0700 (PDT) Smtp-Origin-Hostprefix: devbig From: Yonghong Song Smtp-Origin-Hostname: devbig003.ftw2.facebook.com To: , CC: Alexei Starovoitov , Daniel Borkmann , Jiri Olsa , Smtp-Origin-Cluster: ftw2c04 Subject: [PATCH bpf-next 1/2] bpf: change var type of BTF_ID_LIST to static Date: Fri, 17 Jul 2020 11:47:06 -0700 Message-ID: <20200717184706.3477154-1-yhs@fb.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200717184706.3476992-1-yhs@fb.com> References: <20200717184706.3476992-1-yhs@fb.com> MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-17_09:2020-07-17,2020-07-17 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 spamscore=0 phishscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=8 mlxlogscore=806 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007170130 X-FB-Internal: deliver Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The BTF_ID_LIST macro definition in btf_ids.h: #define BTF_ID_LIST(name) \ __BTF_ID_LIST(name) \ extern u32 name[]; The variable defined in __BTF_ID_LIST has ".local" directive, which means the variable is only available in the current file. So change the scope of "name" in the declaration from "extern" to "static". Signed-off-by: Yonghong Song Acked-by: Jiri Olsa Reported-by: kernel test robot Reported-by: kernel test robot --- include/linux/btf_ids.h | 2 +- tools/include/linux/btf_ids.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/btf_ids.h b/include/linux/btf_ids.h index 1cdb56950ffe..cebc9a655959 100644 --- a/include/linux/btf_ids.h +++ b/include/linux/btf_ids.h @@ -66,7 +66,7 @@ asm( \ #define BTF_ID_LIST(name) \ __BTF_ID_LIST(name) \ -extern u32 name[]; +static u32 name[]; /* * The BTF_ID_UNUSED macro defines 4 zero bytes. diff --git a/tools/include/linux/btf_ids.h b/tools/include/linux/btf_ids.h index fe019774f8a7..b870776201e5 100644 --- a/tools/include/linux/btf_ids.h +++ b/tools/include/linux/btf_ids.h @@ -64,7 +64,7 @@ asm( \ #define BTF_ID_LIST(name) \ __BTF_ID_LIST(name) \ -extern u32 name[]; +static u32 name[]; /* * The BTF_ID_UNUSED macro defines 4 zero bytes.