Commit 1a45027d1afd7e85254b5ef8535e93ce3d588cf4
Committed by
Linus Torvalds
1 parent
ff6ac2a616
Exists in
master
and in
39 other branches
edac: remove unneeded functions and add static accessor
Collection of patches, merged into one, from Adrian that do the following: 1) This patch makes the following needlessly global functions static: - edac_pci_get_log_pe() - edac_pci_get_log_npe() - edac_pci_get_panic_on_pe() - edac_pci_unregister_sysfs_instance_kobj() - edac_pci_main_kobj_setup() 2) Remove unneeded function edac_device_find() 3) Added #if 0 around function edac_pci_find() 4) make the needlessly global edac_pci_generic_check() static 5) Removed function edac_check_mc_devices() Doug Thompson modified Adrian's patches, to bettern represent the direction of EDAC, and make them one patch. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 5 changed files with 11 additions and 59 deletions Side-by-side Diff
drivers/edac/edac_device.c
... | ... | @@ -375,37 +375,6 @@ |
375 | 375 | wait_for_completion(&edac_device->removal_complete); |
376 | 376 | } |
377 | 377 | |
378 | -/** | |
379 | - * edac_device_find | |
380 | - * Search for a edac_device_ctl_info structure whose index is 'idx'. | |
381 | - * | |
382 | - * If found, return a pointer to the structure. | |
383 | - * Else return NULL. | |
384 | - * | |
385 | - * Caller must hold device_ctls_mutex. | |
386 | - */ | |
387 | -struct edac_device_ctl_info *edac_device_find(int idx) | |
388 | -{ | |
389 | - struct list_head *item; | |
390 | - struct edac_device_ctl_info *edac_dev; | |
391 | - | |
392 | - /* Iterate over list, looking for exact match of ID */ | |
393 | - list_for_each(item, &edac_device_list) { | |
394 | - edac_dev = list_entry(item, struct edac_device_ctl_info, link); | |
395 | - | |
396 | - if (edac_dev->dev_idx >= idx) { | |
397 | - if (edac_dev->dev_idx == idx) | |
398 | - return edac_dev; | |
399 | - | |
400 | - /* not on list, so terminate early */ | |
401 | - break; | |
402 | - } | |
403 | - } | |
404 | - | |
405 | - return NULL; | |
406 | -} | |
407 | -EXPORT_SYMBOL_GPL(edac_device_find); | |
408 | - | |
409 | 378 | /* |
410 | 379 | * edac_device_workq_function |
411 | 380 | * performs the operation scheduled by a workq request |
drivers/edac/edac_mc.c
... | ... | @@ -886,25 +886,4 @@ |
886 | 886 | mci->csrows[csrow].channels[channel].ce_count++; |
887 | 887 | } |
888 | 888 | EXPORT_SYMBOL(edac_mc_handle_fbd_ce); |
889 | - | |
890 | -/* | |
891 | - * Iterate over all MC instances and check for ECC, et al, errors | |
892 | - */ | |
893 | -void edac_check_mc_devices(void) | |
894 | -{ | |
895 | - struct list_head *item; | |
896 | - struct mem_ctl_info *mci; | |
897 | - | |
898 | - debugf3("%s()\n", __func__); | |
899 | - mutex_lock(&mem_ctls_mutex); | |
900 | - | |
901 | - list_for_each(item, &mc_devices) { | |
902 | - mci = list_entry(item, struct mem_ctl_info, link); | |
903 | - | |
904 | - if (mci->edac_check != NULL) | |
905 | - mci->edac_check(mci); | |
906 | - } | |
907 | - | |
908 | - mutex_unlock(&mem_ctls_mutex); | |
909 | -} |
drivers/edac/edac_module.h
... | ... | @@ -27,7 +27,6 @@ |
27 | 27 | extern void edac_mc_unregister_sysfs_main_kobj(struct mem_ctl_info *mci); |
28 | 28 | extern int edac_create_sysfs_mci_device(struct mem_ctl_info *mci); |
29 | 29 | extern void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci); |
30 | -extern void edac_check_mc_devices(void); | |
31 | 30 | extern int edac_get_log_ue(void); |
32 | 31 | extern int edac_get_log_ce(void); |
33 | 32 | extern int edac_get_panic_on_ue(void); |
drivers/edac/edac_pci.c
... | ... | @@ -189,6 +189,9 @@ |
189 | 189 | wait_for_completion(&pci->complete); |
190 | 190 | } |
191 | 191 | |
192 | +#if 0 | |
193 | +/* Older code, but might use in the future */ | |
194 | + | |
192 | 195 | /* |
193 | 196 | * edac_pci_find() |
194 | 197 | * Search for an edac_pci_ctl_info structure whose index is 'idx' |
... | ... | @@ -219,6 +222,7 @@ |
219 | 222 | return NULL; |
220 | 223 | } |
221 | 224 | EXPORT_SYMBOL_GPL(edac_pci_find); |
225 | +#endif | |
222 | 226 | |
223 | 227 | /* |
224 | 228 | * edac_pci_workq_function() |
... | ... | @@ -422,7 +426,7 @@ |
422 | 426 | * |
423 | 427 | * a Generic parity check API |
424 | 428 | */ |
425 | -void edac_pci_generic_check(struct edac_pci_ctl_info *pci) | |
429 | +static void edac_pci_generic_check(struct edac_pci_ctl_info *pci) | |
426 | 430 | { |
427 | 431 | debugf4("%s()\n", __func__); |
428 | 432 | edac_pci_do_parity_check(); |
drivers/edac/edac_pci_sysfs.c
... | ... | @@ -37,17 +37,17 @@ |
37 | 37 | return check_pci_errors; |
38 | 38 | } |
39 | 39 | |
40 | -int edac_pci_get_log_pe(void) | |
40 | +static int edac_pci_get_log_pe(void) | |
41 | 41 | { |
42 | 42 | return edac_pci_log_pe; |
43 | 43 | } |
44 | 44 | |
45 | -int edac_pci_get_log_npe(void) | |
45 | +static int edac_pci_get_log_npe(void) | |
46 | 46 | { |
47 | 47 | return edac_pci_log_npe; |
48 | 48 | } |
49 | 49 | |
50 | -int edac_pci_get_panic_on_pe(void) | |
50 | +static int edac_pci_get_panic_on_pe(void) | |
51 | 51 | { |
52 | 52 | return edac_pci_panic_on_pe; |
53 | 53 | } |
... | ... | @@ -197,7 +197,8 @@ |
197 | 197 | * |
198 | 198 | * unregister the kobj for the EDAC PCI instance |
199 | 199 | */ |
200 | -void edac_pci_unregister_sysfs_instance_kobj(struct edac_pci_ctl_info *pci) | |
200 | +static void edac_pci_unregister_sysfs_instance_kobj( | |
201 | + struct edac_pci_ctl_info *pci) | |
201 | 202 | { |
202 | 203 | debugf0("%s()\n", __func__); |
203 | 204 | |
... | ... | @@ -337,7 +338,7 @@ |
337 | 338 | * setup the sysfs for EDAC PCI attributes |
338 | 339 | * assumes edac_class has already been initialized |
339 | 340 | */ |
340 | -int edac_pci_main_kobj_setup(void) | |
341 | +static int edac_pci_main_kobj_setup(void) | |
341 | 342 | { |
342 | 343 | int err; |
343 | 344 | struct sysdev_class *edac_class; |