Hello.

On 16-11-2010 15:58, Dongdong Deng wrote:

> Passing the address of current->thread.evr register to memcpy function.

> Signed-off-by: Dongdong Deng<[email protected]>
> CC: Hai Shan<[email protected]>
> CC: Milton Miller<[email protected]>
> CC: [email protected]
> ---
>   arch/powerpc/kernel/kgdb.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)

> diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
> index 7a9db64..781acff 100644
> --- a/arch/powerpc/kernel/kgdb.c
> +++ b/arch/powerpc/kernel/kgdb.c
> @@ -337,7 +337,7 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs 
> *regs)
>               /* FP registers 32 ->  63 */
>   #if defined(CONFIG_FSL_BOOKE)&&  defined(CONFIG_SPE)
>               if (current)
> -                     memcpy(mem, current->thread.evr[regno-32],
> +                     memcpy(mem, (void *)&current->thread.evr[regno-32],
>                                       dbg_reg_def[regno].size);
>   #else
>               /* fp registers not used by kernel, leave zero */
> @@ -362,7 +362,7 @@ int dbg_set_reg(int regno, void *mem, struct pt_regs 
> *regs)
>       if (regno>= 32&&  regno<  64) {
>               /* FP registers 32 ->  63 */
>   #if defined(CONFIG_FSL_BOOKE)&&  defined(CONFIG_SPE)
> -             memcpy(current->thread.evr[regno-32], mem,
> +             memcpy((void *)&current->thread.evr[regno-32], mem,

    Doesn't any pointer type get converted to 'void *' automatically? These 
casts are not really needed...

WBR, Sergei

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to