From patchwork Wed Oct 25 11:18:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wilczynski, Michal" X-Patchwork-Id: 13436025 X-Patchwork-Delegate: rjw@sisk.pl Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E901273D1 for ; Wed, 25 Oct 2023 11:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="eh9Gv0dT" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A2EE18E; Wed, 25 Oct 2023 04:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698232718; x=1729768718; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zxS//e/ZqjIB0NhbIBluRHpqaStKqMVqrAs7nUrO30A=; b=eh9Gv0dTUI1E0jFNHkSYABwrN+ihY+6BYLLbG5iBBlZwxgJTt1ST2VuX Q2J2j5uLjkwfuhj/ewWJMPu03pgshcH6ozOb2FCxXwnk0Z4yHQYBW1+pe UFmwrpicpCe9CqyV2zbjzlDbCJX8RSWMrgJeUMfN8vyX4xA/1RPVbT1pl Gt87B8Amnf7ZYt+oUPFS9sPS+7rX8fGukFfNJESG1Cm+Za4vfkx5cLO1w QIcgKGaepK+J/OBwJPJYj2UEjfggL6qDy5LI+IJYw/LsAkeFL7QaCMib/ 5t/dOYdtdif0BYkfABZMDBecNHUj2hAuXvAP73jATyhs0RXmSWfNZSLRK w==; X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="391154641" X-IronPort-AV: E=Sophos;i="6.03,250,1694761200"; d="scan'208";a="391154641" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 04:18:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="762425139" X-IronPort-AV: E=Sophos;i="6.03,250,1694761200"; d="scan'208";a="762425139" Received: from powerlab.fi.intel.com ([10.237.71.25]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 04:18:28 -0700 From: Michal Wilczynski To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: rafael.j.wysocki@intel.com, andriy.shevchenko@linux.intel.com, lenb@kernel.org, Michal Wilczynski Subject: [PATCH v1 6/6] ACPI: acpi_video: Fix holes in acpi_video_bus Date: Wed, 25 Oct 2023 14:18:06 +0300 Message-ID: <20231025111806.2416524-7-michal.wilczynski@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231025111806.2416524-1-michal.wilczynski@intel.com> References: <20231025111806.2416524-1-michal.wilczynski@intel.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 As identified by 'pahole' utility there are holes in acpi_video_bus struct. Rearrange elements to get rid of the holes. Put elements biggest in size first, and one-byte elements later. Signed-off-by: Michal Wilczynski --- drivers/acpi/acpi_video.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index bfc7f51a527d..1e10d5b748b2 100644 --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -155,19 +155,19 @@ struct acpi_video_enumerated_device { struct acpi_video_bus { struct acpi_device *device; + struct acpi_video_enumerated_device *attached_array; + struct list_head video_device_list; + struct mutex device_list_lock; /* protects video_device_list */ + struct list_head entry; + struct input_dev *input; + struct notifier_block pm_nb; bool backlight_registered; u8 dos_setting; - struct acpi_video_enumerated_device *attached_array; u8 attached_count; u8 child_count; struct acpi_video_bus_cap cap; struct acpi_video_bus_flags flags; - struct list_head video_device_list; - struct mutex device_list_lock; /* protects video_device_list */ - struct list_head entry; - struct input_dev *input; char phys[32]; /* for input device */ - struct notifier_block pm_nb; }; struct acpi_video_device_flags {