score: add address space annotations
Annotate the address space for pointers that are used correctly with __user and __iomem, so that sparse can better warn about incorrect casts. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
9fb24cc500
commit
a1f8213b95
4 changed files with 16 additions and 14 deletions
|
|
@ -13,9 +13,9 @@ extern int fixup_exception(struct pt_regs *regs);
|
|||
#ifndef __ASSEMBLY__
|
||||
|
||||
#define __range_ok(addr, size) \
|
||||
((((unsigned long)(addr) >= 0x80000000) \
|
||||
((((unsigned long __force)(addr) >= 0x80000000) \
|
||||
|| ((unsigned long)(size) > 0x80000000) \
|
||||
|| (((unsigned long)(addr) + (unsigned long)(size)) > 0x80000000)))
|
||||
|| (((unsigned long __force)(addr) + (unsigned long)(size)) > 0x80000000)))
|
||||
|
||||
#define __access_ok(addr, size) \
|
||||
(__range_ok((addr), (size)) == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue