Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1492803imn; Sun, 31 Jul 2022 09:04:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sf/xIgDl/WRB/5K7izch0Am2Z6BMAagGGz4ZdVjBmHYSVLdYek9FiXfzUTQwX66SuPNf9o X-Received: by 2002:a63:d0:0:b0:411:f92b:8e6c with SMTP id 199-20020a6300d0000000b00411f92b8e6cmr10211485pga.108.1659283444665; Sun, 31 Jul 2022 09:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659283444; cv=none; d=google.com; s=arc-20160816; b=Rk9wgWnZDdIPPqyOBBAbfCmoZryy7UaFQ1fMjk/xXBplgH4a6+/l3UyyCJ4l/4Ic/m eemHlWBJ0PTDn7++FdpsUK77Gu5joH/a3BWs2IibYI2BmL1SGassZDeXBqzSUvX8gWGW oC0j1G5ZXIqJULaExBE1tGQqOWbuc2V5uTiHcG27DZ4Z7igUWq8BRKDZ/kj2ihrlN/Id 3xufOiuYC35x3K9iyGY5EL6aIwv5ya0sA+qeCmvDJXVQpRjBZy1OVWdbnwYq/3xk9i3f OO/TmlogExxRP+ci14msms+m+6E+3d10/hrU1St/R+GYXF2kqanWKhVYaW/ur4JQJ5Xb w9+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=19heD9oCiSyHMhTcahYHVfK3jO7HIIVPc5nGEpSn1Lc=; b=f7fCBeLKJQIycNKla6m1/Cb8HsUvgZMZVCc3yl/2oqPbWIo148bRCQV2LBTUhlZ2kT L7MNF1DPRW+kYj2x8nNWwbBpCKSIDwh+BEHzHw1TwRs8CanuCKVIsFP5/xHhtulJGVyf CCuSepbNoi5Bq5/C7qQWnY2dsSP8NnBMPSOhi5nDkjlLvlQDR75c/rMBltt2wRql+Don Z/BSIhvEug9+TnVgpvZ/jvDev0vCv2SjoXPDkqG2VPgwPuV3yHFcF3PSwj9YQZ9r3grH usNPme8bIaKRRnYqo7i5L7Nbr01k64hUycTY5YAuCr8S3mMC1yDDYhTwzR/w98Z6ukBd 2cEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tu2gRR8n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a056a00191200b0052828437202si10238210pfi.144.2022.07.31.09.03.50; Sun, 31 Jul 2022 09:04:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tu2gRR8n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237464AbiGaP5i (ORCPT + 99 others); Sun, 31 Jul 2022 11:57:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237055AbiGaP5f (ORCPT ); Sun, 31 Jul 2022 11:57:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 912E6F5BA; Sun, 31 Jul 2022 08:57:34 -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 ams.source.kernel.org (Postfix) with ESMTPS id 3E24FB80D11; Sun, 31 Jul 2022 15:57:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFD80C433D6; Sun, 31 Jul 2022 15:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659283052; bh=2Tx7WBqhR2Aw42eMMqAo9G23wcNrK9di5KicstE97W4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tu2gRR8nkLaFIIEVG8liBcMmpIp3NlfGh2b8dbTQyYAWqoMse+dXCSPHZHr18zBiQ K0QabxkX02DYH6WKACwm2S/jd69B4F/AUv3CtMeiNf9+w+1csTKmSHqZDd+4fSSpuV Lk2PD+cwfN3Bfm8oOpBITASE337s+P8810LEWKAlpi66ttHAGETrdufnl/xxMh7cHd 9iSZ4Fjy/6Knest+GnFCr5MMiPs2hIahquQSsRW2USroVc6+gO1cgKR4bnHvz2pHwZ dLdiWw2z3Dshq5FFMFRws5ScI432UTYhstKIAPutTliVcFxMnXcpmql5Qg4q9PgCLb 7sLC3a0QhYbIQ== Date: Sun, 31 Jul 2022 17:07:43 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: Angel Iglesias , linux-iio , Lars-Peter Clausen , Paul Cercueil , Ulf Hansson , "Rafael J. Wysocki" , Linux Kernel Mailing List Subject: Re: [PATCH v4 3/5] iio: pressure: bmp280: Fix alignment for DMA safety Message-ID: <20220731170743.238e0e8c@jic23-huawei> In-Reply-To: References: 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 X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 25 Jul 2022 23:08:47 +0200 Andy Shevchenko wrote: > On Sat, Jul 23, 2022 at 7:40 PM Angel Iglesias wrote: > > > > Adds a DMA-safe buffer to driver data struct to store raw data from sensor > > > > Updated calibration read functions to use DMA-safe buffers as well. > > In this case, as calibration data is only read at sensor initialization, > > the buffers are allocated with kmalloc and freed after being processed. > > > Suggested-by: Jonathan Cameron > > Jonathan, maybe it's easier to fix in regmap once for all (something > like a new flag there dma_safe)? Also a side note: i2c doesn't need > that, since it has its own implementation. Possibly... Not something I want to tie up with an individual driver though as it might take a while and be (somewhat) controversial. Nice idea though as, if a bounce buffer is needed for a particular regmap operation it can implement one and when not, it can elide that step and just use the provided buffer directly. Jonathan > > P.S. Use sizeof() in regmap calls where it's appropriate. >