Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2565427pxb; Mon, 11 Jan 2021 13:06:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvGm596XF+GAYwoshY1rG6talemH6vR9jCswT3l664DFX1xqeUD3AOmRRVfnXBoWvpmI2i X-Received: by 2002:a17:906:b09a:: with SMTP id x26mr916608ejy.199.1610399183368; Mon, 11 Jan 2021 13:06:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610399183; cv=none; d=google.com; s=arc-20160816; b=E/6FToP9NT0HxCw8z3lczvgP7NPEmg2rBWCmYEOrU8V8hdAZbKol08Q9bosl9x83tT GPMpffuI69PpYDpjopVhVl9IrV/wv5WhOE7SviQvnX0XkvKm6jG5JFCbJ9+4xkdnEE8b LP5RHXx5QHDAnmRjdOrFmIHwt06xcMVP9dR2nTqwKF48NrhS1E3GTwpgrlyyU+6S9f5i AUzjt+iObdAnraMh6dsfvv0YeLkChHmbAAqn8pt31He+hZL0UQfDfiODmdj1pE2eFq8I 50m57M+Pi+gOy9DPDa3XBQphfQmnwJ+ahegXG0SAkC7GgOtN45sQwuddWk0N7+0YBv2O RuUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date; bh=hyM3xtm3vq3YP7y8oj6FCulg9B/n5DMvodeCyno1+CA=; b=x7RQLvfahxoYkBIhlo4h7H8Ju0V4ZF5kGbk35V5T/GlTZT8Ig69ZLKhEa703iSFqlC 67O1Bf0b1JkxxpsAIIB3v4ag8rmbls53FZhtS1Z+3B7po4bq6kS1au5or/+UaxGZZq1n iDKSrOj851f3eRT4+JoFLY6FWKiIYUdRaNhxTpyiMLwJPZii5qL0f+pqsbDIQ5kPcbSU gZriW3jf68T3jGSeseAaZMECYp4AcDrfrLxPF816HVVK/oNSXI1X6bnq13v2kID6y5ch UEGTzKg2+z4/xvYQVoLFdf9ji1ZbZzkfskyB1iiysw4RsMdzGmZfxFqO143TzMmv7TnY C6tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si349281edy.429.2021.01.11.13.05.57; Mon, 11 Jan 2021 13:06:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388447AbhAKVDj (ORCPT + 99 others); Mon, 11 Jan 2021 16:03:39 -0500 Received: from sauhun.de ([88.99.104.3]:47620 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728396AbhAKVDh (ORCPT ); Mon, 11 Jan 2021 16:03:37 -0500 Received: from localhost (p54b331ec.dip0.t-ipconnect.de [84.179.49.236]) by pokefinder.org (Postfix) with ESMTPSA id 123D92C08AE; Mon, 11 Jan 2021 22:02:55 +0100 (CET) Date: Mon, 11 Jan 2021 22:02:54 +0100 From: Wolfram Sang To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Cc: Dmitry Torokhov , linux-iio@vger.kernel.org, Luca Ceresoli , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , Hartmut Knaack , Jonathan Cameron , Lars-Peter Clausen , Peter Meerwald-Stadler Subject: Re: [PATCH v3 1/3] i2c: use void pointers for supplying data for reads and writes Message-ID: <20210111210254.GB17475@kunai> Mail-Followup-To: Wolfram Sang , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Dmitry Torokhov , linux-iio@vger.kernel.org, Luca Ceresoli , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , Hartmut Knaack , Jonathan Cameron , Lars-Peter Clausen , Peter Meerwald-Stadler References: <20191112203132.163306-1-dmitry.torokhov@gmail.com> <20191112203132.163306-2-dmitry.torokhov@gmail.com> <20191118074349.ags3c4tmvapguqcp@pengutronix.de> <20191118080446.GB251795@dtor-ws> <20191118083810.467iry6w4kt3s7kd@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Yylu36WmvOXNoKYn" Content-Disposition: inline In-Reply-To: <20191118083810.467iry6w4kt3s7kd@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Yylu36WmvOXNoKYn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > I think it is fine to require from a caller that they are aware that a > byte (or byte array) must be passed to i2c functions. Given the (maybe) > two problems I pointed out above making it a bit harder to pass non-byte > data to these functions doesn't sound like a bad idea to me. >=20 > Obviously your mileage varies, but I personally like having an explicit > type in the API. I guess we have to agree to not agree and let Wolfram > decide if he likes your change or not. I am on Uwe's side here. I like it being explicit and think the casts as they are now are the smaller problem. --Yylu36WmvOXNoKYn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl/8vP4ACgkQFA3kzBSg KbY5xRAAjU9/zaesSAgzJYAKhkC/DjbeQfMhwK9paPFwKSq3WYYZs/Iczx9ROaFC +PwpUgNPMZfq2aCQcZ2nRTXAEPiSNp30Ws7B8L3kYT0epEgxToexy43UT+6rhmML 4WdGgyvkqGNlmsi8l9jpdOyzkHzrzJx2y3Ww/Hs5Uql7Wy6yiZpgjDUAnErpdvHx RRndK0PaaQ0Obbl3SbAnZ7pwQ+NlnWCyBkIbt3DoLz8+MRHqa8uScd5oEY9vNAQs NCmkkAetUjUybEnR5vUmH50mKcMTQZOoLeEF+akt2VJCLX4Bur44hfog/Idb/BX0 sJ5ULmrrD2remku0+do2srFtldkVj2n1Y7/Vda3eJSR7091vmKhw3ZWpc6AEE6xi yGSUYP3K59LE3XzJJpUf64NmUCWkNnP8e53KFeigNjzMPtB3HZtzLBINDxXKl66B UFRKgT63vW6SHh1HYaWRo8BMStgR5FX1wkUzVy1pe+cqYWFnTZ4gvikhRsDdKurK WtF76VSWRqlXzddjBTCScsKgnF7H4jlA3rSrtm2v1RdHLju9fGBm4S1uqyI1GZbZ 3fAAV4G6KUySw105afVdG4IAkmuPYKMKx9wXSDiS+1i5pG3t7L0DMysOezQVHSAW fqoC1kUvW1Dh9+HeM7kaCFyfZ/zZhKXnIP0yl7LZMCU7E4Zdids= =37CA -----END PGP SIGNATURE----- --Yylu36WmvOXNoKYn--