From patchwork Mon Jul 12 06:11:39 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: 472989 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2684589jao; Mon, 12 Jul 2021 00:26:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQYc8JZDtTRg7yUkR0I05OLLnV6dwyxsB1og/rgYO+sbfbzsQzc04MxBaL/b8VJTTE1s6p X-Received: by 2002:a05:6402:280a:: with SMTP id h10mr46857638ede.87.1626074676242; Mon, 12 Jul 2021 00:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626074676; cv=none; d=google.com; s=arc-20160816; b=dEq6ZSHYE1puhg4j36qAzjrByehtGUW2Ty7UN/FkpozQPZlywyIF+8swGX6ZidNLM1 tgJraBBnEYkmC2TLHrW8vb1DdtYlpM+r/+pdeOX1loaMsD2+xdr5PlWVCCPx10R7zwKA hZY/EZsOWkYkKV0HsurJQe/fD8RgSeIlqEAUZFSrpto83bGnMmz70/OX11rIVrlhMtmd 3wlgEuxwnBxw6OXkzY738R2o5AHJpeBocC/wyl7Z69KdIqiXDsmxxbYGD1z//QerPCFj sv5TX6leLEnO9hGfKODb2Vt8zbl2vkRN9Ln2LV1lMXbcFH1weN+lKLJAmVPLXr4ADMdv 5MIA== 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=V9xkxejIojY8r+QHwZNSlbQaGDpZmvTjQ1i4xIGGJVk=; b=WsSJOqezheNPHxWztLNs8UiwDPYfWZWdbFhm/I3wOgecMiJOd3D5wzb/nN3l5vOr88 pPS9cZ305q2Enx/IhpkG+V29rOp5l9SJo6e3GgSsgaqZFUHQ87N+rWDZa0a+OeM4Azxx Nzrki+OnUIW0L0kexfJlNQclDVUJXK/5bKkxpGCa3eSkK+KDNVQUtTGdWpUXfmn2ITEk BFrey67Cn/DxkyvW2Btjd/k7YN9DkIrWd2LWaNjxZXzDAYVwGomxku/nlk+HZ3z25YKF +loea6HS53nZ0ERHahi28CWZrsB2cstyUXgCUav4SrPxtGbFDaQ3N6X1PfyVK9X3CFuz nSYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qZfhBxEF; 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.24.36; Mon, 12 Jul 2021 00:24:36 -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=qZfhBxEF; 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 S245538AbhGLH1P (ORCPT + 12 others); Mon, 12 Jul 2021 03:27:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:33388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345346AbhGLHZU (ORCPT ); Mon, 12 Jul 2021 03:25:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BF30B613D2; Mon, 12 Jul 2021 07:22:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626074550; bh=vBbUJ1KOM+k1JuZjtSVaPmtW/lBhC0FJdTVBRm1SK3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qZfhBxEF2v7rpJ4LzpMSaSUvKheyij7BjqAyeHhPg1S/b8O8QuCKhaY8xxsjfKl1+ Fld3zslydN97suy+M916c5FAR1QrrCA9SdbowGZAg2/e050rAGggmVa0R/UJWfSKnG JTu28IY/SdNfBrGXM2axWMx6fT4WEPuBhXNkb588= 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.12 616/700] iio: adc: ti-ads8688: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() Date: Mon, 12 Jul 2021 08:11:39 +0200 Message-Id: <20210712061041.413400885@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 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 16bcb37eebb7..79c803537dc4 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++) {