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 6B3A1C433EF for ; Mon, 20 Jun 2022 16:42:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239979AbiFTQml (ORCPT ); Mon, 20 Jun 2022 12:42:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238812AbiFTQmk (ORCPT ); Mon, 20 Jun 2022 12:42:40 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ADFADFC2 for ; Mon, 20 Jun 2022 09:42:40 -0700 (PDT) Received: from fraeml702-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LRb202fbbz67MmR; Tue, 21 Jun 2022 00:38:48 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml702-chm.china.huawei.com (10.206.15.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.24; Mon, 20 Jun 2022 18:42:38 +0200 Received: from localhost (10.202.226.42) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 20 Jun 2022 17:42:37 +0100 Date: Mon, 20 Jun 2022 17:42:36 +0100 From: Jonathan Cameron To: Andy Shevchenko CC: Jonathan Cameron , linux-iio , Peter Rosin , "Michael Hennerich" , Lars-Peter Clausen , Vincent Whitchurch Subject: Re: [PATCH v2 05/17] staging: iio: cdc: ad7746: Use local buffer for multi byte reads. Message-ID: <20220620174236.00002543@Huawei.com> In-Reply-To: References: <20220619185839.1363503-1-jic23@kernel.org> <20220619185839.1363503-6-jic23@kernel.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.42] X-ClientProxiedBy: lhreml748-chm.china.huawei.com (10.201.108.198) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Mon, 20 Jun 2022 01:00:23 +0200 Andy Shevchenko wrote: > On Sun, Jun 19, 2022 at 8:59 PM Jonathan Cameron wrote: > > > > From: Jonathan Cameron > > > > I2C does not require DMA safe buffers so there is no need to ensure > > the buffers are in their own cacheline. Hence simplify things by > > using a local variable instead of embedding the buffer in the chip > > info structure. > > ... > > > sizeof(chip->data), > > chip->data); > > How will these compile? Or am I missing something? Nope. Something went wrong in the rebase. I should have rechecked build patch by patch. Later on, this code is factored out, so I guess that fixed up the build issue. Will check properly for v3. :( > > > - > > if (ret < 0) > > goto out; > > > > - *val = get_unaligned_be24(chip->data) - 0x800000; > > + *val = get_unaligned_be24(data) - 0x800000; >