From nobody Fri Apr 3 02:58:24 2026 Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9819E29BD8C for ; Sat, 14 Feb 2026 21:00:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771102855; cv=none; b=n4toltx7XjD5yzWSnxprV61STNSL1incMHAfu4rfJKI6V/Deu72GBOW8WwWW/sDsea5ng+RJ4ouoi6RkmGZC6BNIMqbiS2omA3qcaZBPZs5tvB+xnLpwoQ3hvSZXgAIE+MxLYc/FWag29UMCtqipY95dpTjdlBgf+XRVVHBCVkQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771102855; c=relaxed/simple; bh=jNjN7gD3JF9jQQ5s2IgcCsLWPxaJVNTVrn2kWorSt6Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OocAjdjSJ5JNDMrpVL/hRi4CiOFIzPtpjO+Adq4fVWphVrNwf0C78tt9TwneDZYZLlGnYrxqr8u3SxDhgBKjKGJ7NtcKeDsKSkXrmcAjOzDqxoEXJqH5z0KaAqcIR7UN7YQ4X28bekZI0soMS6HWVKOAnb7T7df7I9NMxt3VfzA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=vzK8yPtf; arc=none smtp.client-ip=209.85.210.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="vzK8yPtf" Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-7d4c12ff3d5so1828392a34.2 for ; Sat, 14 Feb 2026 13:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1771102851; x=1771707651; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3KssbkPb1gHaJEaz+zWwlaEszLsE5KF10Og3GBOyj4o=; b=vzK8yPtfEKbUSKNY/rOj8/Weem9BsWSqg/he3CsZjWPttBFKwqRbrT4KK969QSh9FE ZXlg/Fs5DlKgPHcJRqA47ThYl1WzjJyk39Oa10IjWZTDAla7V/LPo118YxJCdcH47PsE 2GfVWPhzXOee5YrVq6qdAJgcel4hFwcCQtxbA4x2JWbOPeh2XksgJu0lhHjNQUY/IxK/ pEbZ78PVyjGKuQnZmaB9Hpcbj35cgE2nSHwOMZemAaLDJUQq5ucwOg/wHioNQj80iJCx 1edKBQDH2Wr4poze6GXJgIb9j9aiff/4ngwxoGh3oiVl62z0LbE3BNLlKw0b+CZ7kdra 4naQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771102851; x=1771707651; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=3KssbkPb1gHaJEaz+zWwlaEszLsE5KF10Og3GBOyj4o=; b=wuGBMkgsDG7hQ5srlyQDPXVfRcSKpYJPHAtM91Jb8KRF8gk6Qiias0Dd9PP65y/edf vC/RAX+JbmpEMkWFDGUcMO8AuA7vxEOFqWVFHpFBcGExEEU91LbBKpbWuLRvVHdFmxZr suUBGShVuGRAzxHg1Q/gburp5w7r+x+VHeKeKiJQdL2V5Fa+6xValkYgdLa2hidFCaWQ XmjMsU2ElVgHhH8uFG6zRYkO1Nan+BjMpVR/GmeL+N+JtHHhS4iCzbzn4PQBiThrRIuZ rMO76W2TRiwT8IhEo2tMHq3IyDZd1caphtTm9429VsaVWv04J18djVRk5/Z4KnjGiCcF vz2Q== X-Forwarded-Encrypted: i=1; AJvYcCWBvLYbmb55VHigxWfJQbD3AeTFqkCCc64ehhvKWPHd1CR5ssyJl/OsesEzhnNN9ayoMqqIGOPotT2sOTc=@vger.kernel.org X-Gm-Message-State: AOJu0Yy5ENUAuNWTAsgHAIHSY4dnJbId5+m9ReedsLnb35/Nd2jief7d 326GNpQ01PrXN0+jzn1E+IjFijQIkQKmVL11A6/V9yokNz5+cYxQ7mSiJ1v2bLsCcXk= X-Gm-Gg: AZuq6aI7kYwFbGl5jNK/hPbl8rZO7IcKmYb1ihDpL5D/uneMxOFKPdAXzBtgR/EefvL izzWiuwohGnp/iCtd/crsiLPLw9yzal1NEnD5zzwDoCnI8neHhnHypSkBjv2birLQffErSAMCkI IDdMXOKVxW8kg3ObuDZPftFVuKTz6UEcydMoGm93N0LNmtDSWfzI5ewCcIG9yalAkEiE7MBgRF+ 2tJ42as+D+65uDFcmgOc0CKwc5GsDiLCNfYLZGsAbsJtSLJH0tyQcpj8YSRrwEG3HEDd5lLLms/ P/DNUYRFEFwK0bKwqS3FWWCNSvSfkhHJ//JJaI2RuulcCkCVO9BaPpSG7siX6IuazDILAiJCf3Z tizg5JDUK/WPBTRPUxIm0/oqsk1hnCM0xAXuK0A7jUruFxKD6He6HANNsCMTir2MqRP/eYTj1x6 YN0BPRNfpFqYfHsVDcL42TNpQMbg== X-Received: by 2002:a05:6830:2e07:b0:7d4:bcd0:db07 with SMTP id 46e09a7af769-7d4d0c7aba5mr2222848a34.37.1771102851474; Sat, 14 Feb 2026 13:00:51 -0800 (PST) Received: from [127.0.1.1] ([2600:8803:e7e4:500:109:393c:254e:962e]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d4da074c15sm1181680a34.15.2026.02.14.13.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Feb 2026 13:00:51 -0800 (PST) From: David Lechner Date: Sat, 14 Feb 2026 15:00:21 -0600 Subject: [PATCH 2/2] iio: orientation: hid-sensor-rotation: fix quaternion alignment Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260214-iio-fix-repeat-alignment-v1-2-47f01288c803@baylibre.com> References: <20260214-iio-fix-repeat-alignment-v1-0-47f01288c803@baylibre.com> In-Reply-To: <20260214-iio-fix-repeat-alignment-v1-0-47f01288c803@baylibre.com> To: Jonathan Cameron , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Jiri Kosina , Srinivas Pandruvada Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , linux-input@vger.kernel.org, David Lechner , Lixu Zhang X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1239; i=dlechner@baylibre.com; h=from:subject:message-id; bh=jNjN7gD3JF9jQQ5s2IgcCsLWPxaJVNTVrn2kWorSt6Q=; b=owEBbQGS/pANAwAKAcLMIAH/AY/AAcsmYgBpkOJ6F/c+o0+u4560tz2ShMNf0GrCyrMUkjWcg EqwUCxz7j6JATMEAAEKAB0WIQTsGNmeYg6D1pzYaJjCzCAB/wGPwAUCaZDiegAKCRDCzCAB/wGP wO0aCACNVpVpzq5Z0KzGvMClnuShr68EGfgfW8/MaM0b0blIw6AOuLMd2H8WsUzQ6t8E6jg1Ibd PUYL7b5N98E7WTU7ObNs3Ulj/ewdYqxgHl63xDVPFY8NbjxjOwGZo7L9o7wYHpkoQVJ+82C7/Wn /Wx+IhxkUhqnFF1+1qu70AeTX5PU5CyvNB+BOLxV0abWA6xEMOjiL+OGJjm95Cs/o/y8hZYj5++ zOyQAdcRaHo3BWdoHNCRGitXWADDNbrAJ60QknZgBnO6IlaRhTtymRYWOtuaecXvC3aLTfSgis5 k00n/YwwDJYRYYSxwe3i65WlLEtXzjVOXTNueLaUSKRWkPDN X-Developer-Key: i=dlechner@baylibre.com; a=openpgp; fpr=8A73D82A6A1F509907F373881F8AF88C82F77C03 Restore the alignment of sampled_vals to 16 bytes by using IIO_DECLARE_REPEATED_ELEMENT(). This field contains a quaternion value which scan_type.repeat =3D 4 and storagebits =3D 32. So the alignment must be 16 bytes to match the assumptions of iio_storage_bytes_for_si() and also to not break userspace. Reported-by: Lixu Zhang Closes: https://bugzilla.kernel.org/show_bug.cgi?id=3D221077 Fixes: b31a74075cb4 ("iio: orientation: hid-sensor-rotation: remove unneces= sary alignment") Signed-off-by: David Lechner Tested-by: Lixu Zhang --- drivers/iio/orientation/hid-sensor-rotation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/orientation/hid-sensor-rotation.c b/drivers/iio/or= ientation/hid-sensor-rotation.c index e759f91a710a..9df955ecfbac 100644 --- a/drivers/iio/orientation/hid-sensor-rotation.c +++ b/drivers/iio/orientation/hid-sensor-rotation.c @@ -19,7 +19,7 @@ struct dev_rot_state { struct hid_sensor_common common_attributes; struct hid_sensor_hub_attribute_info quaternion; struct { - s32 sampled_vals[4]; + IIO_DECLARE_REPEATED_ELEMENT(s32, sampled_vals, 4); aligned_s64 timestamp; } scan; int scale_pre_decml; --=20 2.43.0