From patchwork Sun May 8 17:55:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12842677 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 1A783C35294 for ; Sun, 8 May 2022 19:17:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231745AbiEHTTO (ORCPT ); Sun, 8 May 2022 15:19:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239024AbiEHRxT (ORCPT ); Sun, 8 May 2022 13:53:19 -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 B92EADFC5 for ; Sun, 8 May 2022 10:49:28 -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 57DB361286 for ; Sun, 8 May 2022 17:49:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C11EAC385B0; Sun, 8 May 2022 17:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652032167; bh=MNILr/698CqUCCRc19KzpGOrNpQIZh1XAlt7SwwDDAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dk10G8T0QFHamnIbXyX1A+cXVtr4xv16ZsxCiY8RvI98P554VN6UGK5j/8haLJzpl A+Fd2N6ClHjqVAE447vK4PcLusOxZ9zec4OlKwgPNrbqbnl8IhnOXO2yFzMnGMRG1N MSwve/m534wC6blrGxi7/S5BCMRsmDx29vIYQD3r75nGKCC8DDq4GuADNGVqH9Q8mg FKK/5xD15jM/Li4M2MAGt+6rrRC8DYtA8xGB5CGZcTQABgg0sTPfJhyUmdWBJ870UP 60KW8oUJee4tJ2EybiajvGq/s216xvoqgHkNi0aNArPEpTindyMTN5mewhHczLgnuu lubPSLU73OYlA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Alexandru Lazar , Akinobu Mita , Alexandru Tachici , Antoniu Miclaus , Charles-Antoine Couret , Cosmin Tanislav , David Lechner , Ivan Mikhaylov , Jacopo Mondi , Jean-Baptiste Maneyrol , Lars-Peter Clausen , Marcelo Schmitt , =?utf-8?q?M=C3=A5rten_Lindahl?= , Matt Ranostay , Matt Ranostay , Michael Hennerich , Michael Welling , Mugilraj Dhavachelvan , Navin Sankar Velliangiri , =?utf-8?q?Nuno_S=C3=A1?= , Paul Cercueil , Phil Reid , Puranjay Mohan , Ricardo Ribalda , Robert Jones , Rui Miguel Silva , Sean Nyekjaer , Tomas Melin , Tomislav Denis , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Subject: [PATCH v2 02/92] iio: accel: adxl313: Fix alignment for DMA safety Date: Sun, 8 May 2022 18:55:42 +0100 Message-Id: <20220508175712.647246-3-jic23@kernel.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220508175712.647246-1-jic23@kernel.org> References: <20220508175712.647246-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron ____cacheline_aligned is insufficient guarantee for non-coherent DMA. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 636d44633039 ("iio: accel: Add driver support for ADXL313") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá --- drivers/iio/accel/adxl313_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/adxl313_core.c b/drivers/iio/accel/adxl313_core.c index 9e4193e64765..afeef779e1d0 100644 --- a/drivers/iio/accel/adxl313_core.c +++ b/drivers/iio/accel/adxl313_core.c @@ -46,7 +46,7 @@ EXPORT_SYMBOL_NS_GPL(adxl313_writable_regs_table, IIO_ADXL313); struct adxl313_data { struct regmap *regmap; struct mutex lock; /* lock to protect transf_buf */ - __le16 transf_buf ____cacheline_aligned; + __le16 transf_buf __aligned(IIO_DMA_MINALIGN); }; static const int adxl313_odr_freqs[][2] = {