All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-lts:6.6/linux 2/10] drivers/edac/ieh_edac.c:701:8: error: call to undeclared function 'register_nmi_handler'; ISO C99 and later do not support implicit function declarations
@ 2024-02-09 22:54 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-09 22:54 UTC (permalink / raw)
  To: Qiuxu Zhuo; +Cc: oe-kbuild-all, ranjan-dutta

tree:   https://github.com/intel/linux-intel-lts.git 6.6/linux
head:   bb56715daf2e0efbbd8cf00a04a020e83baa05cb
commit: 9f721ed885803cd46cb312f7253c60e4864ffab3 [2/10] EDAC/ieh: Add I/O device EDAC driver for Intel CPUs with IEH
config: x86_64-buildonly-randconfig-004-20240210 (https://download.01.org/0day-ci/archive/20240210/202402100628.THP6QNBM-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240210/202402100628.THP6QNBM-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/202402100628.THP6QNBM-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/edac/ieh_edac.c:701:8: error: call to undeclared function 'register_nmi_handler'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     701 |                 rc = register_nmi_handler(NMI_SERR, ieh_nmi_handler,
         |                      ^
   drivers/edac/ieh_edac.c:701:8: note: did you mean 'register_err_handler'?
   drivers/edac/ieh_edac.c:694:12: note: 'register_err_handler' declared here
     694 | static int register_err_handler(void)
         |            ^
     695 | {
     696 |         bool os_visible = false;
     697 |         int rc;
     698 | 
     699 |         if (has_notification_by(IEH_NMI)) {
     700 |                 init_irq_work(&ieh_irq_work, ieh_irq_work_cb);
     701 |                 rc = register_nmi_handler(NMI_SERR, ieh_nmi_handler,
         |                      ~~~~~~~~~~~~~~~~~~~~
         |                      register_err_handler
>> drivers/edac/ieh_edac.c:701:29: error: use of undeclared identifier 'NMI_SERR'
     701 |                 rc = register_nmi_handler(NMI_SERR, ieh_nmi_handler,
         |                                           ^
>> drivers/edac/ieh_edac.c:727:3: error: call to undeclared function 'unregister_nmi_handler'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     727 |                 unregister_nmi_handler(NMI_SERR, IEH_NMI_NAME);
         |                 ^
   drivers/edac/ieh_edac.c:727:3: note: did you mean 'unregister_err_handler'?
   drivers/edac/ieh_edac.c:724:13: note: 'unregister_err_handler' declared here
     724 | static void unregister_err_handler(void)
         |             ^
     725 | {
     726 |         if (has_notification_by(IEH_NMI)) {
     727 |                 unregister_nmi_handler(NMI_SERR, IEH_NMI_NAME);
         |                 ~~~~~~~~~~~~~~~~~~~~~~
         |                 unregister_err_handler
   drivers/edac/ieh_edac.c:727:26: error: use of undeclared identifier 'NMI_SERR'
     727 |                 unregister_nmi_handler(NMI_SERR, IEH_NMI_NAME);
         |                                        ^
   4 errors generated.


vim +/register_nmi_handler +701 drivers/edac/ieh_edac.c

   693	
   694	static int register_err_handler(void)
   695	{
   696		bool os_visible = false;
   697		int rc;
   698	
   699		if (has_notification_by(IEH_NMI)) {
   700			init_irq_work(&ieh_irq_work, ieh_irq_work_cb);
 > 701			rc = register_nmi_handler(NMI_SERR, ieh_nmi_handler,
   702						  0, IEH_NMI_NAME);
   703			if (rc) {
   704				ieh_printk(KERN_ERR, "Can't register NMI handler\n");
   705				return rc;
   706			}
   707	
   708			os_visible = true;
   709		}
   710	
   711		if (has_notification_by(IEH_MCE)) {
   712			mce_register_decode_chain(&ieh_mce_dec);
   713			os_visible = true;
   714		}
   715	
   716		if (!os_visible) {
   717			ieh_printk(KERN_INFO, "No OS-visible IEH events\n");
   718			return -ENODEV;
   719		}
   720	
   721		return 0;
   722	}
   723	
   724	static void unregister_err_handler(void)
   725	{
   726		if (has_notification_by(IEH_NMI)) {
 > 727			unregister_nmi_handler(NMI_SERR, IEH_NMI_NAME);
   728			irq_work_sync(&ieh_irq_work);
   729		}
   730	
   731		if (has_notification_by(IEH_MCE))
   732			mce_unregister_decode_chain(&ieh_mce_dec);
   733	}
   734	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-09 22:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-09 22:54 [intel-lts:6.6/linux 2/10] drivers/edac/ieh_edac.c:701:8: error: call to undeclared function 'register_nmi_handler'; ISO C99 and later do not support implicit function declarations kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.