linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/edac: add missing macro arguments and missing macro edac_pci_remove_sysfs
@ 2021-07-15 13:58 Colin King
  2021-07-27 10:18 ` Robert Richter
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-07-15 13:58 UTC (permalink / raw)
  To: Borislav Petkov, Mauro Carvalho Chehab, Tony Luck, James Morse,
	Robert Richter, Doug Thompson, Andrew Morton, linux-edac
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The macros edac_pci_handle_pe and edac_pci_handle_npe are missing their
arguments and don't match the function prototypes they replace. Also
macro edac_pci_remove_sysfs is missing. Fix this by adding in the missing
arguments and missing macro.

Fixes: d4c1465b7de9 ("drivers/edac: fix edac_pci sysfs")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/edac/edac_module.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/edac/edac_module.h b/drivers/edac/edac_module.h
index aa1f91688eb8..ed194ba2c207 100644
--- a/drivers/edac/edac_module.h
+++ b/drivers/edac/edac_module.h
@@ -123,8 +123,9 @@ extern void edac_pci_handle_npe(struct edac_pci_ctl_info *pci,
 #define edac_sysfs_pci_teardown()
 #define edac_pci_get_check_errors()
 #define edac_pci_get_poll_msec()
-#define edac_pci_handle_pe()
-#define edac_pci_handle_npe()
+#define edac_pci_remove_sysfs(pci)
+#define edac_pci_handle_pe(pci, msg)
+#define edac_pci_handle_npe(pci, msg)
 #endif				/* CONFIG_PCI */
 
 #endif				/* __EDAC_MODULE_H__ */
-- 
2.31.1


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

* Re: [PATCH] drivers/edac: add missing macro arguments and missing macro edac_pci_remove_sysfs
  2021-07-15 13:58 [PATCH] drivers/edac: add missing macro arguments and missing macro edac_pci_remove_sysfs Colin King
@ 2021-07-27 10:18 ` Robert Richter
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Richter @ 2021-07-27 10:18 UTC (permalink / raw)
  To: Colin King
  Cc: Borislav Petkov, Mauro Carvalho Chehab, Tony Luck, James Morse,
	Doug Thompson, Andrew Morton, linux-edac, kernel-janitors,
	linux-kernel

On 15.07.21 14:58:26, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The macros edac_pci_handle_pe and edac_pci_handle_npe are missing their
> arguments and don't match the function prototypes they replace. Also
> macro edac_pci_remove_sysfs is missing. Fix this by adding in the missing
> arguments and missing macro.
> 
> Fixes: d4c1465b7de9 ("drivers/edac: fix edac_pci sysfs")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/edac/edac_module.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/edac/edac_module.h b/drivers/edac/edac_module.h
> index aa1f91688eb8..ed194ba2c207 100644
> --- a/drivers/edac/edac_module.h
> +++ b/drivers/edac/edac_module.h
> @@ -123,8 +123,9 @@ extern void edac_pci_handle_npe(struct edac_pci_ctl_info *pci,
>  #define edac_sysfs_pci_teardown()
>  #define edac_pci_get_check_errors()
>  #define edac_pci_get_poll_msec()
> -#define edac_pci_handle_pe()
> -#define edac_pci_handle_npe()
> +#define edac_pci_remove_sysfs(pci)
> +#define edac_pci_handle_pe(pci, msg)
> +#define edac_pci_handle_npe(pci, msg)

All drivers of those functions are guarded by CONFIG_PCI (all except
EDAC_MPC85XX by Kconfig dependency and for mpc85xx it is inline). Not
protected is only:

 drivers/edac/edac_module.c:     edac_pci_clear_parity_errors();
 drivers/edac/edac_pci.c:        edac_pci_remove_sysfs(pci);
 drivers/edac/edac_pci.c:        if (edac_pci_get_check_errors())
 drivers/edac/edac_pci.c:        msec = edac_pci_get_poll_msec();
 drivers/edac/edac_pci.c:                edac_queue_work(&pci->work, msecs_to_jiffies(edac_pci_get_poll_msec()));
 drivers/edac/edac_pci.c:        edac_pci_do_parity_check();

So instead of adding those stubs we should in fact remove the whole
!CONFIG_PCI part here, make edac_pci.c dependent on CONFIG_PCI too and
fix the use of edac_pci_clear_parity_errors() in modules.c which looks
wrong at this location anyway.

-Robert

>  #endif				/* CONFIG_PCI */
>  
>  #endif				/* __EDAC_MODULE_H__ */
> -- 
> 2.31.1
> 

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

end of thread, other threads:[~2021-07-27 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 13:58 [PATCH] drivers/edac: add missing macro arguments and missing macro edac_pci_remove_sysfs Colin King
2021-07-27 10:18 ` Robert Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).