Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752189AbcDQArt (ORCPT ); Sat, 16 Apr 2016 20:47:49 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:33614 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751811AbcDQArs (ORCPT ); Sat, 16 Apr 2016 20:47:48 -0400 Date: Sat, 16 Apr 2016 17:47:42 -0700 From: Alexei Starovoitov To: Arnd Bergmann Cc: "David S . Miller" , netdev@vger.kernel.org, Steven Rostedt , Ingo Molnar , Alexei Starovoitov , Daniel Borkmann , linux-kernel@vger.kernel.org, fengguang.wu@intel.com Subject: Re: [PATCH] bpf: avoid warning for wrong pointer cast Message-ID: <20160417004740.GA80675@ast-mbp.thefacebook.com> References: <1460838585-1248139-1-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460838585-1248139-1-git-send-email-arnd@arndb.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1097 Lines: 23 On Sat, Apr 16, 2016 at 10:29:33PM +0200, Arnd Bergmann wrote: > Two new functions in bpf contain a cast from a 'u64' to a > pointer. This works on 64-bit architectures but causes a warning > on all 32-bit architectures: > > kernel/trace/bpf_trace.c: In function 'bpf_perf_event_output_tp': > kernel/trace/bpf_trace.c:350:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] > u64 ctx = *(long *)r1; > > This changes the cast to first convert the u64 argument into a uintptr_t, > which is guaranteed to be the same size as a pointer. > > Signed-off-by: Arnd Bergmann > Fixes: 9940d67c93b5 ("bpf: support bpf_get_stackid() and bpf_perf_event_output() in tracepoint programs") Thanks. Acked-by: Alexei Starovoitov I guess I started to rely on 0-day build-bot too much. This patch has been in my tree for 2+ weeks and then in net-next and I didn't receive a single email from build-bot about this warning, though I do receive them for my other work-in-progress stuff. Odd. Fengguang, any idea why build-bot sometimes silent?