

- Fix warning in sound/pci/cs46xx/cs46xx_lib.c (Martin Bligh)

- pte_file() comment fix (Pete Zaitcev)

- _PAGE_FILE comment clarifications

- copy_to_user() check in do_proc_readlink()


 fs/proc/base.c                |    3 ++-
 include/asm-alpha/pgtable.h   |    2 +-
 include/asm-i386/pgtable.h    |    6 +++++-
 include/asm-x86_64/pgtable.h  |    2 +-
 sound/pci/cs46xx/cs46xx_lib.c |    2 ++
 5 files changed, 11 insertions(+), 4 deletions(-)

diff -puN sound/pci/cs46xx/cs46xx_lib.c~misc sound/pci/cs46xx/cs46xx_lib.c
--- 25/sound/pci/cs46xx/cs46xx_lib.c~misc	2003-03-30 23:51:22.000000000 -0800
+++ 25-akpm/sound/pci/cs46xx/cs46xx_lib.c	2003-03-30 23:51:22.000000000 -0800
@@ -3381,7 +3381,9 @@ static void amp_voyetra(cs46xx_t *chip, 
 	/* Manage the EAPD bit on the Crystal 4297 
 	   and the Analog AD1885 */
 	   
+#ifdef CONFIG_SND_CS46XX_NEW_DSP
 	int old = chip->amplifier;
+#endif
 	int oval, val;
 	
 	chip->amplifier += change;
diff -puN include/asm-i386/pgtable.h~misc include/asm-i386/pgtable.h
--- 25/include/asm-i386/pgtable.h~misc	2003-03-30 23:51:22.000000000 -0800
+++ 25-akpm/include/asm-i386/pgtable.h	2003-03-30 23:51:22.000000000 -0800
@@ -110,7 +110,7 @@ void pgtable_cache_init(void);
 #define _PAGE_PSE	0x080	/* 4 MB (or 2MB) page, Pentium+, if present.. */
 #define _PAGE_GLOBAL	0x100	/* Global TLB entry PPro+ */
 
-#define _PAGE_FILE	0x040	/* pagecache or swap? */
+#define _PAGE_FILE	0x040	/* set:pagecache unset:swap */
 #define _PAGE_PROTNONE	0x080	/* If not present */
 
 #define _PAGE_TABLE	(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY)
@@ -188,6 +188,10 @@ static inline int pte_exec(pte_t pte)		{
 static inline int pte_dirty(pte_t pte)		{ return (pte).pte_low & _PAGE_DIRTY; }
 static inline int pte_young(pte_t pte)		{ return (pte).pte_low & _PAGE_ACCESSED; }
 static inline int pte_write(pte_t pte)		{ return (pte).pte_low & _PAGE_RW; }
+
+/*
+ * The following only works if pte_present() is not true.
+ */
 static inline int pte_file(pte_t pte)		{ return (pte).pte_low & _PAGE_FILE; }
 
 static inline pte_t pte_rdprotect(pte_t pte)	{ (pte).pte_low &= ~_PAGE_USER; return pte; }
diff -puN include/asm-alpha/pgtable.h~misc include/asm-alpha/pgtable.h
--- 25/include/asm-alpha/pgtable.h~misc	2003-03-30 23:51:22.000000000 -0800
+++ 25-akpm/include/asm-alpha/pgtable.h	2003-03-30 23:51:22.000000000 -0800
@@ -68,7 +68,7 @@
 /* .. and these are ours ... */
 #define _PAGE_DIRTY	0x20000
 #define _PAGE_ACCESSED	0x40000
-#define _PAGE_FILE	0x80000	/* pagecache or swap? */
+#define _PAGE_FILE	0x80000	/* set:pagecache, unset:swap */
 
 /*
  * NOTE! The "accessed" bit isn't necessarily exact:  it can be kept exactly
diff -puN include/asm-x86_64/pgtable.h~misc include/asm-x86_64/pgtable.h
--- 25/include/asm-x86_64/pgtable.h~misc	2003-03-30 23:51:22.000000000 -0800
+++ 25-akpm/include/asm-x86_64/pgtable.h	2003-03-30 23:51:22.000000000 -0800
@@ -151,7 +151,7 @@ static inline void set_pml4(pml4_t *dst,
 #define _PAGE_ACCESSED	0x020
 #define _PAGE_DIRTY	0x040
 #define _PAGE_PSE	0x080	/* 2MB page */
-#define _PAGE_FILE	0x040	/* pagecache or swap */
+#define _PAGE_FILE	0x040	/* set:pagecache, unset:swap */
 #define _PAGE_GLOBAL	0x100	/* Global TLB entry */
 
 #define _PAGE_PROTNONE	0x080	/* If not present */
diff -puN fs/proc/base.c~misc fs/proc/base.c
--- 25/fs/proc/base.c~misc	2003-03-30 23:51:28.000000000 -0800
+++ 25-akpm/fs/proc/base.c	2003-03-30 23:52:03.000000000 -0800
@@ -583,7 +583,8 @@ static int do_proc_readlink(struct dentr
 
 	if (len > buflen)
 		len = buflen;
-	copy_to_user(buffer, path, len);
+	if (copy_to_user(buffer, path, len))
+		len = -EFAULT;
  out:
 	free_page((unsigned long)tmp);
 	return len;

_
