From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751832AbbCVLKs (ORCPT ); Sun, 22 Mar 2015 07:10:48 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:37943 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbbCVLKp (ORCPT ); Sun, 22 Mar 2015 07:10:45 -0400 Date: Sun, 22 Mar 2015 12:10:40 +0100 From: Ingo Molnar To: Alexei Starovoitov Cc: Steven Rostedt , Namhyung Kim , Arnaldo Carvalho de Melo , Jiri Olsa , Masami Hiramatsu , "David S. Miller" , Daniel Borkmann , Peter Zijlstra , linux-api@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 tip 5/9] tracing: allow BPF programs to call bpf_trace_printk() Message-ID: <20150322111040.GA18695@gmail.com> References: <1426894210-27441-1-git-send-email-ast@plumgrid.com> <1426894210-27441-6-git-send-email-ast@plumgrid.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426894210-27441-6-git-send-email-ast@plumgrid.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Alexei Starovoitov wrote: > +static const struct bpf_func_proto bpf_trace_printk_proto = { > + .func = bpf_trace_printk, > + .gpl_only = true, > + .ret_type = RET_INTEGER, > + .arg1_type = ARG_PTR_TO_STACK, > + .arg2_type = ARG_CONST_STACK_SIZE, > +}; A nit, please align such initializations vertically, for more readability: static const struct bpf_func_proto bpf_trace_printk_proto = { .func = bpf_trace_printk, .gpl_only = true, .ret_type = RET_INTEGER, .arg1_type = ARG_PTR_TO_STACK, .arg2_type = ARG_CONST_STACK_SIZE, }; (this applies to other patches as well.) Thanks, Ingo