From: Eduard Zingerman <eddyz87@gmail.com>
To: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>,
andrii@kernel.org, ast@kernel.org, daniel@iogearbox.net,
martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
haoluo@google.com, jolsa@kernel.org, shuah@kernel.org,
matttbe@kernel.org, martineau@kernel.org, geliang@kernel.org,
davem@davemloft.net, kuba@kernel.org, hawk@kernel.org,
linux@jordanrome.com, ameryhung@gmail.com, toke@redhat.com,
houtao1@huawei.com, emil@etsalapatis.com, yatsenko@meta.com,
isolodrai@meta.com, a.s.protopopov@gmail.com, dxu@dxuuu.xyz,
memxor@gmail.com, vmalik@redhat.com, bigeasy@linutronix.de,
tj@kernel.org, gregkh@linuxfoundation.org, paul@paul-moore.com,
bboscaccy@linux.microsoft.com,
James.Bottomley@HansenPartnership.com, mrpre@163.com,
jakub@cloudflare.com
Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, netdev@vger.kernel.org,
mptcp@lists.linux.dev,
linux-kernel-mentees@lists.linuxfoundation.org,
skhan@linuxfoundation.org, david.hunter.linux@gmail.com
Subject: Re: [PATCH] selftests/bpf: Add -Wsign-compare C compilation flag
Date: Wed, 01 Oct 2025 13:23:13 -0700 [thread overview]
Message-ID: <fbbeeee096dc14332c50b1086b2089f1b2f496d9.camel@gmail.com> (raw)
In-Reply-To: <20250924162408.815137-1-mehdi.benhadjkhelifa@gmail.com>
On Wed, 2025-09-24 at 17:23 +0100, Mehdi Ben Hadj Khelifa wrote:
> -Change all the source files and the corresponding headers
> to having matching sign comparisons.
>
> Signed-off-by: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
> ---
> As suggested by the TODO, -Wsign-compare was added to the C compilation
> flags for the selftests/bpf/Makefile and all corresponding files in
> selftests and a single file under tools/lib/bpf/usdt.bpf.h have been
> carefully changed to account for correct sign comparisons either by
> explicit casting or changing the variable type.Only local variables
> and variables which are in limited scope have been changed in cases
> where it doesn't break the code.Other struct variables or global ones
> have left untouched to avoid other conflicts and opted to explicit
> casting in this case.This change will help avoid implicit type
> conversions and have predictable behavior.
>
> I have already compiled all bpf tests with no errors as well as the
> kernel and have ran all the selftests with no obvious side effects.
> I would like to know if it's more convinient to have all changes as
> a single patch like here or if it needs to be divided in some way
> and sent as a patch series.
>
> Best Regards,
> Mehdi Ben Hadj Khelifa
> ---
I don't understand why this change is necessary.
Have you found any bugs while doing this conversion?
[...]
next prev parent reply other threads:[~2025-10-01 20:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 16:23 [PATCH] selftests/bpf: Add -Wsign-compare C compilation flag Mehdi Ben Hadj Khelifa
2025-09-24 19:11 ` vivek yadav
2025-09-24 20:23 ` Mehdi Ben Hadj Khelifa
2025-09-26 11:45 ` David Laight
2025-09-29 16:03 ` Mehdi Ben Hadj Khelifa
2025-10-02 19:00 ` David Laight
2025-10-03 10:23 ` Mehdi Ben Hadj Khelifa
2025-10-01 20:23 ` Eduard Zingerman [this message]
2025-10-01 20:28 ` Mehdi Ben Hadj Khelifa
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=fbbeeee096dc14332c50b1086b2089f1b2f496d9.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=a.s.protopopov@gmail.com \
--cc=ameryhung@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bboscaccy@linux.microsoft.com \
--cc=bigeasy@linutronix.de \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=david.hunter.linux@gmail.com \
--cc=dxu@dxuuu.xyz \
--cc=emil@etsalapatis.com \
--cc=geliang@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=houtao1@huawei.com \
--cc=isolodrai@meta.com \
--cc=jakub@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@jordanrome.com \
--cc=martin.lau@linux.dev \
--cc=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=mehdi.benhadjkhelifa@gmail.com \
--cc=memxor@gmail.com \
--cc=mptcp@lists.linux.dev \
--cc=mrpre@163.com \
--cc=netdev@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=song@kernel.org \
--cc=tj@kernel.org \
--cc=toke@redhat.com \
--cc=vmalik@redhat.com \
--cc=yatsenko@meta.com \
--cc=yonghong.song@linux.dev \
/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