From patchwork Mon Jul 12 06:11:05 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: 472847 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2647224jao; Sun, 11 Jul 2021 23:28:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkDDY84n28qwBjafXoXnqr6DgER3mjqyvtaWEgCm3YCzfp9bkn38G59F9bnM6YrhSsacV4 X-Received: by 2002:a17:906:6ad3:: with SMTP id q19mr50560780ejs.11.1626071335977; Sun, 11 Jul 2021 23:28:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626071335; cv=none; d=google.com; s=arc-20160816; b=l89Q/W+h+ceVcPHmdlOeHep//FQhjbafEeCdoGv/OjFfmPMY2MiyIEKH/603lwObbS XUk4rj3IoTRRgaEiNi6bDIBnHPUv2NV2GpCMivvI+bI3Rpas6zpT1Q5ctr512aNa5rhw MbEZ0W+WZskN9btOrYXnaASK+xDrTw79UmPN2KejvczoXRSVDiyffDJhqaDRy1OlbD5q yG8Mu7fzlLnVSMKBfI4tTE8jQGzmHaaxtPB5uQeYZdEJiVEpcCWu+4RkklwHlxrEo6tg Npgt/acF/01WrBTezgntul2/h3EanKNN2IsOtBvyeEyE3oFjpEzvqx/OF4KwFEGdmRmo cmvA== 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=klagpcpkMcvnsmYWIKZCMbg4W6+CVIzXnYjNUdYiLuQ=; b=U3B5sGCqCskA9om0spoNtk59qCGx9ar5U+93vy0JsQXE93/bwjbrn1P9jpt+oMWG4e yfzdvXW/qCKIQYtZA17WrBdEJHA9UX3tpeXcFCLhSWNYXO1HtJlPXIXk/k976/hOOEEe 0q7sC+X9EAS73rQaSP84RUGD2lWSt+kTgdtB4YG9jz6PIVYKUUawvvHRHQ/0DwX/P4IC e4Sh79b8X+wXmRTiB/H218XoAhZ9OCYOYNdo26K/ofdI57R/2CSgHlVg9Qa09HhmeCYx yIWYID/XEE/yqSpFAi70y4MasR0eqjUQjMomzYXzrG+Ra+vzf1YcBSt/HeIGZ8foeYdm hsWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IM25yReU; 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.28.55; Sun, 11 Jul 2021 23:28:55 -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=IM25yReU; 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 S234772AbhGLGav (ORCPT + 12 others); Mon, 12 Jul 2021 02:30:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:47700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235596AbhGLG3Z (ORCPT ); Mon, 12 Jul 2021 02:29:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 42CCE611C1; Mon, 12 Jul 2021 06:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626071116; bh=ekRsUPLEmMYxMbVqECbzNmX8MgTX7MWXbJDW8Re2UuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IM25yReUMrrxsoiMIrfSBaTkZxKkKn7gCujMjLh030uMX40ZBkv23sVjUsPHM3/Ni pJZN+tq9OdrzLnw6CcYgilRL9DszJa0OzmLy/ZVIIzVXS8AI8wLKxUmDQYuB3l8qYc BCpad7QlIwk1yirIUvJCHzhWtOSxXqDgOQWkT6AY= 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.4 281/348] iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() Date: Mon, 12 Jul 2021 08:11:05 +0200 Message-Id: <20210712060740.942053114@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 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 a0e5f530faa9..d6db07264a7b 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[] = {