diff options
author | Jan Beulich <jbeulich@suse.com> | 2012-01-12 16:45:39 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2012-01-12 16:45:39 +0100 |
commit | c7bd6f1e688a841b3c7e97893729452f04f770e4 (patch) | |
tree | a670fb212fd5c4d846cd9ba5f6e9a9f043900431 /xen/arch/x86/microcode_amd.c | |
parent | ac2dc37213347371e2bd89b7d0c7b185d03845b1 (diff) | |
download | xen-c7bd6f1e688a841b3c7e97893729452f04f770e4.tar.gz xen-c7bd6f1e688a841b3c7e97893729452f04f770e4.tar.bz2 xen-c7bd6f1e688a841b3c7e97893729452f04f770e4.zip |
x86: properly define size_t
Having it defined unilaterally as 'unsigned long' got me surprised
recently when I tried to use the 'z' printk type modifier, as that is
expected by the compiler to be used only on the type it knows size_t
is supposed to have.
Generally the compiler provides a construct to do this, so use it when
available.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Diffstat (limited to 'xen/arch/x86/microcode_amd.c')
-rw-r--r-- | xen/arch/x86/microcode_amd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xen/arch/x86/microcode_amd.c b/xen/arch/x86/microcode_amd.c index e5f4f660c1..97846775cd 100644 --- a/xen/arch/x86/microcode_amd.c +++ b/xen/arch/x86/microcode_amd.c @@ -183,10 +183,10 @@ static int get_next_ucode_from_buffer_amd( struct microcode_amd *mc_amd, const void *buf, size_t bufsize, - unsigned long *offset) + size_t *offset) { const uint8_t *bufp = buf; - unsigned long off; + size_t off; const struct mpbhdr *mpbuf; off = *offset; @@ -203,7 +203,7 @@ static int get_next_ucode_from_buffer_amd( return -EINVAL; } - printk(KERN_DEBUG "microcode: size %lu, block size %u, offset %ld\n", + printk(KERN_DEBUG "microcode: size %zu, block size %u, offset %zu\n", bufsize, mpbuf->len, off); if ( (off + mpbuf->len) > bufsize ) @@ -234,7 +234,7 @@ static int get_next_ucode_from_buffer_amd( static int install_equiv_cpu_table( struct microcode_amd *mc_amd, const uint32_t *buf, - unsigned long *offset) + size_t *offset) { const struct mpbhdr *mpbuf = (const struct mpbhdr *)&buf[1]; |