Commit 2da1c119 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

drivers/edac: core: make functions static

This patch makes needlessly global code static, in the edac core
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Cc: Doug Thompson <norsk5@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5da0831c
...@@ -178,7 +178,7 @@ static struct sysfs_ops memctrlfs_ops = { ...@@ -178,7 +178,7 @@ static struct sysfs_ops memctrlfs_ops = {
}; };
#define MEMCTRL_ATTR(_name,_mode,_show,_store) \ #define MEMCTRL_ATTR(_name,_mode,_show,_store) \
struct memctrl_dev_attribute attr_##_name = { \ static struct memctrl_dev_attribute attr_##_name = { \
.attr = {.name = __stringify(_name), .mode = _mode }, \ .attr = {.name = __stringify(_name), .mode = _mode }, \
.value = &_name, \ .value = &_name, \
.show = _show, \ .show = _show, \
...@@ -186,7 +186,7 @@ struct memctrl_dev_attribute attr_##_name = { \ ...@@ -186,7 +186,7 @@ struct memctrl_dev_attribute attr_##_name = { \
}; };
#define MEMCTRL_STRING_ATTR(_name,_data,_mode,_show,_store) \ #define MEMCTRL_STRING_ATTR(_name,_data,_mode,_show,_store) \
struct memctrl_dev_attribute attr_##_name = { \ static struct memctrl_dev_attribute attr_##_name = { \
.attr = {.name = __stringify(_name), .mode = _mode }, \ .attr = {.name = __stringify(_name), .mode = _mode }, \
.value = _data, \ .value = _data, \
.show = _show, \ .show = _show, \
...@@ -343,7 +343,7 @@ static struct sysfs_ops edac_pci_sysfs_ops = { ...@@ -343,7 +343,7 @@ static struct sysfs_ops edac_pci_sysfs_ops = {
}; };
#define EDAC_PCI_ATTR(_name,_mode,_show,_store) \ #define EDAC_PCI_ATTR(_name,_mode,_show,_store) \
struct edac_pci_dev_attribute edac_pci_attr_##_name = { \ static struct edac_pci_dev_attribute edac_pci_attr_##_name = { \
.attr = {.name = __stringify(_name), .mode = _mode }, \ .attr = {.name = __stringify(_name), .mode = _mode }, \
.value = &_name, \ .value = &_name, \
.show = _show, \ .show = _show, \
...@@ -351,7 +351,7 @@ struct edac_pci_dev_attribute edac_pci_attr_##_name = { \ ...@@ -351,7 +351,7 @@ struct edac_pci_dev_attribute edac_pci_attr_##_name = { \
}; };
#define EDAC_PCI_STRING_ATTR(_name,_data,_mode,_show,_store) \ #define EDAC_PCI_STRING_ATTR(_name,_data,_mode,_show,_store) \
struct edac_pci_dev_attribute edac_pci_attr_##_name = { \ static struct edac_pci_dev_attribute edac_pci_attr_##_name = { \
.attr = {.name = __stringify(_name), .mode = _mode }, \ .attr = {.name = __stringify(_name), .mode = _mode }, \
.value = _data, \ .value = _data, \
.show = _show, \ .show = _show, \
...@@ -722,7 +722,7 @@ static struct sysfs_ops csrowfs_ops = { ...@@ -722,7 +722,7 @@ static struct sysfs_ops csrowfs_ops = {
}; };
#define CSROWDEV_ATTR(_name,_mode,_show,_store,_private) \ #define CSROWDEV_ATTR(_name,_mode,_show,_store,_private) \
struct csrowdev_attribute attr_##_name = { \ static struct csrowdev_attribute attr_##_name = { \
.attr = {.name = __stringify(_name), .mode = _mode }, \ .attr = {.name = __stringify(_name), .mode = _mode }, \
.show = _show, \ .show = _show, \
.store = _store, \ .store = _store, \
...@@ -1066,7 +1066,7 @@ static struct sysfs_ops mci_ops = { ...@@ -1066,7 +1066,7 @@ static struct sysfs_ops mci_ops = {
}; };
#define MCIDEV_ATTR(_name,_mode,_show,_store) \ #define MCIDEV_ATTR(_name,_mode,_show,_store) \
struct mcidev_attribute mci_attr_##_name = { \ static struct mcidev_attribute mci_attr_##_name = { \
.attr = {.name = __stringify(_name), .mode = _mode }, \ .attr = {.name = __stringify(_name), .mode = _mode }, \
.show = _show, \ .show = _show, \
.store = _store, \ .store = _store, \
...@@ -1220,7 +1220,7 @@ static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) ...@@ -1220,7 +1220,7 @@ static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
#ifdef CONFIG_EDAC_DEBUG #ifdef CONFIG_EDAC_DEBUG
void edac_mc_dump_channel(struct channel_info *chan) static void edac_mc_dump_channel(struct channel_info *chan)
{ {
debugf4("\tchannel = %p\n", chan); debugf4("\tchannel = %p\n", chan);
debugf4("\tchannel->chan_idx = %d\n", chan->chan_idx); debugf4("\tchannel->chan_idx = %d\n", chan->chan_idx);
...@@ -1228,9 +1228,8 @@ void edac_mc_dump_channel(struct channel_info *chan) ...@@ -1228,9 +1228,8 @@ void edac_mc_dump_channel(struct channel_info *chan)
debugf4("\tchannel->label = '%s'\n", chan->label); debugf4("\tchannel->label = '%s'\n", chan->label);
debugf4("\tchannel->csrow = %p\n\n", chan->csrow); debugf4("\tchannel->csrow = %p\n\n", chan->csrow);
} }
EXPORT_SYMBOL_GPL(edac_mc_dump_channel);
void edac_mc_dump_csrow(struct csrow_info *csrow) static void edac_mc_dump_csrow(struct csrow_info *csrow)
{ {
debugf4("\tcsrow = %p\n", csrow); debugf4("\tcsrow = %p\n", csrow);
debugf4("\tcsrow->csrow_idx = %d\n", csrow->csrow_idx); debugf4("\tcsrow->csrow_idx = %d\n", csrow->csrow_idx);
...@@ -1244,9 +1243,8 @@ void edac_mc_dump_csrow(struct csrow_info *csrow) ...@@ -1244,9 +1243,8 @@ void edac_mc_dump_csrow(struct csrow_info *csrow)
debugf4("\tcsrow->channels = %p\n", csrow->channels); debugf4("\tcsrow->channels = %p\n", csrow->channels);
debugf4("\tcsrow->mci = %p\n\n", csrow->mci); debugf4("\tcsrow->mci = %p\n\n", csrow->mci);
} }
EXPORT_SYMBOL_GPL(edac_mc_dump_csrow);
void edac_mc_dump_mci(struct mem_ctl_info *mci) static void edac_mc_dump_mci(struct mem_ctl_info *mci)
{ {
debugf3("\tmci = %p\n", mci); debugf3("\tmci = %p\n", mci);
debugf3("\tmci->mtype_cap = %lx\n", mci->mtype_cap); debugf3("\tmci->mtype_cap = %lx\n", mci->mtype_cap);
...@@ -1260,7 +1258,6 @@ void edac_mc_dump_mci(struct mem_ctl_info *mci) ...@@ -1260,7 +1258,6 @@ void edac_mc_dump_mci(struct mem_ctl_info *mci)
mci->mod_name, mci->ctl_name); mci->mod_name, mci->ctl_name);
debugf3("\tpvt_info = %p\n\n", mci->pvt_info); debugf3("\tpvt_info = %p\n\n", mci->pvt_info);
} }
EXPORT_SYMBOL_GPL(edac_mc_dump_mci);
#endif /* CONFIG_EDAC_DEBUG */ #endif /* CONFIG_EDAC_DEBUG */
...@@ -1576,7 +1573,8 @@ struct mem_ctl_info * edac_mc_del_mc(struct device *dev) ...@@ -1576,7 +1573,8 @@ struct mem_ctl_info * edac_mc_del_mc(struct device *dev)
} }
EXPORT_SYMBOL_GPL(edac_mc_del_mc); EXPORT_SYMBOL_GPL(edac_mc_del_mc);
void edac_mc_scrub_block(unsigned long page, unsigned long offset, u32 size) static void edac_mc_scrub_block(unsigned long page, unsigned long offset,
u32 size)
{ {
struct page *pg; struct page *pg;
void *virt_addr; void *virt_addr;
...@@ -1605,7 +1603,6 @@ void edac_mc_scrub_block(unsigned long page, unsigned long offset, u32 size) ...@@ -1605,7 +1603,6 @@ void edac_mc_scrub_block(unsigned long page, unsigned long offset, u32 size)
if (PageHighMem(pg)) if (PageHighMem(pg))
local_irq_restore(flags); local_irq_restore(flags);
} }
EXPORT_SYMBOL_GPL(edac_mc_scrub_block);
/* FIXME - should return -1 */ /* FIXME - should return -1 */
int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, unsigned long page) int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, unsigned long page)
......
...@@ -424,19 +424,11 @@ static inline void pci_write_bits32(struct pci_dev *pdev, int offset, ...@@ -424,19 +424,11 @@ static inline void pci_write_bits32(struct pci_dev *pdev, int offset,
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
#ifdef CONFIG_EDAC_DEBUG
void edac_mc_dump_channel(struct channel_info *chan);
void edac_mc_dump_mci(struct mem_ctl_info *mci);
void edac_mc_dump_csrow(struct csrow_info *csrow);
#endif /* CONFIG_EDAC_DEBUG */
extern struct mem_ctl_info * edac_mc_find(int idx); extern struct mem_ctl_info * edac_mc_find(int idx);
extern int edac_mc_add_mc(struct mem_ctl_info *mci,int mc_idx); extern int edac_mc_add_mc(struct mem_ctl_info *mci,int mc_idx);
extern struct mem_ctl_info * edac_mc_del_mc(struct device *dev); extern struct mem_ctl_info * edac_mc_del_mc(struct device *dev);
extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci,
unsigned long page); unsigned long page);
extern void edac_mc_scrub_block(unsigned long page, unsigned long offset,
u32 size);
/* /*
* The no info errors are used when error overflows are reported. * The no info errors are used when error overflows are reported.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment