From: Alexander Duyck <alexander.h.duyck@intel.com>
To: Joe Perches <joe@perches.com>
Cc: Krzysztof Majzerowicz-Jaszcz <cristos@vipserv.org>,
jeffrey.t.kirsher@intel.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: net: ethernet: intel: e1000: e1000_ethtool.c coding style fixes
Date: Mon, 18 Aug 2014 08:45:53 -0700 [thread overview]
Message-ID: <53F21FB1.7060607@intel.com> (raw)
In-Reply-To: <1408375914.2741.1.camel@joe-AO725>
On 08/18/2014 08:31 AM, Joe Perches wrote:
> On Mon, 2014-08-18 at 08:29 -0700, Alexander Duyck wrote:
>> Doing any kind of pointer math on a void pointer is generally unsafe as
>> it is an incomplete type. The only reason why it works in GCC is
>> because GCC has a nonstandard extension that makes it report as having a
>> size of 1.
>
> I know. It's used in quite a few places in kernel code
> so I believe it's now a base assumption for the kernel.
Well that is something that should probably be fixed then. I don't
believe it is safe to be doing any kind of pointer math on a void pointer.
We really shouldn't be using any GCC specific bits unless we absolutely
have to.
Thanks,
Alex
next prev parent reply other threads:[~2014-08-18 15:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-16 9:12 [PATCH] drivers: net: ethernet: intel: e1000: e1000_ethtool.c coding style fixes Krzysztof Majzerowicz-Jaszcz
2014-08-16 18:41 ` Joe Perches
2014-08-18 15:29 ` Alexander Duyck
2014-08-18 15:31 ` Joe Perches
2014-08-18 15:36 ` Krzysztof Majzerowicz-Jaszcz
2014-08-18 15:40 ` Joe Perches
2014-08-18 15:43 ` Krzysztof Majzerowicz-Jaszcz
2014-08-18 15:45 ` Alexander Duyck [this message]
2014-08-18 16:29 ` Joe Perches
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=53F21FB1.7060607@intel.com \
--to=alexander.h.duyck@intel.com \
--cc=cristos@vipserv.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).