From patchwork Mon Jul 12 06:11:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 472854 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2647457jao; Sun, 11 Jul 2021 23:29:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0JPlU53E9x7DMaNJig6hJlq+9KHPtCB9DvznrBzZhsxAjq8aAHGZqzSujt1AwQ/7weTPQ X-Received: by 2002:aa7:d15a:: with SMTP id r26mr4676170edo.172.1626071354416; Sun, 11 Jul 2021 23:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626071354; cv=none; d=google.com; s=arc-20160816; b=BFqkbZfrxxy0oPnsKn/R8qZWGXX6DfUAatRGrbWKUzGBQpelebXFfGGolss3xZ2Tpo DbMBzB4ICx750pa5lZStjzO+QFzCLeLzwVfqAZvixWsCO+iMFb0CS9kqiQu3zlHuCe21 jjJOXOCz8ojYIAz9ejLWA9pkekR8gfP4DTG31TJmL7L1lO+9AGx2lURHOBmcsZYXYTt0 p9V/c3j3b0oMgh2/fKzZhDyqBRzBdgsmJZDKtUWd4zA3GKxBSGTlG3OP5NSIe/sfFF/y veoVMAG8Yqb2ysRh75ixoXaIrSA+TnhVR91WKq1OTnzlyMIL7d1Dvvl28QE4P28JVUfL QLbg== 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=WD/b/j43k4pSyEl1WiKlfOd4HtPj5A/u2mJSplr48PU=; b=r1YbuD6okf0kBLLsjMkbqTOPS5yIp2TTWYbUZtWdBAjprt50unDBIWi2iYLMBO62Dg cAZMryEs6XI//w421Z3sDpcceywzhIzuJ7oPzC7gf2UfrlPxLRdEdpH5QU5zJZbK5C8j q2ltPLaZ1ZvSCgk1LmAXKllcZSf0FthWhJWBIUY4VIn02VkmTbfHT4GmLHlZCnAfZ9UV nKy++SvxjYduyAxNRoqoxFCVml6OYA0uh2KzgJ4vsfA1/IIJ+m0Fqh/s36MacLGDwWBJ XkOC3ljWff9pLQWd3yjd8jiPcAplZd6i2fqWDIpdDFxiGayYlIwqGe9jRolEzyyESsNv NL8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=visb7aac; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bz6si16420285ejc.610.2021.07.11.23.29.14; Sun, 11 Jul 2021 23:29:14 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=visb7aac; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S235345AbhGLGb3 (ORCPT + 12 others); Mon, 12 Jul 2021 02:31:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:46026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235589AbhGLG3Z (ORCPT ); Mon, 12 Jul 2021 02:29:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EFCCD611C0; Mon, 12 Jul 2021 06:25:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626071114; bh=T17mdl8fyISICwO8xxKysf1uESl0cwNNSzP+n+riO5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=visb7aacc2zQXSqT+K5hi7/lrsNOtWITjEmHz01IezTQcgVLpBUpjn/x/yZ29PXp7 4wBJA1Gpu2resi9q19zQ+Juowv+Vm02hVHsfXejRjKB+jfN4Fdh0OV2wuzJdPRg43v vYvinQkkoYP1803XR0qZSos6+ftPzgEvPYKGxjqw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , Sasha Levin Subject: [PATCH 5.4 280/348] iio: cros_ec_sensors: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() Date: Mon, 12 Jul 2021 08:11:04 +0200 Message-Id: <20210712060740.805764585@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060659.886176320@linuxfoundation.org> References: <20210712060659.886176320@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jonathan Cameron [ Upstream commit 8dea228b174ac9637b567e5ef54f4c40db4b3c41 ] The samples buffer is passed to iio_push_to_buffers_with_timestamp() which requires a buffer aligned to 8 bytes as it is assumed that the timestamp will be naturally aligned if present. Fixes tag is inaccurate but prior to that likely manual backporting needed (for anything before 4.18) Earlier than that the include file to fix is drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.h: commit 974e6f02e27 ("iio: cros_ec_sensors_core: Add common functions for the ChromeOS EC Sensor Hub.") present since kernel stable 4.10. (Thanks to Gwendal for tracking this down) Fixes: 5a0b8cb46624c ("iio: cros_ec: Move cros_ec_sensors_core.h in /include") Signed-off-by: Jonathan Cameron Reviewed-by: Gwendal Grignou --- include/linux/iio/common/cros_ec_sensors_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.2 diff --git a/include/linux/iio/common/cros_ec_sensors_core.h b/include/linux/iio/common/cros_ec_sensors_core.h index bb331e6356a9..a321531539dd 100644 --- a/include/linux/iio/common/cros_ec_sensors_core.h +++ b/include/linux/iio/common/cros_ec_sensors_core.h @@ -68,7 +68,7 @@ struct cros_ec_sensors_core_state { u16 scale; } calib[CROS_EC_SENSOR_MAX_AXIS]; s8 sign[CROS_EC_SENSOR_MAX_AXIS]; - u8 samples[CROS_EC_SAMPLE_SIZE]; + u8 samples[CROS_EC_SAMPLE_SIZE] __aligned(8); int (*read_ec_sensors_data)(struct iio_dev *indio_dev, unsigned long scan_mask, s16 *data);