Skip to content

Commit 4f48a28

Browse files
committed
scripts/sorttable: Remove unused write functions
The code of sorttable.h was copied from the recordmcount.h which defined various write functions for different sizes (2, 4, 8 byte lengths). But sorttable only uses the 4 byte writes. Remove the extra versions as they are not used. Cc: bpf <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nicolas Schier <[email protected]> Cc: Zheng Yejian <[email protected]> Cc: Martin Kelly <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Josh Poimboeuf <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 28b2439 commit 4f48a28

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

scripts/sorttable.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ static uint32_t (*r)(const uint32_t *);
6868
static uint16_t (*r2)(const uint16_t *);
6969
static uint64_t (*r8)(const uint64_t *);
7070
static void (*w)(uint32_t, uint32_t *);
71-
static void (*w2)(uint16_t, uint16_t *);
72-
static void (*w8)(uint64_t, uint64_t *);
7371
typedef void (*table_sort_t)(char *, int);
7472

7573
/*
@@ -146,31 +144,11 @@ static void wbe(uint32_t val, uint32_t *x)
146144
put_unaligned_be32(val, x);
147145
}
148146

149-
static void w2be(uint16_t val, uint16_t *x)
150-
{
151-
put_unaligned_be16(val, x);
152-
}
153-
154-
static void w8be(uint64_t val, uint64_t *x)
155-
{
156-
put_unaligned_be64(val, x);
157-
}
158-
159147
static void wle(uint32_t val, uint32_t *x)
160148
{
161149
put_unaligned_le32(val, x);
162150
}
163151

164-
static void w2le(uint16_t val, uint16_t *x)
165-
{
166-
put_unaligned_le16(val, x);
167-
}
168-
169-
static void w8le(uint64_t val, uint64_t *x)
170-
{
171-
put_unaligned_le64(val, x);
172-
}
173-
174152
/*
175153
* Move reserved section indices SHN_LORESERVE..SHN_HIRESERVE out of
176154
* the way to -256..-1, to avoid conflicting with real section
@@ -277,16 +255,12 @@ static int do_file(char const *const fname, void *addr)
277255
r2 = r2le;
278256
r8 = r8le;
279257
w = wle;
280-
w2 = w2le;
281-
w8 = w8le;
282258
break;
283259
case ELFDATA2MSB:
284260
r = rbe;
285261
r2 = r2be;
286262
r8 = r8be;
287263
w = wbe;
288-
w2 = w2be;
289-
w8 = w8be;
290264
break;
291265
default:
292266
fprintf(stderr, "unrecognized ELF data encoding %d: %s\n",

0 commit comments

Comments
 (0)