All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: "H. Peter Anvin" <h.peter.anvin@intel.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
	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: Tue, 17 Mar 2015 09:11:00 +0100	[thread overview]
Message-ID: <20150317081100.GA28383@gmail.com> (raw)
In-Reply-To: <55071B6B.3010102@intel.com>


* H. Peter Anvin <h.peter.anvin@intel.com> wrote:

> 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 *.

Mind explaining it to me a bit more verbosely, because I don't think I 
get your point? In my experience arithmetics on void * works just fine 
in the cases I tried.

Thanks,

	Ingo

      reply	other threads:[~2015-03-17  8:11 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
2015-03-17  8:11           ` Ingo Molnar [this message]

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=20150317081100.GA28383@gmail.com \
    --to=mingo@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=h.peter.anvin@intel.com \
    --cc=linux-kernel@vger.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.