Skip to content

Commit 6524c79

Browse files
committed
driver core: cpu: Make cpu_show_not_affected() static
Fix a -Wmissing-prototypes warning and add the gather_data_sampling() stub macro call for real. Fixes: 0fddfe3 ("driver core: cpu: Unify redundant silly stubs") Closes: https://lore.kernel.org/oe-kbuild-all/202308101956.oRj1ls7s-lkp@intel.com Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/202308101956.oRj1ls7s-lkp@intel.com
1 parent cbe8ded commit 6524c79

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

drivers/base/cpu.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ static void __init cpu_dev_register_generic(void)
509509
}
510510

511511
#ifdef CONFIG_GENERIC_CPU_VULNERABILITIES
512-
ssize_t cpu_show_not_affected(struct device *dev,
512+
static ssize_t cpu_show_not_affected(struct device *dev,
513513
struct device_attribute *attr, char *buf)
514514
{
515515
return sysfs_emit(buf, "Not affected\n");
@@ -534,12 +534,6 @@ CPU_SHOW_VULN_FALLBACK(retbleed);
534534
CPU_SHOW_VULN_FALLBACK(spec_rstack_overflow);
535535
CPU_SHOW_VULN_FALLBACK(gather_data_sampling);
536536

537-
ssize_t __weak cpu_show_gds(struct device *dev,
538-
struct device_attribute *attr, char *buf)
539-
{
540-
return sysfs_emit(buf, "Not affected\n");
541-
}
542-
543537
static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL);
544538
static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL);
545539
static DEVICE_ATTR(spectre_v2, 0444, cpu_show_spectre_v2, NULL);
@@ -552,7 +546,7 @@ static DEVICE_ATTR(srbds, 0444, cpu_show_srbds, NULL);
552546
static DEVICE_ATTR(mmio_stale_data, 0444, cpu_show_mmio_stale_data, NULL);
553547
static DEVICE_ATTR(retbleed, 0444, cpu_show_retbleed, NULL);
554548
static DEVICE_ATTR(spec_rstack_overflow, 0444, cpu_show_spec_rstack_overflow, NULL);
555-
static DEVICE_ATTR(gather_data_sampling, 0444, cpu_show_gds, NULL);
549+
static DEVICE_ATTR(gather_data_sampling, 0444, cpu_show_gather_data_sampling, NULL);
556550

557551
static struct attribute *cpu_root_vulnerabilities_attrs[] = {
558552
&dev_attr_meltdown.attr,

0 commit comments

Comments
 (0)