Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

EDAC, MCE, AMD: Remove unneeded exports

Initially, those strings describing different parts of an MCE message
were shared with amd64_edac and were therefore exported to modules.
However, all except pp_msgs are used only in one place right now so hide
them and make them static.

No functionality change.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Borislav Petkov <bp@alien8.de>

authored by

Borislav Petkov and committed by
Borislav Petkov
0f08669e 980eec8b

+8 -18
+6 -11
drivers/edac/mce_amd.c
··· 39 39 */ 40 40 41 41 /* transaction type */ 42 - const char * const tt_msgs[] = { "INSN", "DATA", "GEN", "RESV" }; 43 - EXPORT_SYMBOL_GPL(tt_msgs); 42 + static const char * const tt_msgs[] = { "INSN", "DATA", "GEN", "RESV" }; 44 43 45 44 /* cache level */ 46 - const char * const ll_msgs[] = { "RESV", "L1", "L2", "L3/GEN" }; 47 - EXPORT_SYMBOL_GPL(ll_msgs); 45 + static const char * const ll_msgs[] = { "RESV", "L1", "L2", "L3/GEN" }; 48 46 49 47 /* memory transaction type */ 50 - const char * const rrrr_msgs[] = { 48 + static const char * const rrrr_msgs[] = { 51 49 "GEN", "RD", "WR", "DRD", "DWR", "IRD", "PRF", "EV", "SNP" 52 50 }; 53 - EXPORT_SYMBOL_GPL(rrrr_msgs); 54 51 55 52 /* participating processor */ 56 53 const char * const pp_msgs[] = { "SRC", "RES", "OBS", "GEN" }; 57 54 EXPORT_SYMBOL_GPL(pp_msgs); 58 55 59 56 /* request timeout */ 60 - const char * const to_msgs[] = { "no timeout", "timed out" }; 61 - EXPORT_SYMBOL_GPL(to_msgs); 57 + static const char * const to_msgs[] = { "no timeout", "timed out" }; 62 58 63 59 /* memory or i/o */ 64 - const char * const ii_msgs[] = { "MEM", "RESV", "IO", "GEN" }; 65 - EXPORT_SYMBOL_GPL(ii_msgs); 60 + static const char * const ii_msgs[] = { "MEM", "RESV", "IO", "GEN" }; 66 61 67 62 /* internal error type */ 68 - const char * const uu_msgs[] = { "RESV", "RESV", "HWA", "RESV" }; 63 + static const char * const uu_msgs[] = { "RESV", "RESV", "HWA", "RESV" }; 69 64 70 65 static const char * const f15h_mc1_mce_desc[] = { 71 66 "UC during a demand linefill from L2",
+2 -7
drivers/edac/mce_amd.h
··· 35 35 #define MCI_STATUS_DEFERRED BIT_64(44) 36 36 #define MCI_STATUS_POISON BIT_64(43) 37 37 38 + extern const char * const pp_msgs[]; 39 + 38 40 enum tt_ids { 39 41 TT_INSTR = 0, 40 42 TT_DATA, ··· 69 67 R4_EVICT, 70 68 R4_SNOOP, 71 69 }; 72 - 73 - extern const char * const tt_msgs[]; 74 - extern const char * const ll_msgs[]; 75 - extern const char * const rrrr_msgs[]; 76 - extern const char * const pp_msgs[]; 77 - extern const char * const to_msgs[]; 78 - extern const char * const ii_msgs[]; 79 70 80 71 /* 81 72 * per-family decoder ops