mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* mm/fremap.c(104): remark #593: variable "pte_val" was set but never used
@ 2006-11-27 12:35 d binderman
  2006-11-28 18:01 ` Hugh Dickins
  0 siblings, 1 reply; 2+ messages in thread
From: d binderman @ 2006-11-27 12:35 UTC (permalink / raw)
  To: linux-kernel


Hello there,

I just tried to compile Linux kernel 2.6.18.3 with the Intel C
C compiler.

The compiler said

mm/fremap.c(104): remark #593: variable "pte_val" was set but never used

The source code is

    pte_t pte_val;

I have checked the source code and I agree with the compiler.
Suggest delete local variable.


Regards

David Binderman

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! 
http://www.msn.co.uk/newsletters


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mm/fremap.c(104): remark #593: variable "pte_val" was set but never used
  2006-11-27 12:35 mm/fremap.c(104): remark #593: variable "pte_val" was set but never used d binderman
@ 2006-11-28 18:01 ` Hugh Dickins
  0 siblings, 0 replies; 2+ messages in thread
From: Hugh Dickins @ 2006-11-28 18:01 UTC (permalink / raw)
  To: d binderman; +Cc: Andrew Morton, linux-kernel

On Mon, 27 Nov 2006, d binderman wrote:
> 
> I just tried to compile Linux kernel 2.6.18.3 with the Intel C
> C compiler.
> 
> The compiler said
> 
> mm/fremap.c(104): remark #593: variable "pte_val" was set but never used
> 
> The source code is
> 
>    pte_t pte_val;
> 
> I have checked the source code and I agree with the compiler.
> Suggest delete local variable.

You're right, thank you, here's a patch...


[PATCH] kill install_file_pte's pte_val

David Binderman and his Intel C compiler rightly observe that
install_file_pte no longer has any use for its pte_val.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
---

 mm/fremap.c |    2 --
 1 file changed, 2 deletions(-)

--- 2.6.19-rc6/mm/fremap.c	2006-11-16 08:22:25.000000000 +0000
+++ linux/mm/fremap.c	2006-11-28 17:50:47.000000000 +0000
@@ -101,7 +101,6 @@ int install_file_pte(struct mm_struct *m
 {
 	int err = -ENOMEM;
 	pte_t *pte;
-	pte_t pte_val;
 	spinlock_t *ptl;
 
 	pte = get_locked_pte(mm, addr, &ptl);
@@ -114,7 +113,6 @@ int install_file_pte(struct mm_struct *m
 	}
 
 	set_pte_at(mm, addr, pte, pgoff_to_pte(pgoff));
-	pte_val = *pte;
 	/*
 	 * We don't need to run update_mmu_cache() here because the "file pte"
 	 * being installed by install_file_pte() is not a real pte - it's a

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-28 18:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-27 12:35 mm/fremap.c(104): remark #593: variable "pte_val" was set but never used d binderman
2006-11-28 18:01 ` Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®