From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752093AbcFVLB7 (ORCPT ); Wed, 22 Jun 2016 07:01:59 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:58930 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751077AbcFVLBu (ORCPT ); Wed, 22 Jun 2016 07:01:50 -0400 Date: Wed, 22 Jun 2016 11:06:51 +0100 From: Mark Brown To: Crestez Dan Leonard Cc: linux-spi@vger.kernel.org, Wolfram Sang , linux-i2c@vger.kernel.org, Jonathan Cameron , linux-kernel@vger.kernel.org Message-ID: <20160622100651.GH28202@sirena.org.uk> References: <7ca3857aa8869a1e1f4709860f57f7d92abf1c6b.1466089603.git.leonard.crestez@intel.com> <20160621184251.GC28202@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZPDwMsyfds7q4mrK" Content-Disposition: inline In-Reply-To: X-Cookie: Beware of Bigfoot! User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [RFC] regmap: Add regmap_pipe_read API X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ZPDwMsyfds7q4mrK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --ZPDwMsyfds7q4mrK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXamM5AAoJECTWi3JdVIfQkcgH/AyMgf994mp/x2GvTcIVUVLw Q5Gx8XM6oHrTQbCEEpkZM/kKUALHsk4QaJ7Cibcp/FkLuRMoy96k6dhWp7PqId1Q 4R90QJYJxXUEehBpMETNbP25tlxyndeJE/d94iNrB1yjnZAV0XIL+Fq9aFyP85uP rCVSWKzH0juUerS9FfTu1YmbhSzpgqSS4W3otDuDXj1Qva9tQq+Ck60PYuq1qMca g6bjGXqAfdjDxQQ2PYnBK3AaY8TbFoY5vFFCaasE5Apc5quLGE/3lMgbQAKnoFMd 3BVGVRulN0AV2oR5AJVk/lJu63qAxQqRXgeYlakRiSyjtHjkkOa6xk/qx1eFjdQ= =v4Yf -----END PGP SIGNATURE----- --ZPDwMsyfds7q4mrK--