Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3020422rwb; Mon, 15 Aug 2022 16:17:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR5H0ussuHQ8+xWOeIw48+KuzwEZQp8RrVkZLgtl+Pcq/KWVH3Eahi4jOXC9J7fTnei26m1f X-Received: by 2002:a17:90b:b03:b0:1f3:6fb:bd20 with SMTP id bf3-20020a17090b0b0300b001f306fbbd20mr30827972pjb.38.1660605451845; Mon, 15 Aug 2022 16:17:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605451; cv=none; d=google.com; s=arc-20160816; b=t1qBDhZY4FOKbwWDL5T7BXks0kThP/mKnEd4/AgcPSnlg1hA0FVbXa9i9T9tapS6BQ /A8xDwsVMdlLP3j6e1S0bOtnw9NQ0TQcR/8/0kNTVLXFkN9C2n2r/8y04G+WbiO1IIVL Db9/7ndtYk5PtvmV9pmOg4jKFGjfO41Eir3BLXu0JQFBH56fSmO6/zHnHH7u4yXEDrs2 jbKUiEs5cQLX7rh7+lc1xmx6DG0dE7tqrotsvVM3ySH2zeMG5ziNtXROsU6luvggLvrq c8z7zHaLt6+uef1Md2NJPh63YFBlcSWmwityTrxGtF729Cg4fjGPOXEGl/HWzPXwj5YI waUA== 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=bWR+xTGuR2giwqxtwYGJ3KOqOOkuY8w9wa0lqETCN+E=; b=h4EPfIoG4fDTwjIsF29edeDy3IixSAza8LxsixjkXZUHbsuuo+zXs0Ql10cxV9Jzqk yxix+qeZbKqNKa8LMHy+4bsmKgNHW3S+OFuDGi0w6XyLYkb/s98nwSUKhdDJWTH5gExv PJtW7Dem0hv6+2pFiE79Irr+juo0r64rU6TzLSz2zpN995KrBm6EX+hQOgnxS5Fen8PY w5RRMMSR3Eqteeun11AJ6Ml3n2u58AWeC7DYS63wlKYes6xWvNj+B15lk4U9BM/sms29 StpVSl8GeHH3Z7T2RbfRntk+bBdVKWVGfCU1zVu1V1D5tVXjr3TytA619k4q9HfUhlZ/ qS+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mQpSKHu3; 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 s5-20020a656445000000b0041c0c9a13fcsi12771617pgv.98.2022.08.15.16.17.20; Mon, 15 Aug 2022 16:17:31 -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=mQpSKHu3; 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 S1349394AbiHOVnb (ORCPT + 99 others); Mon, 15 Aug 2022 17:43:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346299AbiHOVjh (ORCPT ); Mon, 15 Aug 2022 17:39:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB0E33ED6B; Mon, 15 Aug 2022 12:28:32 -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 95821B81109; Mon, 15 Aug 2022 19:28:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE338C433C1; Mon, 15 Aug 2022 19:28:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591710; bh=XVTACl5lEivz5w/igqkLXPqt+lJ92BfMNTk1diWpk6Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mQpSKHu3eGGxvN+ect4O5qQe6ya9rnmqhV0jRt3lgg3TLv4hDY8A7mwxqnJjafArQ hUTwpxKpA/rXZgM1cKS1EZmF1iJigKSW2GgLNTdX9TypHz2+rw/7EZuUVOuE/OmBp0 MdEQifDKZ71ovaq+s0NBtJQhE63qvcfBU91I9TTY= 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.18 0668/1095] iio: potentiometer: mcp4131: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:01:07 +0200 Message-Id: <20220815180457.020765118@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 4842e5de6f39ebf2c0f6da9e6a0cb751c7108507 ] ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_DMA_MINALIGN definition. Fixes: 22d199a53910 ("iio: potentiometer: add driver for Microchip MCP413X/414X/415X/416X/423X/424X/425X/426X") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-85-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/potentiometer/mcp4131.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/potentiometer/mcp4131.c b/drivers/iio/potentiometer/mcp4131.c index 7c8c18ab8764..7890c0993ec4 100644 --- a/drivers/iio/potentiometer/mcp4131.c +++ b/drivers/iio/potentiometer/mcp4131.c @@ -129,7 +129,7 @@ struct mcp4131_data { struct spi_device *spi; const struct mcp4131_cfg *cfg; struct mutex lock; - u8 buf[2] ____cacheline_aligned; + u8 buf[2] __aligned(IIO_DMA_MINALIGN); }; #define MCP4131_CHANNEL(ch) { \ -- 2.35.1