public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Sven Schnelle <svens@linux.ibm.com>
To: Quentin Monnet <quentin@isovalent.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>,
	bpf@vger.kernel.org, Eduard Zingerman <eddyz87@gmail.com>,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH bpf-next v3 3/7] bpftool: Support inline annotations when dumping the CFG of a program
Date: Wed, 12 Apr 2023 08:04:04 +0200	[thread overview]
Message-ID: <yt9d8rexy6uj.fsf@linux.ibm.com> (raw)
In-Reply-To: <20230405132120.59886-4-quentin@isovalent.com> (Quentin Monnet's message of "Wed, 5 Apr 2023 14:21:16 +0100")

Quentin Monnet <quentin@isovalent.com> writes:

> diff --git a/tools/bpf/bpftool/btf_dumper.c b/tools/bpf/bpftool/btf_dumper.c
> index e7f6ec3a8f35..583aa843df92 100644
> --- a/tools/bpf/bpftool/btf_dumper.c
> +++ b/tools/bpf/bpftool/btf_dumper.c
> @@ -821,3 +821,37 @@ void btf_dump_linfo_json(const struct btf *btf,
>  					BPF_LINE_INFO_LINE_COL(linfo->line_col));
>  	}
>  }
> +
> +static void dotlabel_puts(const char *s)
> +{
> +	for (; *s; ++s) {
> +		switch (*s) {
> +		case '\\':
> +		case '"':
> +		case '{':
> +		case '}':
> +		case '<':
> +		case '>':
> +		case '|':
> +		case ' ':
> +			putchar('\\');
> +			__fallthrough;

Is __fallthrough correct? I see the following compile error on s390 in
linux-next (20230412):

  CC      btf_dumper.o
btf_dumper.c: In function ‘dotlabel_puts’:
btf_dumper.c:838:25: error: ‘__fallthrough’ undeclared (first use in this function); did you mean ‘fallthrough’?
  838 |                         __fallthrough;
      |                         ^~~~~~~~~~~~~

removing the two underscores fixes this.

> +		default:
> +			putchar(*s);
> +		}
> +	}
> +}

Thanks,
Sven

       reply	other threads:[~2023-04-12  6:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230405132120.59886-1-quentin@isovalent.com>
     [not found] ` <20230405132120.59886-4-quentin@isovalent.com>
2023-04-12  6:04   ` Sven Schnelle [this message]
2023-04-12 12:05     ` [PATCH bpf-next v3 3/7] bpftool: Support inline annotations when dumping the CFG of a program Quentin Monnet
2023-04-12 12:26       ` Sven Schnelle
2023-04-12 13:29         ` Quentin Monnet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yt9d8rexy6uj.fsf@linux.ibm.com \
    --to=svens@linux.ibm.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=quentin@isovalent.com \
    --cc=sdf@google.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox