From: Dan Carpenter <firstname.lastname@example.org>
Cc: Sean Tranchetti <email@example.com>,
"David S. Miller" <firstname.lastname@example.org>,
Jakub Kicinski <email@example.com>,
Subject: Re: [PATCH net-next] net: qualcomm: rmnet: fix two pointer math bugs
Date: Mon, 21 Jun 2021 10:18:31 +0300 [thread overview]
Message-ID: <20210621071831.GB1901@kadam> (raw)
On Mon, Jun 21, 2021 at 10:11:58AM +0300, Dan Carpenter wrote:
> On Sat, Jun 19, 2021 at 01:12:09PM -0600, firstname.lastname@example.org wrote:
> > On 2021-06-19 07:52, Dan Carpenter wrote:
> > Hi Dan
> > Thanks for fixing this. Could you cast the ip4h to char* instead of void*.
> > Looks like gcc might raise issues if -Wpointer-arith is used.
> > https://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Pointer-Arith.html#Pointer-Arith
> The fix for that is to not enable -Wpointer-arith. The warning is dumb.
Sorry, that was uncalled for and not correct. The GCC warning would be
useful if we were trying to write portable userspace code. But in the
kernel the kernel uses GCC extensions a lot.
The Clang compiler can also compile the kernel these days. But it had
to add support for a bunch of GCC extensions to make that work. Really
most of linux userspace is written with GCC in mind so Clang had to do
So we will never enable -Wpointer-arith in the kernel because there is
next prev parent reply other threads:[~2021-06-21 7:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-19 13:52 [PATCH net-next] net: qualcomm: rmnet: fix two pointer math bugs Dan Carpenter
2021-06-19 19:12 ` subashab
2021-06-21 7:11 ` Dan Carpenter
2021-06-21 7:18 ` Dan Carpenter [this message]
2021-06-21 16:44 ` subashab
2021-06-21 19:30 ` patchwork-bot+netdevbpf
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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;
as well as URLs for NNTP newsgroup(s).