mm/memory: use uninitialized_var() macro for suppressing gcc warnings
Subsystems (2)
PATCH 1/1 mm/memory: use uninitialized_var() macro for suppressing gcc warnings
uninitialized_var() macro was introduced in 94909914 (Add unitialized_var() macro for suppressing gcc warnings)
mm/memory.c:1485: warning: 'ptl' may be used uninitialized in this function mm/memory.c:561: warning: 'dst_ptl' may be used uninitialized in this function
Signed-off-by Alexander Beregalov <[email protected]>
---
mm/memory.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
mm/memory.c +2 -2
@@ -558,7 +558,7 @@ static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, unsigned long addr, unsigned long end) {pte_t *src_pte, *dst_pte; -spinlock_t *src_ptl, *dst_ptl; +spinlock_t *src_ptl, *uninitialized_var (dst_ptl );int progress =0 ;int rss[2 ];
@@ -1482,7 +1482,7 @@ static int remap_pte_range(struct mm_struct *mm, pmd_t *pmd, unsigned long pfn, pgprot_t prot) {pte_t *pte; -spinlock_t *ptl; +spinlock_t *uninitialized_var (ptl ); pte =pte_alloc_map_lock (mm, pmd, addr, &ptl);if (!pte)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>