From patchwork Mon Jul 12 06:11:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 472860 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2647989jao; Sun, 11 Jul 2021 23:30:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVBfAem8MkQztlA0OXbyQtYFWj76c+AHnh0tKtfwYS2cykzRUq87v8gqBUGwz+O1YIYodV X-Received: by 2002:a17:906:2d51:: with SMTP id e17mr50256286eji.500.1626071404015; Sun, 11 Jul 2021 23:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626071404; cv=none; d=google.com; s=arc-20160816; b=JXauc0etfo5RaSHbyRnaJCqPM8fooXkmuDjJpFxKP/zk+M8xnBJ6qQehzZgC+c5a/b 0B1Yqk6doztbNGg2+0Udk4TqUSVWiWHLqaU7tUnT+FaMmp6QkDnVGjz4Cf4cYKMHtnS/ iSkxmNr7udEErR/wwC2H2qSc8cRLEra0SjPBAxIQZqUE2VVoDt1e5gFNbvQR02M7q0lh FRm57LHLnmx/Jf4ebODnpSWcjmJkJ4yFci/3WGbe/7nmdJ5KSYMbSIE2OxKo5sWV8nKN GrWGbOWrE3cWXVDjJaP1ce+hrJTiM/25XIzq6vIIhgZYs+eU5eElX+XlpCVuusX+jvzk XOnQ== 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=d1Mi6L9i+8nmS6a83Xwg1lVZzzmJp6Jxwi4i1mjhcCY=; b=0RtI4KZhfvG+1KVlt99bN05To+56bc1dexx0ikj3f/X35nRUDrWwNgyBKr1bX7GqpS EyU+6Kq3JMRZSaLbXgGfWwl9awaaU5aVVZr6DxMwpSA79uelolDPuFlBE3X+QZi1ZqDn t4aCAbFGwvLYU6JoAdv+wc/dfedzMbFbjHL17pWKBOBbLazOQUVutKb683RHqHduBp4H sWxWfi/baUPBMewNcL66sLaNfa9NKA6g7wEX36xaKciCthzVsh5PhSsE3RWQpiCVCUhb oo/KCDgZznZmECnTlebzXSlLUxfnTuo61Mx9V8ndezb+Rr8KYjcDQaOCF2IiOxkwtdfG 44EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XdvOjOLj; 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.30.03; Sun, 11 Jul 2021 23:30:04 -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=XdvOjOLj; 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 S235672AbhGLGcn (ORCPT + 12 others); Mon, 12 Jul 2021 02:32:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:45560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235984AbhGLG3k (ORCPT ); Mon, 12 Jul 2021 02:29:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 107DB61222; Mon, 12 Jul 2021 06:26:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626071186; bh=ZgDVehS7PBXEkbIjEtENsGlp/DtIxWkRC5NHO99WNQg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XdvOjOLjhwJq42rN6SdGsqyCjUY1WCEQWUzKUkHpvY8wiqsNE5XR2ltspbrwWp10g Ey+sw1j+dE+gIXCxHLbcKxrItCmt9MA6OoGxP5QwV49ewP7x+6ZQ6hz1aDWo4aMk9Y 5uCihZ+dUQLCvwS/w1oo2FL4X72brPNbu2nNnbj0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , =?utf-8?q?Nuno_S?= =?utf-8?b?w6E=?= , Sasha Levin Subject: [PATCH 5.4 312/348] iio: adc: ti-ads8688: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() Date: Mon, 12 Jul 2021 08:11:36 +0200 Message-Id: <20210712060745.264509521@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 61fa5dfa5f52806f5ce37a0ba5712c271eb22f98 ] Add __aligned(8) to ensure the buffer passed to iio_push_to_buffers_with_timestamp() is suitable for the naturally aligned timestamp that will be inserted. Fixes: f214ff521fb1 ("iio: ti-ads8688: Update buffer allocation for timestamps") Signed-off-by: Jonathan Cameron Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20210613152301.571002-5-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/adc/ti-ads8688.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.30.2 diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c index 14fe7c320b52..55a2d619d6dd 100644 --- a/drivers/iio/adc/ti-ads8688.c +++ b/drivers/iio/adc/ti-ads8688.c @@ -383,7 +383,8 @@ static irqreturn_t ads8688_trigger_handler(int irq, void *p) { struct iio_poll_func *pf = p; struct iio_dev *indio_dev = pf->indio_dev; - u16 buffer[ADS8688_MAX_CHANNELS + sizeof(s64)/sizeof(u16)]; + /* Ensure naturally aligned timestamp */ + u16 buffer[ADS8688_MAX_CHANNELS + sizeof(s64)/sizeof(u16)] __aligned(8); int i, j = 0; for (i = 0; i < indio_dev->masklength; i++) {