From patchwork Mon Jul 19 14:50:12 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: 479948 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4243253jao; Mon, 19 Jul 2021 08:41:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWMTnLqkHNwIh6A+Db6DZyVvuOE54jY+C+/tTVoZw/yAlbHMIeSkKq4y1tVBeMsY2BfFB9 X-Received: by 2002:a05:6638:270c:: with SMTP id m12mr22514315jav.5.1626709294174; Mon, 19 Jul 2021 08:41:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626709294; cv=none; d=google.com; s=arc-20160816; b=FfXsAj0LLdU+Tt+jeHJyCBfSWOpZ0qgkUNgWoOz/KfIHogHDEOl9tMqd9+NSvF1Gja vurK2bU2ljr76GitK8kzbLQ7s3XF/Oo7hjluD8AddpFeWrfq425fsLrPMvP8EvetHg/M 3nTwhWNxTT8bJkvaSSkYdhJEW2sdU6zby1Mrb+4gIjoCF2GeBns+A7G0Q+IiaQNIqVee 9PhZrFIpv9ZIbwbRFelAjNP5joeajuZM0FXXq/dP9x1IFQCrbw9TKDlGOjcBbnoamEEY bTLbc83Fg4k7Vr4HBdFjW6QeNO3c6FiH1392Aonv1SOLE+IagVITDBR5UAxliadZxkyi a8zw== 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=clsYCeAMGoY490ao8zSJcjr+pM9GamHVI2bMGvroDVc=; b=Tcf0EF7EJpszw1l4mcmzBpdKUNQcLu274lDhJo/5F0ihIstPy4vs3aTyxvzh/oLWEj gXdbBmFlAhULMevhU5kKCcnD0E/lsfejqcWs6Ge852AtK5uCr1TrZqzgla2hPp99ajwV TDzeE9I6srDviqL6KmP/5xS4RKgnDVg3LSjTCoiox+U2OkxH8eJnMcTERCeyw4zK5Pcw uJmMc4mNKKaMCrwhKtzO/mQoonDqX6ZZS3kcTVr2HJs6PIRStBYa5uDIdZ02I1sJgVoz P1YUQRlg2srdepm8ActPjYfsbMIa2inkOBLf/avIfvHkrwNi0/1UBGXrq3RUDwC/tbv5 E7BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="hvao/d0D"; 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 ay16si21406520jab.96.2021.07.19.08.41.34; Mon, 19 Jul 2021 08:41:34 -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="hvao/d0D"; 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 S1345333AbhGSPAf (ORCPT + 12 others); Mon, 19 Jul 2021 11:00:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:52506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242714AbhGSO63 (ORCPT ); Mon, 19 Jul 2021 10:58:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2A04760E0C; Mon, 19 Jul 2021 15:36:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626708967; bh=UWK4/zr5ZrVbbtkGNiIgPDOwUyqRc1kXZ6w3sfBNic8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hvao/d0DV2zeFwfwscBhkgFlPXnuhGSvx1lI82HT/OUyVQzA50iZ19ySs/BF9FS1A gjb19deBO2ic4tpFIFRlFiy4THNLPXodL4tPSU2hEpPNMeh8aWF9Tgro8VOhy22Vgi bFk3Gl66lryHUPBIt5F4UCtheJEgqwvEg4uRmPjU= 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 4.19 201/421] iio: adc: ti-ads8688: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() Date: Mon, 19 Jul 2021 16:50:12 +0200 Message-Id: <20210719144953.345986553@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144946.310399455@linuxfoundation.org> References: <20210719144946.310399455@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 7f16c77b99fb..9bcb05897c9d 100644 --- a/drivers/iio/adc/ti-ads8688.c +++ b/drivers/iio/adc/ti-ads8688.c @@ -386,7 +386,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++) {