diff options
| author | Miquel Raynal <miquel.raynal@bootlin.com> | 2025-01-15 19:07:39 +0100 |
|---|---|---|
| committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2025-01-15 19:07:39 +0100 |
| commit | fc4378b2fe8645d310463c2d895abd8173087b95 (patch) | |
| tree | 830c2a033c329668cebc5106332f747eeac82cc5 /scripts/sorttable.h | |
| parent | d0b806fc9932a04dae87dbd03a2dea8114ee6996 (diff) | |
| parent | e896c04890aeff2292364c19632fc15d890d436c (diff) | |
Merge tag 'spi-mem-dtr-2' into nand/next
spi: Support DTR in spi-mem
Changes to support DTR with spi-mem.
Diffstat (limited to 'scripts/sorttable.h')
| -rw-r--r-- | scripts/sorttable.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/sorttable.h b/scripts/sorttable.h index 7bd0184380d3..a7c5445baf00 100644 --- a/scripts/sorttable.h +++ b/scripts/sorttable.h @@ -110,7 +110,7 @@ static inline unsigned long orc_ip(const int *ip) static int orc_sort_cmp(const void *_a, const void *_b) { - struct orc_entry *orc_a; + struct orc_entry *orc_a, *orc_b; const int *a = g_orc_ip_table + *(int *)_a; const int *b = g_orc_ip_table + *(int *)_b; unsigned long a_val = orc_ip(a); @@ -128,6 +128,9 @@ static int orc_sort_cmp(const void *_a, const void *_b) * whitelisted .o files which didn't get objtool generation. */ orc_a = g_orc_table + (a - g_orc_ip_table); + orc_b = g_orc_table + (b - g_orc_ip_table); + if (orc_a->type == ORC_TYPE_UNDEFINED && orc_b->type == ORC_TYPE_UNDEFINED) + return 0; return orc_a->type == ORC_TYPE_UNDEFINED ? -1 : 1; } |
