aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2016-04-15 13:00:26 -0400
committerIngo Molnar <mingo@kernel.org>2016-04-16 07:21:40 -0400
commita3819e3e71d5000c176918309284a1fa2f133fcf (patch)
treeac576bfd53c6f3d87d64f17758d5b68441dda817 /arch/x86
parent2e572599139d27db3aaf540b0d34f0a4f58dfca1 (diff)
x86: Fix non-static inlines
Four instances of incorrect usage of non-static "inline" crept up in arch/x86, all trivial; cleaning them up: EVT_TO_HPET_DEV() - made static, it is only used in kernel/hpet.c Debug version of check_iommu_entries() is an __init function. Non-debug dummy empty version of it is declared "inline" instead - which doesn't help to eliminate it (the caller is in a different unit, inlining doesn't happen). Switch to non-inlined __init function, which does eliminate it (by discarding it as part of __init section). crypto/sha-mb/sha1_mb.c: looks like they just forgot to add "static" to their two internal inlines, which emitted two unused functions into vmlinux. text data bss dec hex filename 95903394 20860288 35991552 152755234 91adc22 vmlinux_before 95903266 20860288 35991552 152755106 91adba2 vmlinux Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1460739626-12179-1-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/crypto/sha-mb/sha1_mb.c4
-rw-r--r--arch/x86/kernel/hpet.c2
-rw-r--r--arch/x86/kernel/pci-iommu_table.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/x86/crypto/sha-mb/sha1_mb.c
index a8a0224fa0f8..fb9c7a84700c 100644
--- a/arch/x86/crypto/sha-mb/sha1_mb.c
+++ b/arch/x86/crypto/sha-mb/sha1_mb.c
@@ -102,14 +102,14 @@ static asmlinkage struct job_sha1* (*sha1_job_mgr_submit)(struct sha1_mb_mgr *st
102static asmlinkage struct job_sha1* (*sha1_job_mgr_flush)(struct sha1_mb_mgr *state); 102static asmlinkage struct job_sha1* (*sha1_job_mgr_flush)(struct sha1_mb_mgr *state);
103static asmlinkage struct job_sha1* (*sha1_job_mgr_get_comp_job)(struct sha1_mb_mgr *state); 103static asmlinkage struct job_sha1* (*sha1_job_mgr_get_comp_job)(struct sha1_mb_mgr *state);
104 104
105inline void sha1_init_digest(uint32_t *digest) 105static inline void sha1_init_digest(uint32_t *digest)
106{ 106{
107 static const uint32_t initial_digest[SHA1_DIGEST_LENGTH] = {SHA1_H0, 107 static const uint32_t initial_digest[SHA1_DIGEST_LENGTH] = {SHA1_H0,
108 SHA1_H1, SHA1_H2, SHA1_H3, SHA1_H4 }; 108 SHA1_H1, SHA1_H2, SHA1_H3, SHA1_H4 };
109 memcpy(digest, initial_digest, sizeof(initial_digest)); 109 memcpy(digest, initial_digest, sizeof(initial_digest));
110} 110}
111 111
112inline uint32_t sha1_pad(uint8_t padblock[SHA1_BLOCK_SIZE * 2], 112static inline uint32_t sha1_pad(uint8_t padblock[SHA1_BLOCK_SIZE * 2],
113 uint32_t total_len) 113 uint32_t total_len)
114{ 114{
115 uint32_t i = total_len & (SHA1_BLOCK_SIZE - 1); 115 uint32_t i = total_len & (SHA1_BLOCK_SIZE - 1);
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index a1f0e4a5c47e..130f2b4b8ecb 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -54,7 +54,7 @@ struct hpet_dev {
54 char name[10]; 54 char name[10];
55}; 55};
56 56
57inline struct hpet_dev *EVT_TO_HPET_DEV(struct clock_event_device *evtdev) 57static inline struct hpet_dev *EVT_TO_HPET_DEV(struct clock_event_device *evtdev)
58{ 58{
59 return container_of(evtdev, struct hpet_dev, evt); 59 return container_of(evtdev, struct hpet_dev, evt);
60} 60}
diff --git a/arch/x86/kernel/pci-iommu_table.c b/arch/x86/kernel/pci-iommu_table.c
index 35ccf75696eb..f712dfdf1357 100644
--- a/arch/x86/kernel/pci-iommu_table.c
+++ b/arch/x86/kernel/pci-iommu_table.c
@@ -72,7 +72,7 @@ void __init check_iommu_entries(struct iommu_table_entry *start,
72 } 72 }
73} 73}
74#else 74#else
75inline void check_iommu_entries(struct iommu_table_entry *start, 75void __init check_iommu_entries(struct iommu_table_entry *start,
76 struct iommu_table_entry *finish) 76 struct iommu_table_entry *finish)
77{ 77{
78} 78}