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 72ADEC43334 for ; Mon, 20 Jun 2022 18:24:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244220AbiFTSYG (ORCPT ); Mon, 20 Jun 2022 14:24:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242638AbiFTSYG (ORCPT ); Mon, 20 Jun 2022 14:24:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9544013FB1 for ; Mon, 20 Jun 2022 11:24:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2B2CB615AC for ; Mon, 20 Jun 2022 18:24:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75391C3411B; Mon, 20 Jun 2022 18:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655749443; bh=jpUofyi6Y7xfckXYM9209uEB0Qp67LTUjQ9HKJJ+4Ek=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aBVNHI+TRT244gOJOsKflMoTs1OCAS20GLJaMPUuD6mfRm8bOkyrFWIBlZGRq0L7y HMv5AhMqefJ8g2nrOs7bo7vpar/qbnZFZVogww1u9SPOavcur/tFl5R89dFUR1opJD s+ENlTbU/JWIneMC9ec7HEhWr/C9HRltBNeVrj5QHQw7goVoSckH52kzvFTgqHqi62 s1hhcZdGuIYzeFf8VffLRF491plN2C0ID7FlkhKMci3nT7HtWT926ksWxvDKbGweqo EbDQpQ5j6cUk9MzTEX8K902jbsgxX670bQ3INNYbvApIWpxbJMgs2hbZ9FcFCXd+Ss J/HyYuxBZfYUQ== Date: Mon, 20 Jun 2022 19:23:58 +0100 From: Jonathan Cameron To: Jonathan Cameron Cc: Andy Shevchenko , 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: <20220620192358.787faa92@jic23-huawei> In-Reply-To: <20220620174236.00002543@Huawei.com> References: <20220619185839.1363503-1-jic23@kernel.org> <20220619185839.1363503-6-jic23@kernel.org> <20220620174236.00002543@Huawei.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Mon, 20 Jun 2022 17:42:36 +0100 Jonathan Cameron wrote: > 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. :( yikes rebase went very wrong. Anyhow, will fix up. Turns out I as being an idiot and building with the roadtest makefile which doesn't actually enable this driver until the last patch. Jonathan > > > > > > > - > > > if (ret < 0) > > > goto out; > > > > > > - *val = get_unaligned_be24(chip->data) - 0x800000; > > > + *val = get_unaligned_be24(data) - 0x800000; > > >