From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD5EDC83F14 for ; Tue, 29 Aug 2023 13:23:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234370AbjH2NWv (ORCPT ); Tue, 29 Aug 2023 09:22:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235973AbjH2NWU (ORCPT ); Tue, 29 Aug 2023 09:22:20 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA6C5198; Tue, 29 Aug 2023 06:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693315337; x=1724851337; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=d8sp4qSQkZUEOkUFOpWIf+WUTXVK3m5MY9l3IVgWXKI=; b=Goehiy7y78EuzRm+KsAAk3TMrjdtXE2saw7NcFZWSS1YkCmbMENGeb+T DoW4SzlvgJmi7ns3746agQQ2+WfDdjN36zIBKc047yA13QDMFrKSKEiP4 29avHoi/sLYi3m39zgIuOBCyo1pNl2AItWlzE8dN1woNzodMb6bfwjfJp oU1+OTkJxU4i+UrFTvm24H9ap/mdtXta0/h6uYUiqBsmJhmXezed5C/wg 2HfJGi6bg7hQAVfZrDzwfZZmh2LDbmcj2oq1zMQbd98cFS9oASx10V3j0 fCv4XAy2XPVdbMtDQKD3sdH6FV80hvEleF+5n9NeXWa1TAWqEwCmvOWlI A==; X-IronPort-AV: E=McAfee;i="6600,9927,10817"; a="378082265" X-IronPort-AV: E=Sophos;i="6.02,210,1688454000"; d="scan'208";a="378082265" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2023 06:22:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="882321012" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga001.fm.intel.com with ESMTP; 29 Aug 2023 06:22:19 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qayfc-004t8Y-1B; Tue, 29 Aug 2023 16:22:12 +0300 Date: Tue, 29 Aug 2023 16:22:12 +0300 From: Andy Shevchenko To: Jonathan Cameron Cc: Jonathan Cameron , Lorenzo Bianconi , Philipp Jungkamp , Peter Zijlstra , linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Kosina , Srinivas Pandruvada , Lars-Peter Clausen Subject: Re: [PATCH v1 3/3] iio: hid-sensor: Use aligned data type for timestamp Message-ID: References: <20230815154027.12468-1-andriy.shevchenko@linux.intel.com> <20230815154027.12468-3-andriy.shevchenko@linux.intel.com> <20230828170928.5264dadf@jic23-huawei> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230828170928.5264dadf@jic23-huawei> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Mon, Aug 28, 2023 at 05:09:28PM +0100, Jonathan Cameron wrote: > On Tue, 15 Aug 2023 18:40:27 +0300 > Andy Shevchenko wrote: ... > > - /* Ensure timestamp is naturally aligned */ > > Comment is still true and no more or less obvious than it was with the old code > I think so I don't really see why it should be removed with this change. Doesn't the prefix "aligned" make this comment somehow redundant? > > struct { > > u32 accel_val[3]; > > - s64 timestamp __aligned(8); > > + aligned_s64 timestamp; > > } scan; ... > > - s32 sampled_vals[4] __aligned(16); > > + s32 sampled_vals[4]; > > Hmm. I can't immediately recall why that aligned(16) is therebut > it's not related to the rest of this change so I'm not sure we should touch > it. I don't think we ever required quaternions to be aligned as a whole so > this does feel odd but in the category of something we should be careful > touching or at very least do it in a different patch where it stands out. I have checked the code and find nothing that justifies this, I can split it to a separate patch, though. Note, among ISH HID drivers it's the only one with a such... > > + aligned_s64 timestamp; > > } scan; -- With Best Regards, Andy Shevchenko