From patchwork Mon Mar 29 15:12:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 411069 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48397C433E3 for ; Mon, 29 Mar 2021 15:12:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2016D6192E for ; Mon, 29 Mar 2021 15:12:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230240AbhC2PMR (ORCPT ); Mon, 29 Mar 2021 11:12:17 -0400 Received: from mga17.intel.com ([192.55.52.151]:23742 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230475AbhC2PMC (ORCPT ); Mon, 29 Mar 2021 11:12:02 -0400 IronPort-SDR: ppj+xSqRv6wfjh3RM+HzwkxPkWu0s0ZG2AhtfPNshQjTDacJWsspEmDdjzKaWy8e8qk/2z5QMv JoJCopAatKgw== X-IronPort-AV: E=McAfee;i="6000,8403,9938"; a="171582221" X-IronPort-AV: E=Sophos;i="5.81,288,1610438400"; d="scan'208";a="171582221" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2021 08:12:01 -0700 IronPort-SDR: mqFNJXh7sI/3nSCz0WXPLJ5IbRgwJ/VXVjGJKaCURHVGFXf1iDcpcNWxRvTh+rHNakJOG6tLla H3ic8gZQIJAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,288,1610438400"; d="scan'208";a="444809902" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 29 Mar 2021 08:11:58 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 23DF01AD; Mon, 29 Mar 2021 18:12:13 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Daniel Scally , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Yong Zhi , Sakari Ailus , Bingbu Cao , Tianshu Qiu , Mauro Carvalho Chehab , Heikki Krogerus Subject: [PATCH v2 4/6] software node: Imply kobj_to_swnode() to be no-op Date: Mon, 29 Mar 2021 18:12:05 +0300 Message-Id: <20210329151207.36619-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210329151207.36619-1-andriy.shevchenko@linux.intel.com> References: <20210329151207.36619-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Since we don't use structure field layout randomization the manual shuffling can affect some macros, in particular kobj_to_swnode(), which becomes a no-op when kobj member is the first one in the struct swnode. Bloat-o-meter statistics for swnode.o: add/remove: 0/0 grow/shrink: 2/10 up/down: 9/-100 (-91) Total: Before=7217, After=7126, chg -1.26% Signed-off-by: Andy Shevchenko --- v2: added the object file name against which bloat-o-meter was run (Greg) drivers/base/swnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c index db982859171e..e83028e11f50 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -12,10 +12,10 @@ #include struct swnode { - int id; struct kobject kobj; struct fwnode_handle fwnode; const struct software_node *node; + int id; /* hierarchy */ struct ida child_ids;