From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) (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 D1D563148C1 for ; Mon, 16 Feb 2026 15:26:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771255562; cv=none; b=PWxXBA6Uon4mQbrwfDalAoS0mnrvN1umPpFNMtKcwTbflNrhb90cDUY+J+hzV4AgiBBoBu6sjWda0gPlxXDCKBhqAc3vqKwS5PUObnB5fI0mlY2KlN9aMgyMjvLzTbkEHM3M7t51hbyQHCs+6yLdsLKzt4Z0/EK5B1o0cRcH6+8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771255562; c=relaxed/simple; bh=s/u9a7RFxBkreXqZx0ZwHqcPArovGyAc5UL+kxKtdg0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=P0YAarXEgh4JSbkzLxHzv3LFBp0OFDB3eFLXimJvSp/T0+cMZGaLoZmQ+pIPZzPJZAOGG0dBiX8cnPV0w29XDjViZcuitngW1FIFAmvwpxWGzAWAbasFfVmGaRMeuOf7pVL50H4MWCHDJ5ot6EhtAxSYWENpznrgKiI+EsN6IHU= 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=PpW5tVCi; arc=none smtp.client-ip=209.85.167.175 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="PpW5tVCi" Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-463a0e14b4dso608059b6e.0 for ; Mon, 16 Feb 2026 07:26:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1771255560; x=1771860360; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WDY1pgwN95gNKwiq9tVCFy3TSoHft79BSNGMSnMpMmY=; b=PpW5tVCicIKPqMAOlJwMhEr1fYa2vvWqmJy57HILg5XA9v6Wk+lEjJ91+YfohWAxN2 X7da4y74D2oov7MaxOm32ntYHnvMZp0MMszj5MmTrmQ5Cv5k/HdQBjuJ13rdr59GRkAX DtoUCqzikSMmSdOuok2h8tFgtFS7qsrt/ETz3ehY3lrf1HXUag9EqM4QNrMQaTwSpoSo Fs5tRGapW5Jgl+YdGNihNhlfJZ304fgV9XsrzBkz/8nYVBx2GI78c3VfCoPrVqkf8CBG TiOlmze9rUSgCa5MwzuDFTJHE77dgXUoJa1BnDKXnD2snWTPNynE9CpcaLIr1N6TIDlA 3xVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771255560; x=1771860360; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WDY1pgwN95gNKwiq9tVCFy3TSoHft79BSNGMSnMpMmY=; b=DJTB67IPMusGh6dkfXDR5ghHy8LmhQxbdxdMGqeBKXORALpNQ6EZ1kU2igztozY1w9 QbnS9GaJwfkzwdbn+hpE55CPsXQYQ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TP id 5614622812f47-4639f1bd0cdmr4633325b6e.43.1771255559738; Mon, 16 Feb 2026 07:25:59 -0800 (PST) Received: from ?IPV6:2600:8803:e7e4:500:2d75:8cf2:6289:6a96? ([2600:8803:e7e4:500:2d75:8cf2:6289:6a96]) by smtp.gmail.com with ESMTPSA id 5614622812f47-463a4ede045sm6507701b6e.9.2026.02.16.07.25.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Feb 2026 07:25:59 -0800 (PST) Message-ID: Date: Mon, 16 Feb 2026 09:25:58 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/2] iio: orientation: hid-sensor-rotation: fix quaternion alignment To: Andy Shevchenko Cc: Jonathan Cameron , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Jiri Kosina , Srinivas Pandruvada , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , linux-input@vger.kernel.org, Lixu Zhang References: <20260214-iio-fix-repeat-alignment-v1-0-47f01288c803@baylibre.com> Content-Language: en-US From: David Lechner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/16/26 1:44 AM, Andy Shevchenko wrote: > On Sat, Feb 14, 2026 at 03:00:19PM -0600, David Lechner wrote: >> The main point of this series is to fix a regression reported in >> hid-sensor-rotation where the alignment of the quaternion field in the >> data was inadvertently changed from 16 bytes to 8 bytes. This is an >> unusually case (one of only 2 in the kernel) where the .repeat field of >> struct iio_scan_type is used and we have such a requirement. (The other >> case uses u16 instead of u32, so it wasn't affected.) >> >> To make the reason for the alignment more explicit to future readers, >> we introduce a new macro, IIO_DECLARE_REPEATED_ELEMENT, to declare the >> array with proper allignment. This is meant to follow the pattern of >> the similar IIO_DECLARE_BUFFER_WITH_TS() macro. > > In both cases it's quaternion, maybe be more explicit and define > IIO_DECLARE_QUATERNION() ? > It is really the fact that the scan_type has .repeat > 1 that requires this, so I was trying to make a name that shows that link. But right now, quaternion is the only thing that has .repeat > 1, so I guess it would be OK either way. We'll see if Jonathan has an opinion on the naming.