public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] acpi: apei-base: fix sparse warnings
@ 2020-06-10 16:29 Garrit Franke
  2020-06-21  5:10 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Garrit Franke @ 2020-06-10 16:29 UTC (permalink / raw)
  To: rjw, lenb; +Cc: linux-acpi

Hi all,

first off, I must admit that this is my first kernel patch, so I would
love to receive any feedback. I thought that a good way to get started
is to check for minor warnings in drivers, so I went ahead and fixed
two of them:

"drivers/acpi/apei/apei-base.c:290:23: warning: symbol
'apei_resources_all' was not declared. Should it be static?"

"drivers/acpi/apei/apei-base.c:451:5: warning: symbol
'arch_apei_filter_addr' was not declared. Should it be static?"

Thanks for your time,
Garrit

Signed-off-by: Garrit Franke <garritfranke@gmail.com>
---
 drivers/acpi/apei/apei-base.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
index e358d0046..321318dcb 100644
--- a/drivers/acpi/apei/apei-base.c
+++ b/drivers/acpi/apei/apei-base.c
@@ -287,7 +287,7 @@ struct apei_res {
 };
 
 /* Collect all resources requested, to avoid conflict */
-struct apei_resources apei_resources_all = {
+static struct apei_resources apei_resources_all = {
 	.iomem = LIST_HEAD_INIT(apei_resources_all.iomem),
 	.ioport = LIST_HEAD_INIT(apei_resources_all.ioport),
 };
@@ -448,8 +448,9 @@ static int apei_get_nvs_resources(struct apei_resources *resources)
 	return acpi_nvs_for_each_region(apei_get_res_callback, resources);
 }
 
-int (*arch_apei_filter_addr)(int (*func)(__u64 start, __u64 size,
+static int (*arch_apei_filter_addr)(int (*func)(__u64 start, __u64 size,
 				     void *data), void *data);
+
 static int apei_get_arch_resources(struct apei_resources *resources)
 
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] acpi: apei-base: fix sparse warnings
  2020-06-10 16:29 [PATCH] acpi: apei-base: fix sparse warnings Garrit Franke
@ 2020-06-21  5:10 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-06-21  5:10 UTC (permalink / raw)
  To: Garrit Franke, rjw, lenb; +Cc: kbuild-all, linux-acpi

[-- Attachment #1: Type: text/plain, Size: 2205 bytes --]

Hi Garrit,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Garrit-Franke/acpi-apei-base-fix-sparse-warnings/20200611-003136
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-a012-20200621 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld: arch/x86/pci/mmconfig-shared.o: in function `pci_mmcfg_early_init':
>> arch/x86/pci/mmconfig-shared.c:671: undefined reference to `arch_apei_filter_addr'
>> ld: arch/x86/pci/mmconfig-shared.c:671: undefined reference to `arch_apei_filter_addr'
>> ld: arch/x86/pci/mmconfig-shared.c:671: undefined reference to `arch_apei_filter_addr'

vim +671 arch/x86/pci/mmconfig-shared.c

574a59414083df Jiang Liu  2012-06-22  661  
bb63b4219976d4 Yinghai Lu 2008-02-28  662  void __init pci_mmcfg_early_init(void)
05c58b8ac77639 Yinghai Lu 2008-02-15  663  {
574a59414083df Jiang Liu  2012-06-22  664  	if (pci_probe & PCI_PROBE_MMCONF) {
574a59414083df Jiang Liu  2012-06-22  665  		if (pci_mmcfg_check_hostbridge())
574a59414083df Jiang Liu  2012-06-22  666  			known_bridge = 1;
574a59414083df Jiang Liu  2012-06-22  667  		else
574a59414083df Jiang Liu  2012-06-22  668  			acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
bb63b4219976d4 Yinghai Lu 2008-02-28  669  		__pci_mmcfg_init(1);
d91525eb8ee6a6 Chen, Gong 2014-12-10  670  
d91525eb8ee6a6 Chen, Gong 2014-12-10 @671  		set_apei_filter();
05c58b8ac77639 Yinghai Lu 2008-02-15  672  	}
574a59414083df Jiang Liu  2012-06-22  673  }
05c58b8ac77639 Yinghai Lu 2008-02-15  674  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36618 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-21  5:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-10 16:29 [PATCH] acpi: apei-base: fix sparse warnings Garrit Franke
2020-06-21  5:10 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox