All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: WANG Chao <chaowang@redhat.com>
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH] vmcore-dmesg: struct_val_u64() not casting u64 to u32
Date: Mon, 6 Jan 2014 14:14:47 -0500	[thread overview]
Message-ID: <20140106191447.GA19883@redhat.com> (raw)
In-Reply-To: <1389029854-2052-1-git-send-email-chaowang@redhat.com>

On Tue, Jan 07, 2014 at 01:37:34AM +0800, WANG Chao wrote:
> It seems gcc doesn't check return type from inline function.
> struct_val_u64() should return u64 otherwise upper 32bit is lost.
> 
> Signed-off-by: WANG Chao <chaowang@redhat.com>

Acked-by: Vivek Goyal <vgoyal@redhat.com>

Vivek

> ---
>  vmcore-dmesg/vmcore-dmesg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
> index 0f477c0..df14c89 100644
> --- a/vmcore-dmesg/vmcore-dmesg.c
> +++ b/vmcore-dmesg/vmcore-dmesg.c
> @@ -529,7 +529,7 @@ static inline uint32_t struct_val_u32(char *ptr, unsigned int offset)
>  	return(file32_to_cpu(*(uint32_t *)(ptr + offset)));
>  }
>  
> -static inline uint32_t struct_val_u64(char *ptr, unsigned int offset)
> +static inline uint64_t struct_val_u64(char *ptr, unsigned int offset)
>  {
>  	return(file64_to_cpu(*(uint64_t *)(ptr + offset)));
>  }
> -- 
> 1.8.4.2
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2014-01-06 19:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 17:37 [PATCH] vmcore-dmesg: struct_val_u64() not casting u64 to u32 WANG Chao
2014-01-06 19:14 ` Vivek Goyal [this message]
2014-01-13  5:29   ` WANG Chao
2014-01-13  8:43     ` Simon Horman

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=20140106191447.GA19883@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=chaowang@redhat.com \
    --cc=kexec@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.