From patchwork Mon Jul 12 06:10:36 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: 472985 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2684027jao; Mon, 12 Jul 2021 00:25:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlndgi/8XcMzSB7qTHu9S/Rgjdb19bJkTgoG9zF/nSO+H9cUFJXMYjO8gWzKkL3iyCMZPM X-Received: by 2002:a05:6402:268f:: with SMTP id w15mr47430375edd.206.1626074599577; 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=E0zUfiBQi1DtG8Kd/3uGP6PXC+l12sS7SxK+3ttHpJdu4qZmnzDG23VT+l4XS6T1As OrG6Ny7Gey2K0Pj5bX6XFy04maRcFBF3DEixHPbCcdjlsW8FlMGgY0s3NUzAnWoC79Jh rQ2hhAfXblrujX9Er8zeEovhJ6adS0kbjF1PAAn9lrM7BrvKMy4yPP4k9xL3ttJ76XaZ SmmCD5Gd9SuQxNYs/1bNJ8o9TflhUzAH5TNr4P4dVoX1Qg2VMAK9jppZYth7q5pJ28My Ruzeftk2hK2/w/FbsszxoRlVsa00f6Sf+AJTkdatSHCHR9gGbMZZIs4AjoMZ3jxFEUuh xlJw== 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=HlWx6XW0BK/bRLNMKJ2K55VQE3IwqmLeu3D+QZZ5IYQ=; b=Veo7GzvRkhZ6Xx/Qt1XcLaX88Sf2NnrGyfnL7jJ3chMaO+O7Mtv37PPgUFdLjhODVb 70w+KACdo7fcKiDEO6hndDEFi5EVFqL9F9S4k57pnTUhW09ctYQ3ffGRxjRXPs2lbPlK G9sWqZkFT2xDc3x2qF+chhPY9s6EE5WSrSVczMYGshJ3AzANfAmFWTTlBqCciDZ/Lepq hhMYHsQ+w7VNOFUyPe1yhPkKWQVkDbdrB6LVhHqvrPkSU3rPFDwh+ivYK5wS1V4pbeFn FK+djcv5gKpO04g11xH2hdbPGPoAa8TH5r1IWaVgDz1xmcMfdm1lx9C4JSOskdLTBiyn 2I8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ve1JxdbW; 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=ve1JxdbW; 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 S244881AbhGLHXg (ORCPT + 12 others); Mon, 12 Jul 2021 03:23:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:60628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242207AbhGLHWI (ORCPT ); Mon, 12 Jul 2021 03:22:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A568B615A0; Mon, 12 Jul 2021 07:19:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626074358; bh=T4SOJDAGaGvBB1zOWOd+Gwxx6lJYSYyimlTfcsBfXXc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ve1JxdbWQT5544tV8JRQgljZHfVO/MjGjr7bIr3yUw6afPURNHZHBk4gIC+/6FMS7 KLDWqAnQjfc420Vo99gD8qfh0XKDHlqt2D3RQUR1jgHJb04gKgRYO2Wnk4Fvxmz+ES VqJnP2PWgTbApwqdol0Kl593jHrC4LZKfIrhM8fU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , Matt Ranostay , Sasha Levin Subject: [PATCH 5.12 553/700] iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() Date: Mon, 12 Jul 2021 08:10:36 +0200 Message-Id: <20210712061035.098984029@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 8979b67ec61abc232636400ee8c758a16a73c95f ] 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. Here structure is not used, because this buffer is also used elsewhere in the driver. Fixes: 67e17300dc1d ("iio: potentiostat: add LMP91000 support") Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20210501171352.512953-8-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/potentiostat/lmp91000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.30.2 diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c index f34ca769dc20..d7ff74a798ba 100644 --- a/drivers/iio/potentiostat/lmp91000.c +++ b/drivers/iio/potentiostat/lmp91000.c @@ -71,8 +71,8 @@ struct lmp91000_data { struct completion completion; u8 chan_select; - - u32 buffer[4]; /* 64-bit data + 64-bit timestamp */ + /* 64-bit data + 64-bit naturally aligned timestamp */ + u32 buffer[4] __aligned(8); }; static const struct iio_chan_spec lmp91000_channels[] = {