mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@linux.dev>
To: Peter Rosin <peda@axentia.se>,
	Thorsten Blum <thorsten.blum@linux.dev>,
	Kees Cook <kees@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH RESEND] mux: Realign struct mux_chip to save 8 bytes
Date: Thu, 28 Aug 2025 18:21:01 +0200	[thread overview]
Message-ID: <20250828162105.4299-1-thorsten.blum@linux.dev> (raw)

Reduce mux_chip's struct size by 8 bytes by realigning its members.

pahole output before:

  /* size: 752, cachelines: 12, members: 5 */
  /* sum members: 744, holes: 2, sum holes: 8 */
  /* member types with bit paddings: 1, total: 1 bit */
  /* paddings: 1, sum paddings: 3 */
  /* last cacheline: 48 bytes */

and after:

  /* size: 744, cachelines: 12, members: 5 */
  /* member types with bit paddings: 1, total: 1 bit */
  /* paddings: 1, sum paddings: 3 */
  /* last cacheline: 40 bytes */

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 include/linux/mux/driver.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/linux/mux/driver.h b/include/linux/mux/driver.h
index e58e59354e23..8e912399cf3b 100644
--- a/include/linux/mux/driver.h
+++ b/include/linux/mux/driver.h
@@ -56,16 +56,15 @@ struct mux_control {
 /**
  * struct mux_chip -	Represents a chip holding mux controllers.
  * @controllers:	Number of mux controllers handled by the chip.
- * @dev:		Device structure.
  * @id:			Used to identify the device internally.
+ * @dev:		Device structure.
  * @ops:		Mux controller operations.
  * @mux:		Array of mux controllers that are handled.
  */
 struct mux_chip {
 	unsigned int controllers;
-	struct device dev;
 	int id;
-
+	struct device dev;
 	const struct mux_control_ops *ops;
 	struct mux_control mux[] __counted_by(controllers);
 };
-- 
2.50.1


                 reply	other threads:[~2025-08-28 16:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250828162105.4299-1-thorsten.blum@linux.dev \
    --to=thorsten.blum@linux.dev \
    --cc=kees@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peda@axentia.se \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®