* [tip:x86/bugs 2/4] drivers/base/cpu.c:512:9: warning: no previous prototype for 'cpu_show_not_affected'
@ 2023-08-10 11:12 kernel test robot
2023-08-10 11:34 ` [tip: x86/bugs] driver core: cpu: Make cpu_show_not_affected() static tip-bot2 for Borislav Petkov (AMD)
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-08-10 11:12 UTC (permalink / raw)
To: Borislav Petkov (AMD)
Cc: oe-kbuild-all, linux-kernel, x86, Greg Kroah-Hartman, Nikolay Borisov
Hi Borislav,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/bugs
head: cbe8ded48b939b9d55d2c5589ab56caa7b530709
commit: 0fddfe338210aa018137c03030c581f5ea4be282 [2/4] driver core: cpu: Unify redundant silly stubs
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20230810/202308101956.oRj1ls7s-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230810/202308101956.oRj1ls7s-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308101956.oRj1ls7s-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/base/cpu.c:512:9: warning: no previous prototype for 'cpu_show_not_affected' [-Wmissing-prototypes]
512 | ssize_t cpu_show_not_affected(struct device *dev,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/base/cpu.c:537:16: warning: no previous prototype for 'cpu_show_gds' [-Wmissing-prototypes]
537 | ssize_t __weak cpu_show_gds(struct device *dev,
| ^~~~~~~~~~~~
vim +/cpu_show_not_affected +512 drivers/base/cpu.c
510
511 #ifdef CONFIG_GENERIC_CPU_VULNERABILITIES
> 512 ssize_t cpu_show_not_affected(struct device *dev,
513 struct device_attribute *attr, char *buf)
514 {
515 return sysfs_emit(buf, "Not affected\n");
516 }
517
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip: x86/bugs] driver core: cpu: Make cpu_show_not_affected() static
2023-08-10 11:12 [tip:x86/bugs 2/4] drivers/base/cpu.c:512:9: warning: no previous prototype for 'cpu_show_not_affected' kernel test robot
@ 2023-08-10 11:34 ` tip-bot2 for Borislav Petkov (AMD)
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Borislav Petkov (AMD) @ 2023-08-10 11:34 UTC (permalink / raw)
To: linux-tip-commits
Cc: kernel test robot, Borislav Petkov (AMD), x86, linux-kernel
The following commit has been merged into the x86/bugs branch of tip:
Commit-ID: 6524c798b727ffdb5c7eaed2f50e8e839997df8e
Gitweb: https://git.kernel.org/tip/6524c798b727ffdb5c7eaed2f50e8e839997df8e
Author: Borislav Petkov (AMD) <bp@alien8.de>
AuthorDate: Thu, 10 Aug 2023 13:22:29 +02:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Thu, 10 Aug 2023 13:25:12 +02:00
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: 0fddfe338210 ("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
---
drivers/base/cpu.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 054c81b..d7300d8 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -509,7 +509,7 @@ static void __init cpu_dev_register_generic(void)
}
#ifdef CONFIG_GENERIC_CPU_VULNERABILITIES
-ssize_t cpu_show_not_affected(struct device *dev,
+static ssize_t cpu_show_not_affected(struct device *dev,
struct device_attribute *attr, char *buf)
{
return sysfs_emit(buf, "Not affected\n");
@@ -534,12 +534,6 @@ CPU_SHOW_VULN_FALLBACK(retbleed);
CPU_SHOW_VULN_FALLBACK(spec_rstack_overflow);
CPU_SHOW_VULN_FALLBACK(gather_data_sampling);
-ssize_t __weak cpu_show_gds(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- return sysfs_emit(buf, "Not affected\n");
-}
-
static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL);
static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL);
static DEVICE_ATTR(spectre_v2, 0444, cpu_show_spectre_v2, NULL);
@@ -552,7 +546,7 @@ static DEVICE_ATTR(srbds, 0444, cpu_show_srbds, NULL);
static DEVICE_ATTR(mmio_stale_data, 0444, cpu_show_mmio_stale_data, NULL);
static DEVICE_ATTR(retbleed, 0444, cpu_show_retbleed, NULL);
static DEVICE_ATTR(spec_rstack_overflow, 0444, cpu_show_spec_rstack_overflow, NULL);
-static DEVICE_ATTR(gather_data_sampling, 0444, cpu_show_gds, NULL);
+static DEVICE_ATTR(gather_data_sampling, 0444, cpu_show_gather_data_sampling, NULL);
static struct attribute *cpu_root_vulnerabilities_attrs[] = {
&dev_attr_meltdown.attr,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-10 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10 11:12 [tip:x86/bugs 2/4] drivers/base/cpu.c:512:9: warning: no previous prototype for 'cpu_show_not_affected' kernel test robot
2023-08-10 11:34 ` [tip: x86/bugs] driver core: cpu: Make cpu_show_not_affected() static tip-bot2 for Borislav Petkov (AMD)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®