From patchwork Mon Jul 12 06:10:34 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: 472996 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2686151jao; Mon, 12 Jul 2021 00:28:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjHhZIseXTkPqtwXTHDXz4/qJgdAMhAuImENQomuB68XotVWCPFjjAyXIiFhy9L8XB/wHJ X-Received: by 2002:a05:6402:1849:: with SMTP id v9mr18411082edy.108.1626074598722; Mon, 12 Jul 2021 00:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626074598; cv=none; d=google.com; s=arc-20160816; b=to7hxIeGTc+IHViZUP7Ud9zyRIiP1766Ti3e76OB7gSiHMCJpZwlNm5Rk7xHiLt+6Q KHYmjSLXgfdsME+V9EQnpRFI1CkUXbsegPEyA+7jSQtdXrwGyiUTeo5ewJGMWioGJLKe 5K2govOYk9CEB+HOirlaMALqXmx3UnLLffpLhMgJ6YicZfHMEzwD+Yq+g08MNSVAFtm5 70bNfNR/Q9vbXjWAQSoCX6q3CSozlFbYhq8ALwM2iZI/wznsnG/w+YuziUICJ4rNa/nT wEbZjrMJQQWidKnh9RIz5uL4lWBmt7J3PdDwHq5RlGQO8QH5ZyiclYFhuHvAxloOdxeL d1sQ== 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=9/4IZKeL7pDxUQK287kd+z7Zot+yqZ3m0MHXgdwt5g0=; b=r9M02qnZbLGKDlrEG80oMGTNt12bU3mhMcEz+hHWY8R9h3rB4iloh+vQ54kWK0gTHV sV1Oq0EkgZN1tYa4FMWzHN1ChrfAOjgZrJtFtDGzGYsl/jTSw8Um+pFf9kTFRsWtHUc7 6cEPdIbl6G+zWpkjEoTQ07DRrNL0CUh/4mHqdO/d11uKUta9KSA92gK4PVC6FF6UlGM7 +D6qdF4sbwtaYhQA83827AZi7A48GMaZHv20usz5A7jSAsANF4b0PMuLRNIfJu3Xx3VW 3jb1QdX1qjpNt092a7ElNp3OMDBBKlSNab7AZkCmOKnGSpUBB4WsFkg0jdRD46HjzraY U9fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=g0KKAUVd; 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.18; Mon, 12 Jul 2021 00:23:18 -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=g0KKAUVd; 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 S243206AbhGLHXe (ORCPT + 12 others); Mon, 12 Jul 2021 03:23:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:60434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242107AbhGLHWA (ORCPT ); Mon, 12 Jul 2021 03:22:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8222661490; Mon, 12 Jul 2021 07:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626074352; bh=ONp5s8e9lBqNJQX/FqHlhfSjBwaICUWY6VJlA7i7pwE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g0KKAUVd3nMze/t9fkBjX/Ja8TwN/9BRdEAuIJNsQ1YRyVwIsZ9CwGS/cbELAPR1I +RW2jMZxmqr3l937YB1WjHM+aK93G+sHyWBH9GV0ne7aIZMaPVy57emKn1z1lIQsA9 o0IDPjbExkcrJhIksnGVPMInjT41QuqGfH/2zK1U= 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 551/700] iio: chemical: atlas: Fix buffer alignment in iio_push_to_buffers_with_timestamp() Date: Mon, 12 Jul 2021 08:10:34 +0200 Message-Id: <20210712061034.903886722@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 b0f5d8db7348a6ce5cdd79fba46ebc91eebc8fd9 ] Variable location for the timestamp, so just use __aligned(8) to ensure it is always possible to naturally align it. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes tag is not accurate, but it will need manual backporting beyond that point if anyone cares. Fixes: 0d15190f53b4 ("iio: chemical: atlas-ph-sensor: rename atlas-ph-sensor to atlas-sensor") Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20210501171352.512953-6-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/chemical/atlas-sensor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.30.2 diff --git a/drivers/iio/chemical/atlas-sensor.c b/drivers/iio/chemical/atlas-sensor.c index cdab9d04dedd..0c8a50de8940 100644 --- a/drivers/iio/chemical/atlas-sensor.c +++ b/drivers/iio/chemical/atlas-sensor.c @@ -91,8 +91,8 @@ struct atlas_data { struct regmap *regmap; struct irq_work work; unsigned int interrupt_enabled; - - __be32 buffer[6]; /* 96-bit data + 32-bit pad + 64-bit timestamp */ + /* 96-bit data + 32-bit pad + 64-bit timestamp */ + __be32 buffer[6] __aligned(8); }; static const struct regmap_config atlas_regmap_config = {