All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yusuf Alper Bilgin <y.alperbilgin@gmail.com>
To: "Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Liam Beguin" <liambeguin@gmail.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>,
	 linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	Yusuf Alper Bilgin <y.alperbilgin@gmail.com>
Subject: [PATCH v2 4/4] iio: adc: ltc2497: reorder ltc2497core_driverdata members to remove hole
Date: Wed, 13 Aug 2025 18:54:32 +0200	[thread overview]
Message-ID: <20250813-ltc2495-v2-4-bbaf20f6ba07@gmail.com> (raw)
In-Reply-To: <20250813-ltc2495-v2-0-bbaf20f6ba07@gmail.com>

Reorder struct members from largest to smallest to eliminate a 7-byte
hole identified by the pahole tool, making the layout memory-optimal.

Signed-off-by: Yusuf Alper Bilgin <y.alperbilgin@gmail.com>
---
 drivers/iio/adc/ltc2497.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/ltc2497.h b/drivers/iio/adc/ltc2497.h
index 7f53bf8b8469d2371bb7ae64ce90a61beadba9ba..578f55efc5c400980fe8bbd2b220aafb222d6f33 100644
--- a/drivers/iio/adc/ltc2497.h
+++ b/drivers/iio/adc/ltc2497.h
@@ -27,12 +27,12 @@ struct ltc2497_chip_info {
 struct ltc2497core_driverdata {
 	struct regulator *ref;
 	ktime_t	time_prev;
-	/* lock to protect against multiple access to the device */
-	struct mutex lock;
 	const struct ltc2497_chip_info	*chip_info;
-	u8 addr_prev;
 	int (*result_and_measure)(struct ltc2497core_driverdata *ddata,
 				  u8 address, int *val);
+	/* lock to protect against multiple access to the device */
+	struct mutex lock;
+	u8 addr_prev;
 };
 
 int ltc2497core_probe(struct device *dev, struct iio_dev *indio_dev);

-- 
2.43.0


  parent reply	other threads:[~2025-08-13 16:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 16:54 [PATCH v2 0/4] Add LTC2495 support Yusuf Alper Bilgin
2025-08-13 16:54 ` [PATCH v2 1/4] dt-bindings: iio: adc: ltc2497: add lltc,ltc2495 bindings Yusuf Alper Bilgin
2025-08-13 16:54 ` [PATCH v2 2/4] iio: adc: ltc2497: add support for LTC2495 Yusuf Alper Bilgin
2025-08-13 16:54 ` [PATCH v2 3/4] iio: adc: ltc2497: add temperature sensor support Yusuf Alper Bilgin
2025-08-13 17:14   ` Andy Shevchenko
2025-08-13 16:54 ` Yusuf Alper Bilgin [this message]
2025-08-13 17:16   ` [PATCH v2 4/4] iio: adc: ltc2497: reorder ltc2497core_driverdata members to remove hole Andy Shevchenko
2025-08-13 17:17 ` [PATCH v2 0/4] Add LTC2495 support Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250813-ltc2495-v2-4-bbaf20f6ba07@gmail.com \
    --to=y.alperbilgin@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=liambeguin@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.