From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C1A5C3DA7A for ; Wed, 28 Dec 2022 10:10:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232653AbiL1KKH (ORCPT ); Wed, 28 Dec 2022 05:10:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232926AbiL1KJn (ORCPT ); Wed, 28 Dec 2022 05:09:43 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA893A450; Wed, 28 Dec 2022 02:08:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672222137; x=1703758137; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=vlGFk52c6fwenbIHOMMEAFBo447s9Ad2k4HOo/x70Is=; b=LkXR1XlqSJyd+xXqoGtRT3Pq23jNp7Hlc7t2IcXC//vzyCZkVVbqOdya Ef9gIqG3t5PRwK2O6GimOhqRjAIqfQm+ACD0X5rBcePg+p/HFUZHNPc57 KMp6lbQI0LUQ6mrOfGin8mz1k6mEcuwCa6v7kH4pIWaEDzC1zCrcAYJNE 9BXh6j7uPR1QYLyeNnI//D2gzCNpbja6dH74QKnJ7kgol3zutSEF2TAYp S6x7DuRC8QBUDUgomMkXTUyyjHZwc9+C3ZtnvXtr/s5HgVftEP5+wQsF9 I7ONnigHP9eNuFkf9ip4vjx7RpIFAc8jlV7fMgV7IBXzM0cCt3ZTONISb w==; X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="322079897" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="322079897" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2022 02:08:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="827362693" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="827362693" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005.jf.intel.com with ESMTP; 28 Dec 2022 02:08:55 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pATMj-000Wjp-24; Wed, 28 Dec 2022 12:08:53 +0200 Date: Wed, 28 Dec 2022 12:08:53 +0200 From: Andy Shevchenko To: Jonathan Cameron Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen Subject: Re: [PATCH v1 1/2] iio: adc: ti-adc128s052: Use get_unaligned_beXX() Message-ID: References: <20221214120202.4658-1-andriy.shevchenko@linux.intel.com> <20221223151750.6cb55f12@jic23-huawei> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221223151750.6cb55f12@jic23-huawei> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Fri, Dec 23, 2022 at 03:17:50PM +0000, Jonathan Cameron wrote: > On Wed, 14 Dec 2022 14:02:01 +0200 > Andy Shevchenko wrote: > > > This makes the driver code slightly easier to read. > > While at it, use GENMASK() as well. > > > > Signed-off-by: Andy Shevchenko > Hi Andy, > > Patch looks good, but it got me thinking. Why not just flip this driver > over to using spi_write_then_read(). Would let us drop the DMA safety > protections and simplify the code + use a __be16 as the read buffer > and this would then be the slightly nicer aligned form. > > Worth doing whilst you are here? OK, I will consider when I have time for this. -- With Best Regards, Andy Shevchenko