Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (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 DC2254014B7 for ; Mon, 2 Mar 2026 15:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772466784; cv=none; b=ojrU882sKG0aS4UKXg25g4y3EG769MSmv4hpPil1lPPTx9XJLdAFhW+IrHOvxkFIOHAIf3ja565rqqpG/K44HFZ7OKVjxNsse3vwBbQ+OppVZx5gMZL6GwYnyaJxbGoHl8cLuMVqsO2tt5llpmqLfiWT+oX2MaBQOghy2gBGYFY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772466784; c=relaxed/simple; bh=cSI4UvLmu3nc2agJSrZQMx03WUPtezKCSNssLL/i+VI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ZZGdpuRlfW8ijSdYfd64pg6U8DDWrxl0JWMLMD9dqkTvo2OgaCcZlMBTJf/7R+pAzpuJ11Qch9WqK+U5tHp3KBWiGaFcZPO6qNbQ57qYin3FHAFO1VVCuIRgdkN1TcKiYM9U9q+yM3vIPOFg4UvBmYsTirUGkiNfuAT0WtVBbpU= 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=C59py6Fj; arc=none smtp.client-ip=209.85.167.173 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="C59py6Fj" Received: by mail-oi1-f173.google.com with SMTP id 5614622812f47-463a94f8475so3793972b6e.0 for ; Mon, 02 Mar 2026 07:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1772466780; x=1773071580; 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=3WtWjK/XrBFXhlPr3QyvBUKjwrSPr3UtmIW2Gtd1DQ8=; b=C59py6FjC1Egf/a0Qk1Xks12CiPRfil5/zZJKiVHcuYcBfXHEwyJxgHP9xhVactflJ T8szDakNG5m3ijSYKQ20t6eiHWpVtywlMktd6kXEafBXQc0qbRBafuCp7YuNGo3cm8+v Jz8DDDK3AxDuG4tGZL5ehIXAj9jcCmfMGHPdb0h8JywgvLJPOKqCAhHSRZSrCg54NM+j bvkW08d+yJepYeibN8m7e8x85CiLgjuRlrBdSaIaj2CSEV3GbQ2kG8OSQyg8J3mchMus F76AvltS0x0n1cpIbZUAxKHfOI22JyVM4W3AuTFl5DEu7DXifws+xGDM/8/AVMNw6kP9 9fyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772466780; x=1773071580; 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=3WtWjK/XrBFXhlPr3QyvBUKjwrSPr3UtmIW2Gtd1DQ8=; b=tTe/0Qfo4xQJttWX6V7kIRoGMByCDwrocAb6i9NJBU05Czx+aNRit5BzfLDiDCA//F g+g3Hwfv/LQlJm7vvAyuEFTGiVaACe/E9pQdrYjLvx299UroTsjuaWpwXjdjrY4l8MjF hXhJkGJXQi6GpOEZJRJIlSyqmL3YtP20faqmbVf5zOWcIpRravPbqGHhC6+ZzXCZDqU9 HwqTinKwaYQ8uluNGldt22KPwxmDaeSAVWtoFasjIzSdY5mI7gAT+l3fh97mdSMmLt3p ovgJFIrIf3mjq+OurRPwF+IwUuq3OamxJjxVMaJwSaB1R8jbo0rCs/mb6ETeermjnSNU BnJg== X-Forwarded-Encrypted: i=1; AJvYcCXNAwj7Z6B9/RSmMFLEioA2wPqIWEc3r81mk/0FHs+pgKk05bjkSvzUu8IYunNS/EC59l5OvhQ/w5c=@vger.kernel.org X-Gm-Message-State: AOJu0Yy9sbegc3IlhMJXR/UL66bUhDpGLpgOEpfE+aTZLW3+iFaNT9fr TpRJq7O4l9sjofkQaLfFiAxDPr0kbR7ROa+mYrtTrgXDWx1VN2V+fteC2O9R9jrUqC0= X-Gm-Gg: ATEYQzyP+y1vpFWpTpDhp5+lnrBWJ8inK1u5BJUOcFz6QMDMyWNwhFQSdqmWmvc1VyT VonvW0KTD3bTWFx5Cc5I2uMHLEEXiDAZp4PFrJUHdXnp/lN7Sx1ACkImK10DwtttuLHj91r3OXc 3aoBU08B0qV7rzutM7S0zb8RNVrNeHn+iWVvZ2NLRtu+MCNYjEBGJO5+iKHp/lxiQCgbPbjBmtK +aLhGlGalXMb3T34XSY0qEjeu1c2diAV+KQq1BLuNrLF58wlySEOxZtvXCtIzZ8SNZzM3Tuwo5h EKGscfqRVt2tBc05rj1HK7OdbuMaMQMAR/Quro+fooWJFcU6TToBErCfuMWn0C+Xfr/nI4Dx8Eo ihMy6CCBL6mjVeRPGEcTp3caw1BY6nJkedJm+x7WIb/43KS3EJHVoALYRV7bv78bUP4iMuLRvBO VB37NnJXI9u3ZhLowvFzI5PAontI4zNNqX52LZTfF4RTtGujVpW1nQ52n5Z4CmRweObCLpbHL1C vm+jeYDsXy5 X-Received: by 2002:a05:6808:1188:b0:45e:fcf2:b693 with SMTP id 5614622812f47-464bf0363f1mr6898511b6e.29.1772466779623; Mon, 02 Mar 2026 07:52:59 -0800 (PST) Received: from ?IPV6:2600:8803:e7e4:500:4c09:7c6b:bc48:f2f7? ([2600:8803:e7e4:500:4c09:7c6b:bc48:f2f7]) by smtp.gmail.com with ESMTPSA id 5614622812f47-464bb5d0a8csm7577165b6e.14.2026.03.02.07.52.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Mar 2026 07:52:59 -0800 (PST) Message-ID: Date: Mon, 2 Mar 2026 09:52:58 -0600 Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/2] iio: orientation: hid-sensor-rotation: fix quaternion alignment To: =?UTF-8?Q?Nuno_S=C3=A1?= , 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: <20260228-iio-fix-repeat-alignment-v2-0-d58bfaa2920d@baylibre.com> <6158f495b13f2a8cdc09f37e296166ccf0393c78.camel@gmail.com> Content-Language: en-US From: David Lechner In-Reply-To: <6158f495b13f2a8cdc09f37e296166ccf0393c78.camel@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 3/2/26 6:32 AM, Nuno Sá wrote: > On Mon, 2026-03-02 at 10:58 +0200, Andy Shevchenko wrote: >> On Sat, Feb 28, 2026 at 02:02:21PM -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_QUATERNION(), to declare the >>> array with proper alignment. This is meant to follow the pattern of >>> the similar IIO_DECLARE_BUFFER_WITH_TS() macro. >> >> Reviewed-by: Andy Shevchenko >> >> But this is in conflict with the other hack-patch in another series. >> I'm a bit lost what patch 2 fixes here and that hack-patch fixes >> in the same driver. Shouldn't survive only one? > > +1. > > I see this is older so should we only look at the other series? > > - Nuno Sá They are fixing two separate bugs. This bug (which is a recent regression) is that the size of the struct is wrong. It is supposed to be 32 bytes, but a recent change make it only 24. This causes iio_push_to_buffers_with_ts() to write over data past the end of the struct. The other bug (which has been a bug for 6 years) is that the the timestamp is in the wrong place. That patch also has an effect of making the struct the right size, but that is only a side-effect. So yes, I should have mentioned that in the cover letter that this series should probably be applied first since it is the worse bug. And it looks like I'll be doing a v2 of the other series anyway, so I can properly rebase it and declare the dependency.