Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2566240pxb; Mon, 11 Jan 2021 13:07:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwH84Ig8qw1Y2cI/hOMcg+jNlAjNC+6t1NsGtvUleAGRpz2dqfd4HQdB/e11GRmX9dYzW0L X-Received: by 2002:a17:906:1194:: with SMTP id n20mr864376eja.269.1610399255645; Mon, 11 Jan 2021 13:07:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610399255; cv=none; d=google.com; s=arc-20160816; b=rm0ju/7rQ1aR5Zb9xjRt8o5pi9TWJaVpIn9Q1cfebXHMPyBQ2kjqVk6aR2VTryvLQb ggEjjAdf4gA834nEYuBqUhff40+jtj0Sbt4YDCUDwswk2l0Ejt5Y/M8ixvuOOiigQtJT hWgq4lXM/ahwQq22FxSwHSNibpac5bleH7VAsEHLpw4dg4Bx/Km2Y8OkpUeCT7swe7Db sE3q4KDiNy8eTdF4J0MAgkzvARryJq9thChpWdSsPXbQhBjuVggQEgCqWucxCKUVH0w+ 9TFviCNFaBWH9A6Xf9AnMn9Sw5PyX0/ah5rpYhS9mEnCYUuvFj9BsugbaMCOFMJ4Yvd4 1wmQ== 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=1VeWF4QYA/xW6Sl3/Vu6T0F+MKre5aMCEHL24NImVjM=; b=smj9eTJ6wJQtN3fgBel5MDGDdqseQzryj72euIocYHDnrdtMoD1VU/T3EjR1wCYVyK zyxF83KFps/9V9fTUwaOcZkNSEU19mTBsbBL+0pv4pXszWD1rMd+ORfXBUXdYLy5nLTZ cF9FIbrBfkQ8EQDZLLlfof+kdy+1y6LuFvHkf3lsZaHJK78uX3lqsbmaudwT7pgzGGd9 zzD3CkTIc5ClvJbuWN05wnjIc1pGGgeM12+xmWt/skCBi4eyauuHRuhgkg4mT2SrcgeM i6v1oix5P7TymGFpbhvKVefoPsimOlcRa+XAJe5Yn0XMtKrCjRT5NklekMABAsxAfdVj rPfQ== 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 c1si351816edm.144.2021.01.11.13.07.10; Mon, 11 Jan 2021 13:07:35 -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 S2389085AbhAKVEy (ORCPT + 99 others); Mon, 11 Jan 2021 16:04:54 -0500 Received: from sauhun.de ([88.99.104.3]:47648 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730320AbhAKVEy (ORCPT ); Mon, 11 Jan 2021 16:04:54 -0500 Received: from localhost (p54b331ec.dip0.t-ipconnect.de [84.179.49.236]) by pokefinder.org (Postfix) with ESMTPSA id 212EE2C08AE; Mon, 11 Jan 2021 22:04:12 +0100 (CET) Date: Mon, 11 Jan 2021 22:04:11 +0100 From: Wolfram Sang To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Cc: Dmitry Torokhov , linux-iio@vger.kernel.orgi, Luca Ceresoli , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] i2c: smbus: use get/put_unaligned_le16 when working with word data Message-ID: <20210111210411.GC17475@kunai> Mail-Followup-To: Wolfram Sang , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Dmitry Torokhov , linux-iio@vger.kernel.orgi, Luca Ceresoli , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191112203132.163306-1-dmitry.torokhov@gmail.com> <20191112203132.163306-3-dmitry.torokhov@gmail.com> <20191118073659.7yomkvqthuenqjpu@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QRj9sO5tAVLaXnSD" Content-Disposition: inline In-Reply-To: <20191118073659.7yomkvqthuenqjpu@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --QRj9sO5tAVLaXnSD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > You claim this was clearer. For me it is not. With the explicit > assignment to msgbuf0[1] and msbbuf0[2] it is immediatly obvious to me > what happens. Even though the endianness is explicitly mentioned in > put_unaligned_le16, it takes a bit longer for me to understand what it > does and which part of data->word ends up in which byte. Seems like I am on Uwe's side again. For me, the current way is also more readable. --QRj9sO5tAVLaXnSD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl/8vUsACgkQFA3kzBSg KbZnZg//e2fQzH9ZTIyGQjTr7+Bt0evXnmsQyYJ4n5mcynQA0I1d1vfIGY9odSLc YTEpI2BrKDh6g/YDh56T8+zhywxDJE1dmnzm3ep5ewzMAndjdKwVtBDrXJsQMjN1 8iT30yZeKcivZe097xVyRZ9zKdDjMS1G3eTFgLCJFH0F/zhyy+1bIozC5bHuHB3L 3Mfzn3pnxd8UrjWsE5gyA5QWJL/lWEZpKrk5Cul0rr17QTg8LE0uIegMK7g+ouDJ Rv7OZ8LfQzK7FGFz5jMSLstgtNkMfUlPewu/oIrcvoeIeLcqqFW49rJbW1+mUnP6 K+JZoAeA5UW8Nzwxm/VJio5mNVYRILunYsb924SR6HzVblgGrJdFtF73gfgBdYum ktPeafv8um7GLUoXb6r653G88UyJb3rs2SEkUFrwOy9AwJIyIjgKdo9Rez7tYVWw RV4bTgPl8Va3klM56T4g/dY4sYipQFXDDjMQn9HMpvk4QriTEEcnpetQ3jF8Arbo kstPwb5Yx/6goJTUtpnukC3tPLzrhmeTNIl/zH+BuHt4rlsFT6KeNe9Oa9IDN3rt BxoWyjnd5cqn4sKPl17gsK6ffGnMqtoCAWhioIBjsWoIXaqcCFYzC6bcjH8I3oT3 5Gmuy8pXdxTwp9Gu4/gxg4zlh+tuGZQDSufoRczcnmjOIzNuuzQ= =Q5N4 -----END PGP SIGNATURE----- --QRj9sO5tAVLaXnSD--