提交 198a6d5a 编写于 作者: R Russell King 提交者: Russell King

[ARM] pxa: silence warnings from cpu_is_xxx() macros

If only a single CPU type is selected, __cpu_is_xxx() doesn't
use its argument.  This causes the compiler to issue a warning
about an unused variable in the parent function.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 fd0b45df
...@@ -121,38 +121,32 @@ ...@@ -121,38 +121,32 @@
#define cpu_is_pxa21x() \ #define cpu_is_pxa21x() \
({ \ ({ \
unsigned int id = read_cpuid(CPUID_ID); \ __cpu_is_pxa21x(read_cpuid_id()); \
__cpu_is_pxa21x(id); \
}) })
#define cpu_is_pxa25x() \ #define cpu_is_pxa25x() \
({ \ ({ \
unsigned int id = read_cpuid(CPUID_ID); \ __cpu_is_pxa25x(read_cpuid_id()); \
__cpu_is_pxa25x(id); \
}) })
#define cpu_is_pxa27x() \ #define cpu_is_pxa27x() \
({ \ ({ \
unsigned int id = read_cpuid(CPUID_ID); \ __cpu_is_pxa27x(read_cpuid_id()); \
__cpu_is_pxa27x(id); \
}) })
#define cpu_is_pxa300() \ #define cpu_is_pxa300() \
({ \ ({ \
unsigned int id = read_cpuid(CPUID_ID); \ __cpu_is_pxa300(read_cpuid_id()); \
__cpu_is_pxa300(id); \
}) })
#define cpu_is_pxa310() \ #define cpu_is_pxa310() \
({ \ ({ \
unsigned int id = read_cpuid(CPUID_ID); \ __cpu_is_pxa310(read_cpuid_id()); \
__cpu_is_pxa310(id); \
}) })
#define cpu_is_pxa320() \ #define cpu_is_pxa320() \
({ \ ({ \
unsigned int id = read_cpuid(CPUID_ID); \ __cpu_is_pxa320(read_cpuid_id()); \
__cpu_is_pxa320(id); \
}) })
/* /*
...@@ -174,14 +168,12 @@ ...@@ -174,14 +168,12 @@
#define cpu_is_pxa2xx() \ #define cpu_is_pxa2xx() \
({ \ ({ \
unsigned int id = read_cpuid(CPUID_ID); \ __cpu_is_pxa2xx(read_cpuid_id()); \
__cpu_is_pxa2xx(id); \
}) })
#define cpu_is_pxa3xx() \ #define cpu_is_pxa3xx() \
({ \ ({ \
unsigned int id = read_cpuid(CPUID_ID); \ __cpu_is_pxa3xx(read_cpuid_id()); \
__cpu_is_pxa3xx(id); \
}) })
/* /*
......
...@@ -75,8 +75,21 @@ ...@@ -75,8 +75,21 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/stringify.h>
#include <linux/irqflags.h> #include <linux/irqflags.h>
/*
* The CPU ID never changes at run time, so we might as well tell the
* compiler that it's constant. Use this function to read the CPU ID
* rather than directly reading processor_id or read_cpuid() directly.
*/
static inline unsigned int read_cpuid_id(void) __attribute_const__;
static inline unsigned int read_cpuid_id(void)
{
return read_cpuid(CPUID_ID);
}
#define __exception __attribute__((section(".exception.text"))) #define __exception __attribute__((section(".exception.text")))
struct thread_info; struct thread_info;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册