Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463AbdLATGU (ORCPT ); Fri, 1 Dec 2017 14:06:20 -0500 Received: from mail-db5eur01on0059.outbound.protection.outlook.com ([104.47.2.59]:24275 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752360AbdLATGQ (ORCPT ); Fri, 1 Dec 2017 14:06:16 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jgg@mellanox.com; Date: Fri, 1 Dec 2017 12:06:05 -0700 From: Jason Gunthorpe To: Steven Rostedt , Ingo Molnar Cc: Jesper Dangaard Brouer , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH] bpf: Fix compile warnings when !CONFIG_BPF_SYSCALL Message-ID: <20171201190605.GA21174@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [70.74.179.152] X-ClientProxiedBy: VI1PR08CA0238.eurprd08.prod.outlook.com (2603:10a6:802:15::47) To DB6PR0501MB2854.eurprd05.prod.outlook.com (2603:10a6:4:83::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 63583555-000c-4704-0a70-08d538ee96ce X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603286);SRVR:DB6PR0501MB2854; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0501MB2854;3:Z2IbIkE0g75wDpae2fGYc526NYekx2uZxmthrTrw6fdTnBIEhJVqVfuBdXvBM8oxypJ0RMXHCMXk7zLZqXS3YCZY/Ck+EAMP8Iu3RKHafl+vygrZX2w0tNFlKdb2vc73dcOvW36BSdWyzuvImn0jA/XANNi2V4vnR2zMBpFPWm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+lY79uAoNVxUD0X8jwLQc1Si+1q074F62JgW079uVPIrGaNu9Ra8U71d1qafW4oJYnyH5aZCjZ+1zHeWX3MQvnYLXKWVFmicSqZjhb9MLXI4rsCN3SAM3TKVV7HjMIkGqJXGYFG15CAgGlE3rvLcwex+05jvj5yirwzL98Wr3/2+a8WBRRX1t2V;4:JQ9ue+u89NTti58iVvNg63xAaVsPVTWyIriDjaJX6x+YboKw9NBXI0jW/fKvX803UC1YA/IG4N7ShrxNnpQaTnR/xK+8M4aGJJtKhMVnjVMcOKep0M+NyirQnYgrHMHIFW5vwa/2lokR+YDPbxnX4n5NXEwO/pR0ur4sf60UoM6C/qD0DBmaDfscJUAkWys688WUtpbkjd0oI41TyHWLmyfUfRTJ52H+a5eKBK1HCq141T2QWNEIzjHP5u/zIBhuIs1v82MKrbTuRLuRq6fOETUJFp08bYpsaiWXSQhIyCKHsBfv3kISyNPrDJ93sCfr X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231022)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(20161123558100)(6072148)(201708071742011);SRVR:DB6PR0501MB2854;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DB6PR0501MB2854; X-Forefront-PRVS: 05087F0C24 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(346002)(39860400002)(376002)(366004)(199003)(189002)(81166006)(110136005)(58126008)(1076002)(69596002)(101416001)(53936002)(105586002)(8936002)(122856001)(36756003)(8676002)(106356001)(47776003)(305945005)(316002)(81156014)(575784001)(86362001)(46656002)(54356011)(7736002)(83506002)(3846002)(33656002)(4326008)(52116002)(66066001)(50466002)(6116002)(2870700001)(2486003)(52146003)(9746002)(9786002)(5660300001)(83796002)(2906002)(478600001)(189998001)(23676004)(9686003)(68736007)(57986006)(97736004)(33896003)(18370500001)(24400500001)(42262002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0501MB2854;H:mlx.ziepe.ca;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjA1MDFNQjI4NTQ7MjM6RW9HZVVFb0RvZWFTZVZlMkZXUFU1bER2?= =?utf-8?B?OVd6SjkwYjZDSjVrRk4rb1FTRkdCdE95VHo0cEtGbU42K3B2SHg4Wms2S0g5?= =?utf-8?B?WWJsSDhoampSb2RLWGNoc1JFelFZSGV1RDRVYmZvRXUyRHl4UXBlV2M2L1ph?= =?utf-8?B?a3dwTHo5ZzI2WWJ2UEFWNmV0eUVYamdVMHhWWERyUmY3emVrQUpqcUZCVEVv?= =?utf-8?B?c2NmOXoxTXZQaVhnVnk1NVY0U0ltcXFHR1BKYlg1SlFoSHRoek1Jc0p1SlIr?= =?utf-8?B?UjVITXNCK2dUamUyV1J1dzlYV2cyYUg3WmRKZklmUXpUVURZL21CdVZNUWdZ?= =?utf-8?B?dExkSnZVcVloc0kySklrSUx5a1dmZzMxNUtRbUtkTjBxckVPa204Z3ZnaVc3?= =?utf-8?B?L2x3eUcxSHJqM0VIaWRabWpOYzlUejZNUXN6VzVMU1FoVGpKVnFRNWtrVG5O?= =?utf-8?B?NnlIdHdZZVgwTEZsMnBqUVl3TU9WcHlub3JQbVNudkI3WTJ1UndvOW5ncllP?= =?utf-8?B?Um9jWXoxNnJxQ1NYeTZuOTFubGxSK1YydUZYQkxCNlEvSmdreFVNZ1lLb3dX?= =?utf-8?B?NjdkMmZCL1pKa3c2TWdSWURUeUxlMGE2NGZzZXNBSUdlaUFYUVJGTi9oSGdD?= =?utf-8?B?U2RpWmNqRll6UFhLYnNqUkdUZFJGTWt4VEZGc0xEelhLR1Y2MHpiN0VCYTlJ?= =?utf-8?B?SkUwTXJZVFp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FyX/nYxuJj5LHDfrLy3rXQ7ACeJSWAjOR7i9nxuYomCmwI4DxOzN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2017 19:06:12.3438 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63583555-000c-4704-0a70-08d538ee96ce X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2854 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1027 Lines: 34 Such as: In file included from ./include/trace/events/xdp.h:10:0, from ./include/linux/bpf_trace.h:6, from drivers/net/ethernet/intel/i40e/i40e_txrx.c:29: ./include/trace/events/xdp.h:94:17: warning: ‘struct bpf_map’ declared inside parameter list const struct bpf_map *map, u32 map_index), ^ By adding a forward declaration for struct bpf_map. In the CONFIG_BPF_SYSCALL case the declaration comes in via trace/events/bpf.h Fixes: 59a308967589 ("xdp: separate xdp_redirect tracepoint in map case") Signed-off-by: Jason Gunthorpe --- include/trace/events/xdp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h index 4cd0f05d01134d..36b2a9043189be 100644 --- a/include/trace/events/xdp.h +++ b/include/trace/events/xdp.h @@ -9,6 +9,8 @@ #include #include +struct bpf_map; + #define __XDP_ACT_MAP(FN) \ FN(ABORTED) \ FN(DROP) \ -- 2.7.4