From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B278E1C173C; Mon, 12 May 2025 17:47:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747072071; cv=none; b=cZ2/vKUo+ZjXTKplASY2SSTEghRa0QzSeic6oAml2kdu1BclbBZIFQ2B6SBcD4htnC49UDL+yvLMUiNHkUhfst0ks+HHERzVrrOuQwOdTaWxUjMmypLFeiltNQdzvOLnOfsIfNBqvsemwt5ZXWynnW+dmOjUJM4WL217oEZ/XUU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747072071; c=relaxed/simple; bh=7SbBfZJlgUKD3u6bV6EpruQ47Su6nNJ3lxzO0s/MT5Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CQSZGtezlpw/BWxoC43TvfmNv/nzE/tYAEKbIZ6BVHPronfoy5/NzGse/AfpuLuUbxcBaDfG5UdcWNC916+5gtpiPWsgKQBgSlYQv57WQtyFRnXT7qHgfEi/wIMvCWwlpIEYnl612/hLRdKfbTyc4CwU/fTJXPftftu1BmOLAFU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jDafXfBg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jDafXfBg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44592C4CEE7; Mon, 12 May 2025 17:47:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747072071; bh=7SbBfZJlgUKD3u6bV6EpruQ47Su6nNJ3lxzO0s/MT5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jDafXfBgM0ipv9MQjeudr0VSjMzjfX+qY2fMNKt3S/NVx9rZ2NdLsAMksx8iim63j Hqj8TogknXzbO1wf/oLrCQ4WaHcPo9E//+VW982EjjyOcL5fyv3mnLYGrk7tnQwJxM +oveX3nZpWosQ4wuaXLb1NINMpKNoANXO6MOWheM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, David Lechner , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 6.14 100/197] iio: pressure: mprls0025pa: use aligned_s64 for timestamp Date: Mon, 12 May 2025 19:39:10 +0200 Message-ID: <20250512172048.454023132@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250512172044.326436266@linuxfoundation.org> References: <20250512172044.326436266@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Lechner commit ffcd19e9f4cca0c8f9e23e88f968711acefbb37b upstream. Follow the pattern of other drivers and use aligned_s64 for the timestamp. This will ensure the struct itself it also 8-byte aligned. While touching this, convert struct mpr_chan to an anonymous struct to consolidate the code a bit to make it easier for future readers. Fixes: 713337d9143e ("iio: pressure: Honeywell mprls0025pa pressure sensor") Signed-off-by: David Lechner Link: https://patch.msgid.link/20250418-iio-more-timestamp-alignment-v2-2-d6a5d2b1c9fe@baylibre.com Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/pressure/mprls0025pa.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) --- a/drivers/iio/pressure/mprls0025pa.h +++ b/drivers/iio/pressure/mprls0025pa.h @@ -34,16 +34,6 @@ struct iio_dev; struct mpr_data; struct mpr_ops; -/** - * struct mpr_chan - * @pres: pressure value - * @ts: timestamp - */ -struct mpr_chan { - s32 pres; - s64 ts; -}; - enum mpr_func_id { MPR_FUNCTION_A, MPR_FUNCTION_B, @@ -69,6 +59,8 @@ enum mpr_func_id { * reading in a loop until data is ready * @completion: handshake from irq to read * @chan: channel values for buffered mode + * @chan.pres: pressure value + * @chan.ts: timestamp * @buffer: raw conversion data */ struct mpr_data { @@ -87,7 +79,10 @@ struct mpr_data { struct gpio_desc *gpiod_reset; int irq; struct completion completion; - struct mpr_chan chan; + struct { + s32 pres; + aligned_s64 ts; + } chan; u8 buffer[MPR_MEASUREMENT_RD_SIZE] __aligned(IIO_DMA_MINALIGN); };