diff mbox

arch/parisc: correct use of SHF_ALLOC

Message ID Pine.LNX.4.64.0908042226231.3737@ask.diku.dk (mailing list archive)
State Accepted
Headers show

Commit Message

Julia Lawall Aug. 4, 2009, 8:27 p.m. UTC
From: Julia Lawall <julia@diku.dk>

SHF_ALLOC is suitable for testing against the sh_flags field, not the
sh_type field.

Signed-off-by: Julia Lawall <julia@diku.dk>

---
 arch/parisc/kernel/module.c         |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

kyle mcmartin Aug. 5, 2009, 2:57 p.m. UTC | #1
On Tue, Aug 04, 2009 at 10:27:07PM +0200, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
> 
> SHF_ALLOC is suitable for testing against the sh_flags field, not the
> sh_type field.
> 
> Signed-off-by: Julia Lawall <julia@diku.dk>
> 

Thanks Julia, applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
John David Anglin Sept. 27, 2009, 6:21 p.m. UTC | #2
Hi Kyle,

I noticed today that this change is not in 2.6.31.1.

Dave

On Tue, 04 Aug 2009, Julia Lawall wrote:

> From: Julia Lawall <julia@diku.dk>
> 
> SHF_ALLOC is suitable for testing against the sh_flags field, not the
> sh_type field.
> 
> Signed-off-by: Julia Lawall <julia@diku.dk>
> 
> ---
>  arch/parisc/kernel/module.c         |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
> index ef5caf2..c904817 100644
> --- a/arch/parisc/kernel/module.c
> +++ b/arch/parisc/kernel/module.c
> @@ -853,7 +853,7 @@ int module_finalize(const Elf_Ehdr *hdr,
>  	 * ourselves */
>  	for (i = 1; i < hdr->e_shnum; i++) {
>  		if(sechdrs[i].sh_type == SHT_SYMTAB
> -		   && (sechdrs[i].sh_type & SHF_ALLOC)) {
> +		   && (sechdrs[i].sh_flags & SHF_ALLOC)) {
>  			int strindex = sechdrs[i].sh_link;
>  			/* FIXME: AWFUL HACK
>  			 * The cast is to drop the const from
> --
> To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
kyle mcmartin Sept. 28, 2009, 3:29 a.m. UTC | #3
On Sun, Sep 27, 2009 at 02:21:50PM -0400, John David Anglin wrote:
> Hi Kyle,
> 
> I noticed today that this change is not in 2.6.31.1.
> 

Dunno what happened... I must have updated patchwork and missed it in a
rebase locally.
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index ef5caf2..c904817 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -853,7 +853,7 @@  int module_finalize(const Elf_Ehdr *hdr,
 	 * ourselves */
 	for (i = 1; i < hdr->e_shnum; i++) {
 		if(sechdrs[i].sh_type == SHT_SYMTAB
-		   && (sechdrs[i].sh_type & SHF_ALLOC)) {
+		   && (sechdrs[i].sh_flags & SHF_ALLOC)) {
 			int strindex = sechdrs[i].sh_link;
 			/* FIXME: AWFUL HACK
 			 * The cast is to drop the const from