public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Crestez Dan Leonard <leonard.crestez@intel.com>
Cc: linux-spi@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>,
	linux-i2c@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC] regmap: Add regmap_pipe_read API
Date: Wed, 22 Jun 2016 11:06:51 +0100	[thread overview]
Message-ID: <20160622100651.GH28202@sirena.org.uk> (raw)
In-Reply-To: <f3524d45-b266-056d-05b7-df2d4c007921@intel.com>

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

On Wed, Jun 22, 2016 at 11:32:20AM +0300, Crestez Dan Leonard wrote:
> On 06/21/2016 09:42 PM, Mark Brown wrote:
> > On Thu, Jun 16, 2016 at 06:24:36PM +0300, Crestez Dan Leonard wrote:

> >> +		val = ((u8*)val) + read_len;

> > This cast looks broken, you should be able to do pointer arithmetic on
> > void pointers as though they were char *.

> Pointer arithmetic on void* is not standard C, it's a GCC extension. I
> know that GCC extensions are allowed for the kernel but is it really
> encouraged to rely on them this way?

Hrm, I thought it had been standardized in one of the more recent spec
revisions but I can't seem to find that right now.

> Anyway, are my concerns about the regmap_bus implementation for SPMI
> valid? In theory this could be submitted in it's present form and let
> regmap+spmi users

That looks unfinished...

> If this API is otherwise fine I can just resend this marked as [PATCH]
> with the cast removed and some rearranged comments.

Well, there's the naming.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2016-06-22 11:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 15:24 [RFC] regmap: Add regmap_pipe_read API Crestez Dan Leonard
2016-06-16 15:43 ` Geert Uytterhoeven
2016-06-17  7:04   ` Crestez Dan Leonard
2016-06-17  8:05     ` Lars-Peter Clausen
2016-06-19 19:40       ` Jonathan Cameron
2016-06-21 18:42 ` Mark Brown
2016-06-22  8:32   ` Crestez Dan Leonard
2016-06-22 10:06     ` Mark Brown [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=20160622100651.GH28202@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=jic23@kernel.org \
    --cc=leonard.crestez@intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /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