All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <h.peter.anvin@intel.com>
To: Ingo Molnar <mingo@kernel.org>,
	Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] x86: Add kerneldoc for pcommit_sfence()
Date: Mon, 16 Mar 2015 11:05:31 -0700	[thread overview]
Message-ID: <55071B6B.3010102@intel.com> (raw)
In-Reply-To: <20150316083510.GA19634@gmail.com>

On 03/16/2015 01:35 AM, Ingo Molnar wrote:
> 
> :-/
> 
> Not sure what hpa's problem with 'void *' was: especially in MM code 
> we are using 'void *' rather widely.
> 
> All compilers that aim for being able to build the Linux kernel 
> implement 'void *' as well, so that 'standard C' argument is pretty 
> weak IMHO - unlike some of the more esoteric GCC extensions, this one 
> is actually pretty well done and widely used in and outside of the 
> kernel.
> 
>> It seems like both have arguments for them.  Char pointer arithmetic 
>> has the advantage that its behavior is standard in C, so it's not 
>> specific to gcc.  I agree that void* has the advantage that it fits 
>> more naturally with the types of the parameters passed in, requiring 
>> no casting.
> 
> It's also a bonus property of 'void *' that unlike 'char *' it cannot 
> be dereferenced. So we use it for opaque buffers wherever we can.
> 

The issue isn't void *, it is doing arithmetic on void *.

	-hpa


  reply	other threads:[~2015-03-16 18:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 18:19 [PATCH] x86: Add kerneldoc for pcommit_sfence() Ross Zwisler
2015-03-11 20:18 ` Borislav Petkov
2015-03-12 10:58   ` Ingo Molnar
2015-03-13 20:03     ` Ross Zwisler
2015-03-16  8:35       ` Ingo Molnar
2015-03-16 18:05         ` H. Peter Anvin [this message]
2015-03-17  8:11           ` Ingo Molnar

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=55071B6B.3010102@intel.com \
    --to=h.peter.anvin@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=ross.zwisler@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.