lkml.org 
[lkml]   [2023]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 2/2] bpftool: Align bpf_load_and_run_opts insns and data
On Thu, Oct 5, 2023 at 8:54 AM Quentin Monnet <quentin@isovalent.com> wrote:
>
> On 04/10/2023 23:23, Ian Rogers wrote:
> > A C string lacks alignment so use aligned arrays to avoid potential
> > alignment problems. Switch to using sizeof (less 1 for the \0
> > terminator) rather than a hardcode size constant.
> >
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> > tools/bpf/bpftool/gen.c | 47 ++++++++++++++++++++++-------------------
> > 1 file changed, 25 insertions(+), 22 deletions(-)
> >
> > diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
> > index b8ebcee9bc56..7a545dcabe38 100644
> > --- a/tools/bpf/bpftool/gen.c
> > +++ b/tools/bpf/bpftool/gen.c
> > @@ -408,8 +408,8 @@ static void codegen(const char *template, ...)
> > /* skip baseline indentation tabs */
> > for (n = skip_tabs; n > 0; n--, src++) {
> > if (*src != '\t') {
> > - p_err("not enough tabs at pos %td in template '%s'",
> > - src - template - 1, template);
> > + p_err("not enough tabs at pos %td in template '%s'\n'%s'",
> > + src - template - 1, template, src);
>
> Nit: This line is no longer aligned with the opening parenthesis.
>
> Other than that:
>
> Acked-by: Quentin Monnet <quenti@isovalent.com>

Thanks! Nit fixed in v5.

Ian

\
 
 \ /
  Last update: 2023-10-06 00:04    [W:0.242 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site