Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3124838rwb; Mon, 15 Aug 2022 18:44:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR68L3hDwXJ3FDi66j2YD0oWPB63Tb42cJyRuJf5SMmSXFk32S9KHyNct0pnkaEYyKdgb8jd X-Received: by 2002:a05:6402:35d6:b0:43d:c3b0:1206 with SMTP id z22-20020a05640235d600b0043dc3b01206mr16825772edc.415.1660614292491; Mon, 15 Aug 2022 18:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660614292; cv=none; d=google.com; s=arc-20160816; b=ysWPiIsd3c289c4OUFvtAY9SlLbD8t1IhsjabT/AeFWK6V/A6gK//0Y4KWCGhj15qf P47r9CBNvTONI1C0iczsfLZCLkQ57dNNJWIdH4fWpJDD3qY1/gc/XNhj/s1XTC9SxDnm hKBtI0T6uO8hD+ChxJVfKEFzoAtRJi3J9+/7ge0I0A5eCO+f9EydEe0BMkYP0WRLZYPP cat3vxKFqhbgHHve0bS/uMVZD5flwbZX9GEi8yT5MZeyXNEWtOwJGK08hKnH5Tl1SwT0 iBqWMlhqQjFkMyKGFEk95yOolGd3whEVGA7tzlDHgZYth0Iphom/5shm9eR7ebbV56m3 l8ow== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HIpYLdnQm/x9OJwGNd+cEPgGLBio+R+pAhdVYCJgkO0=; b=MaglaZPVixaUs8S5jFURnO95w74+MxcMTiPk+HtXX/lkX66QYERkj+d9/oDKIcQITL waANBMfV9njWm0llo29z7LDrsLIGhBHwPVyrZLjbEhVA6xMZrnktSQmBbs3X/e108Eft OZ+uIrc8QzzjOeyvgOl6uJU4Gub7AyxByAWZexe3I/YBZP01lGvPDxup9ygKrQEuudT5 nLp3/GRZIL6dx5YMsn0uqpTWCMVwtEvV9RneCBhvu/R/YEEGEVUMoAztWDaYpQ33OiXO 0qERYAptZ8RdQvcPVbDQWiC/LmWWVGhtCXlgJdUKT8ySOrQHTTAOEKKcTP6TAw7HCB6N 7lhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Coybwr/N"; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z26-20020aa7cf9a000000b0043cdb04b9f1si7228869edx.411.2022.08.15.18.44.27; Mon, 15 Aug 2022 18:44:52 -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=@linuxfoundation.org header.s=korg header.b="Coybwr/N"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355786AbiHPALm (ORCPT + 99 others); Mon, 15 Aug 2022 20:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356481AbiHPAC1 (ORCPT ); Mon, 15 Aug 2022 20:02:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3D73161017; Mon, 15 Aug 2022 13:23:40 -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 5960560F71; Mon, 15 Aug 2022 20:23:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4921AC433C1; Mon, 15 Aug 2022 20:23:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595019; bh=pDQAiluEMFznMnl6qm26vpua8zn+CoKeaErTyh8RvIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Coybwr/Nm55If6dNXLBT2KF8M0N9zgzR9X6+yU6NlrLOiuNhjhQXKyxHfxDNZFF7n 2hUec21780P7Ui5KKLjwWRxj9upZL6auXRHvSPCpoSyFm6sGpp2Er8zPhazk9zZjgg +lkTxwTwP+AdyD0wWlskj7MoE5VUNuLPXtPjkl5Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , =?UTF-8?q?Nuno=20S=C3=A1?= , Sasha Levin Subject: [PATCH 5.19 0632/1157] iio: accel: adxl313: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 19:59:48 +0200 Message-Id: <20220815180504.971801232@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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,T_SCC_BODY_TEXT_LINE 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 From: Jonathan Cameron [ Upstream commit f68a0445ee86e48dafbfdea50163ad6fc6dba268 ] ____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á Link: https://lore.kernel.org/r/20220508175712.647246-3-jic23@kernel.org Signed-off-by: Sasha Levin --- 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] = { -- 2.35.1