lkml.org 
[lkml]   [2021]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 5/8] software node: Imply kobj_to_swnode() to be no-op
Date
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:

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 <andriy.shevchenko@linux.intel.com>
---
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 22f81688af2c..ae53c48f84b1 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -13,10 +13,10 @@
#include <linux/sysfs.h>

struct swnode {
- int id;
struct kobject kobj;
struct fwnode_handle fwnode;
const struct software_node *node;
+ int id;

/* properties in sysfs */
struct kobj_attribute *property_attrs;
--
2.30.2
\
 
 \ /
  Last update: 2021-03-27 23:22    [W:0.085 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site