[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8c33ec2d-0a92-4409-96b0-f492a57a77ce@web.de>
Date: Wed, 24 Jul 2024 17:43:27 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Zhu Jun <zhujun2@...s.chinamobile.com>, bpf@...r.kernel.org,
Quentin Monnet <qmo@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Eduard Zingerman
<eddyz87@...il.com>, Hao Luo <haoluo@...gle.com>,
John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Yonghong Song <yonghong.song@...ux.dev>
Subject: Re: [PATCH v4] tools/bpf: Fix the wrong format specifier
> The format specifier of "unsigned int" in printf() should be "%u", not
> "%d".
* Please improve the change description with imperative wordings.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10#n94
* Would you like to add any tags (like “Fixes” and “Cc”) accordingly?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10#n145
…
> ---
> Changes:
…
v4:
Thanks! But unsigned seems relevant here, …
Please adjust the representation of information from a patch review by Quentin Monnet.
https://lore.kernel.org/linux-kernel/2d6875dd-6050-4f57-9a6d-9168634aa6c4@kernel.org/
https://lkml.org/lkml/2024/7/24/378
…
> +++ b/tools/bpf/bpftool/xlated_dumper.c
> @@ -349,7 +349,7 @@ void dump_xlated_plain(struct dump_data *dd, void *buf, unsigned int len,
>
> double_insn = insn[i].code == (BPF_LD | BPF_IMM | BPF_DW);
>
> - printf("% 4d: ", i);
> + printf("%4u: ", i);
> print_bpf_insn(&cbs, insn + i, true);
…
How do you think about to care more also for the return value from such a function call?
https://wiki.sei.cmu.edu/confluence/display/c/ERR33-C.+Detect+and+handle+standard+library+errors
Regards,
Markus
Powered by blists - more mailing lists