From patchwork Mon Jul 19 14:50:25 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: 479899 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4226188jao; Mon, 19 Jul 2021 08:22:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUcOzzf5ACesR8kiVsxwVddbOEzeoUgjpHhaP20xRPwGzRdQBEdW2VsQk+X3ghv4WAVJ2L X-Received: by 2002:a05:6402:34c:: with SMTP id r12mr34609491edw.278.1626708134959; Mon, 19 Jul 2021 08:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626708134; cv=none; d=google.com; s=arc-20160816; b=xXf7q4MNN7uHqXSvDs5pV6g+/WXl27+VQL8Mrk1rmcedXwx9DLgbXZwBlMmcRNYKp/ sO1MjKGcFQ1Ek/1R+40zJL9axURwXyUcKglCzPykKZdk6hinWqrQvyMPRBJ54JgD1x0D JUdUxrAxiuQiD0sj3I6pwFTQXkfL9HWLFfyIZVz61zumNsFzbGRQONa6dmTFjjuuaWQ5 YOuwmvr8nRYOb8ZOuhXHiEGJfnqcwGiVhxKhvVKYtrXsvbiXeRkCqQCYEv4JxXLoIZhe Vc3Y3tPPieuYoJjvgqz8WH/RycZ6EvJQq4JG4kSROqH7yodWvVvIbWlYDLQ39JudKD/w I3Cw== 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=GQnKSe5Kwu3spte6L88NfzU/jOmoQuvuUFrBtlwc3Kw=; b=K2z1hMv78Z7jvNvoIpafqhrF4+cH8WAyzCUQ7LtoSGRfh367HNN0+IrLnhegG1PE/P 4gfHO/N2yC46oGIrrtzCiDjO/j9khza7xiaFX2GW27F/9zsR8p00e3q9fyfUUcqQk4S5 zvkJRTs15SCZxQMELaNgeO27l0HMmF21KLYeY3HZ5mGxfTQ7wdnPGr7wGzKoOR0B5Swo Zg3Ms01u0+obc6LkR668cmi3ai/oYq1C6DxVqIfyYNIrfEWuCgJaNkPHQ8ekL4Wp97KF uTdNqqnbnZgm5OfpvU8D1cgVmoOqN3sDti2DhlGrHmQhLMnD2iO4xm5dnjkxPlikoDcl 6VlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hxKzT8I9; 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 l3si24719878ejo.634.2021.07.19.08.22.14; Mon, 19 Jul 2021 08:22:14 -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=hxKzT8I9; 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 S244845AbhGSOlX (ORCPT + 12 others); Mon, 19 Jul 2021 10:41:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:56998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343913AbhGSOju (ORCPT ); Mon, 19 Jul 2021 10:39:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1B3A0613AE; Mon, 19 Jul 2021 15:19:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626707992; bh=JvAO8tsgmqGtVkRSsjkDDkc4T4YTXP4Vct3TxBMM/PU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hxKzT8I9AeliORoIqaYh1FFvQ8fKA5NjL1xeh5T2/lWyM+iGpJ83BHnVlXd0VrBXu BmIcDLrY9tfTgCklo7TsZHDf71x1VR1sknWetBYa7e9uk6UThQoq86i2n7Yvu5ICzU Q/OZc1ztuKe+fjvTTp/+4QNEMqAFlX4dJqAUoRbE= 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 4.14 136/315] iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() Date: Mon, 19 Jul 2021 16:50:25 +0200 Message-Id: <20210719144947.353865816@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144942.861561397@linuxfoundation.org> References: <20210719144942.861561397@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 afa8de3418d0..cb67edf53ab4 100644 --- a/drivers/iio/potentiostat/lmp91000.c +++ b/drivers/iio/potentiostat/lmp91000.c @@ -79,8 +79,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[] = {