From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (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 24AE3484249 for ; Wed, 5 Aug 2026 17:06:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785949622; cv=none; b=qUEZQ0Xzmip0qAzUPp5aBEz0JPnhPvTbrAEw73QVIAECpJ/VAyoMKpWa20lfujWSANVk5ETdamMWyMXue35bSImQanNPEXU/JGxLzKGeMt8j/pVxHYzJD9Ie8SmiwPT2FvjMVknGJgFdKKclzPngrh8DDPJltaczufilBvbst10= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785949622; c=relaxed/simple; bh=m8q6OK/anRR6LU8bDyid2t7U6ZwpjLrM3FKrURqspZA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Fkjka3hgTCTrVXdcEJ58+WQZXSFJpzbTM2TPhgrQO2FWIi07sRl9vfHHlPC39q5hlCMapd2SwakXoFJ7noQI6ZDyGbd0WekJLldjT1xVDCnLAlKtsS2pxAGepE7gLBFg7icyWeNGCiQagjwNFE6hP+gjhSSivBrqBPlKGiDG2Gc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KsYu42+q; arc=none smtp.client-ip=209.85.160.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KsYu42+q" Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-51c2b2c9eccso8213471cf.2 for ; Wed, 05 Aug 2026 10:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785949615; x=1786554415; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=wcCQ5yjpmgh/+ucZRtqgqUFJTrSq89wHY1nMeO3mD/g=; b=KsYu42+q3tt+0iiTxfKwjivK9ZY90Er/7pNhJEcE0WnfYN6ctkGNMRNcolNjUqjVQy Cd2DMXHuMGlzpifuY8fz8qKIKdt0bf/NqmHrBAAqZPOI3SkYzHH1Y2yP8Zm+7N3oglFb bPt7MwzdqRBQeGLDKM6JmhCKgYY9i5aoslo8l6uFUkf1wGV6tAoLn419wInfF2HGyF/D 8BBBJSuwz6zuoH/o0s67OffZJEcX3/U+fN41RHdgQb4YGFNOtbyFl3E3wbfjZ8h0OaHC u7Go54Xq7vTqtXkSjszwt2DOpPjFjVxw+k1bxhIV5+kxPaRLXVOdD3r9G+pcbOwUCmQZ VNQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785949615; x=1786554415; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=wcCQ5yjpmgh/+ucZRtqgqUFJTrSq89wHY1nMeO3mD/g=; b=aAcjlteQMzaTLi3mc18I2E4//vTugFJ7TLAjks2jqBYMOb1hAjQ/rN535+bkpUXzjF +aGKF4nmPXgbOposHWpoSYkUixcCcgZrU7O5A3gcRZX7HfgdSsPtSeJYHZCj+cdOLjoO vKf5a9lnGYFrfIeYbFIkK9KHEs40OJCIH0oexX3/m2kQeAmfrIv6sDnLk8Hq1Ku7rKJl vliryBOJHbV4umCgp+ayyt1kvY+m6n5sOP7QgOUX7wDfwoj/rifNmWFtMEVjOrXJTxfo xUK0lAgiNS10xWtLAS7BSRDQjA/Ud1/KhP14U0tRkganBfxIQAC4ACvjDEm9lRdKACYa mJuQ== X-Forwarded-Encrypted: i=1; AHgh+Rqeq41/nsg8zCuaCdwIlGcH/dEh89K/JTGaviTb1COcaBsuXYlLe6gqwwepYDSUK4QwICzagoaVUNhZTh8=@vger.kernel.org X-Gm-Message-State: AOJu0YwDWrqpqiPo2i8OxRTaZHL84xVK2GiK1Z5kh5ANRof3widFHSQW Ku4PI59IogDcw+J/UhvMLDQpe9ImW/ga8yfYE1CeyGsuV3/e5a9yQcsA X-Gm-Gg: AR+sD11aJzAOojzY95Y9UtLTckkpKh/593TUXvvU/qC25no3ycGvNDEx+CXwrt05WLA LSCKVtswyc0d/3edP3HOr1oEJ/MDzdF8s8GIhTpYVOPVIoL8/7h0a9lxbL5nOXHMNpxmfR1qCRb tY1KA0+2JZZ4umfkLqUVpeZE04KP+CgTbybIvV8vyA75uZ0l8hu/jmZRJ4pjHRihBavcdU7rVIw /e5/CBZbzY1n3U7drzv3tEB7c5u6NH+MQWY2/dkKOIMykMGmpOvZWZS46d0nvfYXa/6+KGt/Neg /0A7tJLArPiVCIBTAUEbxPsLWtumB6Mc4pYsIhZpsKF2tMOMPnee1X0X3e1ncEphpDgiAaYiMIc cxIxbpSZ5aaDrMRiGQVr996hlbVIoARWHjTsPTWMGD5+YQKNW7F/4xPIxnrVGOJzAwCbhLHBP3t BfSd4DesweuGH2QxY0a0kTmSSm9ihnMSNP6ULOyJ1DJsh3/Ev3IVEouPfIHHktVMGD160WWitNo aUuFC70AzCSNg== X-Received: by 2002:a05:620a:a502:b0:923:7821:dc0d with SMTP id af79cd13be357-93649267a9fmr689507285a.33.1785949615468; Wed, 05 Aug 2026 10:06:55 -0700 (PDT) Received: from louisarchdesktop ([2601:184:417f:5ad5:c570:9008:5a2b:8db7]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9364a3fc9bbsm196220785a.10.2026.08.05.10.06.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 10:06:55 -0700 (PDT) Date: Wed, 5 Aug 2026 13:06:51 -0400 From: Louis Adamian To: Andy Shevchenko Cc: Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , David Lechner , Nuno =?UTF-8?B?U8Oh?= , Andy Shevchenko , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] iio: pressure: ms5637: Add variant specific temperature compensation Message-ID: <20260805130651.4aceb71f@louisarchdesktop> In-Reply-To: References: <20260610020458.104818-1-adamianlouis@gmail.com> <20260610020458.104818-3-adamianlouis@gmail.com> <20260611151026.4abf8804@louisarchdesktop> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 11 Jun 2026 22:32:02 +0300 Andy Shevchenko wrote: > On Thu, Jun 11, 2026 at 03:10:26PM -0400, Louis Adamian wrote: > > On Wed, 10 Jun 2026 21:37:58 +0300 > > Andy Shevchenko wrote: > > > On Tue, Jun 09, 2026 at 10:04:58PM -0400, Louis Adamian wrote: > > ... > > > > > struct ms_tp_dev { > > > > struct i2c_client *client; > > > > > > > const struct ms_tp_hw_data *hw; > > > > u16 prom[MS_SENSORS_TP_PROM_WORDS_NB]; > > > > u8 res_index; > > > > + const struct ms_tp_comp_consts *comp_consts; > > > > > > Please, check with `pahole` if this is the best layout. > > > > I will correct the packing on this per pahole's finding. > > > > struct ms_tp_data { > > > > const char *name; > > > > const struct ms_tp_hw_data *hw; > > > > + const struct ms_tp_comp_consts *comp_consts; > > > > }; > > > > > > Can this be simply embedded into ms_tp_dev (and copied there if > > > required)? > > > > Copying in ms_tp_comp_consts provides no benefit over > > referencing the pointer; the values are per-descriptor, not > > per-instance and never modified. I'll keep the pointer (same as > > ms_tp_hw_data). > > Okay, let me ask differently then: Can we use the same data type in > ms_tp_dev instead of adding basically the same fields as in > ms_tp_data? > Sorry for the very slow reply. Yes, for v3 ms_tp_dev will hold a single const ms_tp_data *data instead of its own hw and comp_consts. This drops the duplicated hw that predates this series. One thing worth noting before I do that: ms_tp_data is currently private to ms5637.c and will need to be moved to ms_sensors_i2c.h for ms_tp_dev to point to it. I don't think this is a problem; it matches how ms_tp_hw_data is defined now, but let me know if you would like to avoid it. Thanks, Louis