hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/x86/tools/insn_decoder_test.c
....@@ -1,13 +1,5 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
2
- * This program is free software; you can redistribute it and/or modify
3
- * it under the terms of the GNU General Public License as published by
4
- * the Free Software Foundation; either version 2 of the License, or
5
- * (at your option) any later version.
6
- *
7
- * This program is distributed in the hope that it will be useful,
8
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
- * GNU General Public License for more details.
113 *
124 * Copyright (C) IBM Corporation, 2009
135 */
....@@ -119,7 +111,7 @@
119111 int main(int argc, char **argv)
120112 {
121113 char line[BUFSIZE], sym[BUFSIZE] = "<unknown>";
122
- unsigned char insn_buf[16];
114
+ unsigned char insn_buff[16];
123115 struct insn insn;
124116 int insns = 0;
125117 int warnings = 0;
....@@ -138,7 +130,7 @@
138130 }
139131
140132 insns++;
141
- memset(insn_buf, 0, 16);
133
+ memset(insn_buff, 0, 16);
142134 strcpy(copy, line);
143135 tab1 = strchr(copy, '\t');
144136 if (!tab1)
....@@ -151,13 +143,13 @@
151143 *tab2 = '\0'; /* Characters beyond tab2 aren't examined */
152144 while (s < tab2) {
153145 if (sscanf(s, "%x", &b) == 1) {
154
- insn_buf[nb++] = (unsigned char) b;
146
+ insn_buff[nb++] = (unsigned char) b;
155147 s += 3;
156148 } else
157149 break;
158150 }
159151 /* Decode an instruction */
160
- insn_init(&insn, insn_buf, sizeof(insn_buf), x86_64);
152
+ insn_init(&insn, insn_buff, sizeof(insn_buff), x86_64);
161153 insn_get_length(&insn);
162154 if (insn.length != nb) {
163155 warnings++;