linux-mips
[Top] [All Lists]

Re: Patches for 34K APRP

To: "Kevin D. Kissell" <kevink@mips.com>
Subject: Re: Patches for 34K APRP
From: Ralf Baechle <ralf@linux-mips.org>
Date: Thu, 17 Apr 2008 13:29:58 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <4805FFE6.5080903@mips.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4805FFE6.5080903@mips.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.17 (2007-11-01)
On Wed, Apr 16, 2008 at 03:32:22PM +0200, Kevin D. Kissell wrote:

> >From d164aa1b9dba720ee08a6a773e1a81b62aea7d10 Mon Sep 17 00:00:00 2001
> From: Kevin D. Kissell <kevink@mips.com>
> Date: Thu, 10 Apr 2008 02:07:38 +0200
> Subject: [PATCH] Fixes necessary for non-SMP kernels and non-relocatable 
> binaries

>               struct elf_phdr *phdr = (struct elf_phdr *) ((char *)hdr + 
> hdr->e_phoff);
>  
>               for (i = 0; i < hdr->e_phnum; i++) {
> -                     if (phdr->p_type != PT_LOAD)
> -                             continue;
> -
> -                     memcpy((void *)phdr->p_paddr, (char *)hdr + 
> phdr->p_offset, phdr->p_filesz);
> -                     memset((void *)phdr->p_paddr + phdr->p_filesz, 0, 
> phdr->p_memsz - phdr->p_filesz);
> -                     phdr++;
> +                 if (phdr->p_type == PT_LOAD) {
> +                     memcpy((void *)phdr->p_paddr, 
> +                             (char *)hdr + phdr->p_offset, phdr->p_filesz);
> +                     memset((void *)phdr->p_paddr + phdr->p_filesz, 
> +                             0, phdr->p_memsz - phdr->p_filesz);
> +                 }

Patch applied with some reformatting to stick to the one tab per nesting
level rule.  Also git was bitching a little about whitespace:

.dotest/patch:13:       /* 
Space in indent is followed by a tab.
.dotest/patch:14:        * SMTC/SMVP kernels manage VPE enable independently,
Space in indent is followed by a tab.
.dotest/patch:15:        * but uniprocessor kernels need to turn it on, even
Space in indent is followed by a tab.
.dotest/patch:16:        * if that wasn't the pre-dvpe() state.
Space in indent is followed by a tab.
.dotest/patch:17:        */
warning: squelched 2 whitespace errors
warning: 7 lines applied after fixing whitespace errors.

Thanks,

  Ralf

<Prev in Thread] Current Thread [Next in Thread>