From patchwork Mon Jul 12 06:10:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 472987 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2684066jao; Mon, 12 Jul 2021 00:25:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3QEbvdjr4YWE9gls0dPH2Z4lCyNGPXlPA0erSPPt+9oFqzAMUjPJuCmgk4kFRpmJR1IOe X-Received: by 2002:a05:6402:28a1:: with SMTP id eg33mr63388951edb.249.1626074599181; Mon, 12 Jul 2021 00:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626074599; cv=none; d=google.com; s=arc-20160816; b=OeKr/qp/g0HUdFqnZM4iq2+ykSOgMixq3MUnTG9jKJNxBiEsFGbrqvryhA3PbB2bwo buChe+wqAeyia3gDVhWz0jkeXjtXWIGR9zootDbMhhIez9KtrbUGmIb9+XApCUdRxcpY fAgfHDe11a7x9YPQGgnP14L0seNgYacsazF8xzi5E8DoJWMLvF7I62fRVdOxgyLrqGKw jc8Mes81zwoUpdzGC7FZZctWAbROrai420YQDEKYBXL1/+BydRW6zzr+w5OnAfA/09cd mEtjzkGnlRj+mtjdUfGL5b2Sd4B3heIwqCcYbMx+2M2SdTO2HKe+xQ6ehVARzpdknHrH aFFQ== 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=OYBxV3+uyHsQrqRr7WHY7bvo+nlaqynxdj9GOR4kMO0=; b=Upg2lyPsu2NEuVGt0nESmrS+lWv6sw8f7RoEhBEyHlSQuzYRWm83+yxEqtW5HCXCGd 5VCNP9DWMysZWqd5Ov4/6PnCgysCQE3M9ZQcWZ2y9saeURghJ2CbhRDzpbewFKkGmyjX I5TYZT5DcRuhVXcvLZ3EM8nKJKzsQfN7wuoWhb1ICqfBnydfP4T/0NPbBxiX4G/jH/0b 1i4xwE73JmiQkJP4znbxSeMlUET3kTzJNd7/51ZjVDOhrFpp2dgcNvtPaemiboj0c8hW BNAjN+ZVI5LjcsgLXCn75P4WVOjBWIheMeEDuKI6ZeT2KkCviHbfAxT7xqLV8YcUfSxe BuFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YTjl1FJT; 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 d9si16909677edq.169.2021.07.12.00.23.19; Mon, 12 Jul 2021 00:23:19 -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=YTjl1FJT; 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 S244878AbhGLHXf (ORCPT + 12 others); Mon, 12 Jul 2021 03:23:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:60556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242138AbhGLHWD (ORCPT ); Mon, 12 Jul 2021 03:22:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9410960FF1; Mon, 12 Jul 2021 07:19:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626074355; bh=s5UggJJEWOO+8gC4srYh9VAdDV8ssDPtUY6Bb8+qKZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YTjl1FJTkAuDndja0NcVR3tG7UN3QICXbx89lvcjYdxJVB6uHs1KEDz7i5OXu2hqm dMaZEgbmhKKhtNzYAU4bzytqaI/GW8C4jvWzO/oNtLO/KrVH73cXBWRHR6s2mHXY2Y M1KQPYhBMRc9A88S0bD9BP2OO8V0H4wfTymeAjCk= 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.12 552/700] iio: cros_ec_sensors: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() Date: Mon, 12 Jul 2021 08:10:35 +0200 Message-Id: <20210712061034.994361335@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@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 c9b80be82440..f82857bd693f 100644 --- a/include/linux/iio/common/cros_ec_sensors_core.h +++ b/include/linux/iio/common/cros_ec_sensors_core.h @@ -77,7 +77,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);