Commit 98c20bf4 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] misc fixes

- 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()
parent e95b2065
...@@ -583,7 +583,8 @@ static int do_proc_readlink(struct dentry *dentry, struct vfsmount *mnt, ...@@ -583,7 +583,8 @@ static int do_proc_readlink(struct dentry *dentry, struct vfsmount *mnt,
if (len > buflen) if (len > buflen)
len = buflen; len = buflen;
copy_to_user(buffer, path, len); if (copy_to_user(buffer, path, len))
len = -EFAULT;
out: out:
free_page((unsigned long)tmp); free_page((unsigned long)tmp);
return len; return len;
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
/* .. and these are ours ... */ /* .. and these are ours ... */
#define _PAGE_DIRTY 0x20000 #define _PAGE_DIRTY 0x20000
#define _PAGE_ACCESSED 0x40000 #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 * NOTE! The "accessed" bit isn't necessarily exact: it can be kept exactly
......
...@@ -110,7 +110,7 @@ void pgtable_cache_init(void); ...@@ -110,7 +110,7 @@ void pgtable_cache_init(void);
#define _PAGE_PSE 0x080 /* 4 MB (or 2MB) page, Pentium+, if present.. */ #define _PAGE_PSE 0x080 /* 4 MB (or 2MB) page, Pentium+, if present.. */
#define _PAGE_GLOBAL 0x100 /* Global TLB entry PPro+ */ #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_PROTNONE 0x080 /* If not present */
#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY) #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) { return (pte).pte_low & _PAGE_USER; } ...@@ -188,6 +188,10 @@ static inline int pte_exec(pte_t pte) { return (pte).pte_low & _PAGE_USER; }
static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } 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_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; }
static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } 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 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; } static inline pte_t pte_rdprotect(pte_t pte) { (pte).pte_low &= ~_PAGE_USER; return pte; }
......
...@@ -151,7 +151,7 @@ static inline void set_pml4(pml4_t *dst, pml4_t val) ...@@ -151,7 +151,7 @@ static inline void set_pml4(pml4_t *dst, pml4_t val)
#define _PAGE_ACCESSED 0x020 #define _PAGE_ACCESSED 0x020
#define _PAGE_DIRTY 0x040 #define _PAGE_DIRTY 0x040
#define _PAGE_PSE 0x080 /* 2MB page */ #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_GLOBAL 0x100 /* Global TLB entry */
#define _PAGE_PROTNONE 0x080 /* If not present */ #define _PAGE_PROTNONE 0x080 /* If not present */
......
...@@ -3381,7 +3381,9 @@ static void amp_voyetra(cs46xx_t *chip, int change) ...@@ -3381,7 +3381,9 @@ static void amp_voyetra(cs46xx_t *chip, int change)
/* Manage the EAPD bit on the Crystal 4297 /* Manage the EAPD bit on the Crystal 4297
and the Analog AD1885 */ and the Analog AD1885 */
#ifdef CONFIG_SND_CS46XX_NEW_DSP
int old = chip->amplifier; int old = chip->amplifier;
#endif
int oval, val; int oval, val;
chip->amplifier += change; chip->amplifier += change;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment