aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/cpu/match.c3
-rw-r--r--scripts/mod/file2alias.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/match.c b/arch/x86/kernel/cpu/match.c
index 2dfa52bcdfe2..5502b289341b 100644
--- a/arch/x86/kernel/cpu/match.c
+++ b/arch/x86/kernel/cpu/match.c
@@ -63,7 +63,7 @@ ssize_t arch_print_cpu_modalias(struct device *dev,
63 boot_cpu_data.x86_model); 63 boot_cpu_data.x86_model);
64 size -= n; 64 size -= n;
65 buf += n; 65 buf += n;
66 size -= 2; 66 size -= 1;
67 for (i = 0; i < NCAPINTS*32; i++) { 67 for (i = 0; i < NCAPINTS*32; i++) {
68 if (boot_cpu_has(i)) { 68 if (boot_cpu_has(i)) {
69 n = snprintf(buf, size, ",%04X", i); 69 n = snprintf(buf, size, ",%04X", i);
@@ -75,7 +75,6 @@ ssize_t arch_print_cpu_modalias(struct device *dev,
75 buf += n; 75 buf += n;
76 } 76 }
77 } 77 }
78 *buf++ = ',';
79 *buf++ = '\n'; 78 *buf++ = '\n';
80 return buf - bufptr; 79 return buf - bufptr;
81} 80}
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index a468af059834..78fd81fb9732 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -1021,8 +1021,9 @@ static int do_x86cpu_entry(const char *filename, struct x86_cpu_id *id,
1021 ADD(alias, "vendor:", id->vendor != X86_VENDOR_ANY, id->vendor); 1021 ADD(alias, "vendor:", id->vendor != X86_VENDOR_ANY, id->vendor);
1022 ADD(alias, ":family:", id->family != X86_FAMILY_ANY, id->family); 1022 ADD(alias, ":family:", id->family != X86_FAMILY_ANY, id->family);
1023 ADD(alias, ":model:", id->model != X86_MODEL_ANY, id->model); 1023 ADD(alias, ":model:", id->model != X86_MODEL_ANY, id->model);
1024 ADD(alias, ":feature:*,", id->feature != X86_FEATURE_ANY, id->feature); 1024 strcat(alias, ":feature:*");
1025 strcat(alias, ",*"); 1025 if (id->feature != X86_FEATURE_ANY)
1026 sprintf(alias + strlen(alias), "%04X*", id->feature);
1026 return 1; 1027 return 1;
1027} 1028}
1028ADD_TO_DEVTABLE("x86cpu", struct x86_cpu_id, do_x86cpu_entry); 1029ADD_TO_DEVTABLE("x86cpu", struct x86_cpu_id, do_x86cpu_entry);