From: Peter Oruba <peter.oruba@amd.com>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Cc: LKML <linux-kernel@vger.kernel.org>, Peter Oruba <peter.oruba@amd.com>
Subject: [patch 2/9] [PATCH 2/9] x86: Typedef removal.
Date: Fri, 25 Jul 2008 18:17:25 +0200 [thread overview]
Message-ID: <20080725162002.230691280@amd.com> (raw)
In-Reply-To: 20080725161723.636932280@amd.com
[-- Attachment #1: 0002-x86-Typedef-removal.patch --]
[-- Type: text/plain, Size: 4097 bytes --]
Removed typedefs. No functional changes to the code.
Signed-off-by: Peter Oruba <peter.oruba@amd.com>
---
arch/x86/kernel/microcode.c | 24 ++++++++++++------------
include/asm-x86/microcode.h | 3 ---
2 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c
index 230ca7e..406261a 100644
--- a/arch/x86/kernel/microcode.c
+++ b/arch/x86/kernel/microcode.c
@@ -102,17 +102,17 @@ MODULE_LICENSE("GPL");
#define MICROCODE_VERSION "1.14a"
#define DEFAULT_UCODE_DATASIZE (2000) /* 2000 bytes */
-#define MC_HEADER_SIZE (sizeof (microcode_header_t)) /* 48 bytes */
+#define MC_HEADER_SIZE (sizeof (struct microcode_header)) /* 48 bytes */
#define DEFAULT_UCODE_TOTALSIZE (DEFAULT_UCODE_DATASIZE + MC_HEADER_SIZE) /* 2048 bytes */
#define EXT_HEADER_SIZE (sizeof (struct extended_sigtable)) /* 20 bytes */
#define EXT_SIGNATURE_SIZE (sizeof (struct extended_signature)) /* 12 bytes */
#define DWSIZE (sizeof (u32))
#define get_totalsize(mc) \
- (((microcode_t *)mc)->hdr.totalsize ? \
- ((microcode_t *)mc)->hdr.totalsize : DEFAULT_UCODE_TOTALSIZE)
+ (((struct microcode *)mc)->hdr.totalsize ? \
+ ((struct microcode *)mc)->hdr.totalsize : DEFAULT_UCODE_TOTALSIZE)
#define get_datasize(mc) \
- (((microcode_t *)mc)->hdr.datasize ? \
- ((microcode_t *)mc)->hdr.datasize : DEFAULT_UCODE_DATASIZE)
+ (((struct microcode *)mc)->hdr.datasize ? \
+ ((struct microcode *)mc)->hdr.datasize : DEFAULT_UCODE_DATASIZE)
#define sigmatch(s1, s2, p1, p2) \
(((s1) == (s2)) && (((p1) & (p2)) || (((p1) == 0) && ((p2) == 0))))
@@ -130,7 +130,7 @@ static struct ucode_cpu_info {
unsigned int sig;
unsigned int pf;
unsigned int rev;
- microcode_t *mc;
+ struct microcode *mc;
} ucode_cpu_info[NR_CPUS];
static void collect_cpu_info(int cpu_num)
@@ -171,7 +171,7 @@ static void collect_cpu_info(int cpu_num)
}
static inline int microcode_update_match(int cpu_num,
- microcode_header_t *mc_header, int sig, int pf)
+ struct microcode_header *mc_header, int sig, int pf)
{
struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num;
@@ -183,7 +183,7 @@ static inline int microcode_update_match(int cpu_num,
static int microcode_sanity_check(void *mc)
{
- microcode_header_t *mc_header = mc;
+ struct microcode_header *mc_header = mc;
struct extended_sigtable *ext_header = NULL;
struct extended_signature *ext_sig;
unsigned long total_size, data_size, ext_table_size;
@@ -268,7 +268,7 @@ static int microcode_sanity_check(void *mc)
static int get_maching_microcode(void *mc, int cpu)
{
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
- microcode_header_t *mc_header = mc;
+ struct microcode_header *mc_header = mc;
struct extended_sigtable *ext_header;
unsigned long total_size = get_totalsize(mc_header);
int ext_sigcount, i;
@@ -355,7 +355,7 @@ static unsigned int user_buffer_size; /* it's size */
static long get_next_ucode(void **mc, long offset)
{
- microcode_header_t mc_header;
+ struct microcode_header mc_header;
unsigned long total_size;
/* No more data */
@@ -495,13 +495,13 @@ MODULE_ALIAS_MISCDEV(MICROCODE_MINOR);
static long get_next_ucode_from_buffer(void **mc, const u8 *buf,
unsigned long size, long offset)
{
- microcode_header_t *mc_header;
+ struct microcode_header *mc_header;
unsigned long total_size;
/* No more data */
if (offset >= size)
return 0;
- mc_header = (microcode_header_t *)(buf + offset);
+ mc_header = (struct microcode_header *)(buf + offset);
total_size = get_totalsize(mc_header);
if (offset + total_size > size) {
diff --git a/include/asm-x86/microcode.h b/include/asm-x86/microcode.h
index 5a05568..1519ef0 100644
--- a/include/asm-x86/microcode.h
+++ b/include/asm-x86/microcode.h
@@ -16,9 +16,6 @@ struct microcode {
unsigned int bits[0];
};
-typedef struct microcode microcode_t;
-typedef struct microcode_header microcode_header_t;
-
/* microcode format is extended from prescott processors */
struct extended_signature {
unsigned int sig;
--
1.5.4.5
next prev parent reply other threads:[~2008-07-25 16:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 16:17 [patch 0/9] x86: AMD microcode patch loading support Peter Oruba
2008-07-25 16:17 ` [patch 1/9] [PATCH 1/9] x86: Moved Intel microcode patch loader declarations to seperate header file Peter Oruba
2008-07-25 16:17 ` Peter Oruba [this message]
2008-07-25 16:17 ` [patch 3/9] [PATCH 3/9] x86: Moved per CPU microcode structure declaration to " Peter Oruba
2008-07-25 16:17 ` [patch 4/9] [PATCH 4/9] x86: Code split to two parts Peter Oruba
2008-07-25 16:17 ` [patch 5/9] [PATCH 5/9] x86: Structure declaration renaming Peter Oruba
2008-07-25 16:17 ` [patch 6/9] [PATCH 6/9] x86: Add AMD specific declarations Peter Oruba
2008-07-25 16:17 ` [patch 7/9] [PATCH 7/9] x86: First step of refactoring, introducing microcode_ops Peter Oruba
2008-07-25 16:17 ` [patch 8/9] [PATCH 8/9] x86: Major refactoring Peter Oruba
2008-07-26 9:11 ` Daniel K.
2008-07-25 16:17 ` [patch 9/9] [PATCH 9/9] x86: AMD microcode patch loading support Peter Oruba
2008-07-26 8:00 ` Rabin Vincent
2008-07-25 16:44 ` [PATCH] x86: Add entry to MAINTAINERS file Peter Oruba
2008-07-26 13:37 ` [patch 0/9] x86: AMD microcode patch loading support Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080725162002.230691280@amd.com \
--to=peter.oruba@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=tigran@aivazian.fsnet.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox