aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler-gcc3.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-16 20:42:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-16 20:42:21 -0500
commitaed606e3bc1f10753254db308d3fd8c053c41328 (patch)
treebd7c3860417e83181ec43c3c7c224858f2652fa0 /include/linux/compiler-gcc3.h
parent123df7ae0d0ed90d01ef4cb7316fa0b7ef0ec8a8 (diff)
parent280ef31a00073b4092bb47814fcb0a1f1f27b2bd (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu updates from Greg Ungerer: "This one has a major restructuring of the non-mmu 68000 support. It merges all the related SoC types that use the original 68000 cpu core internally so they can share the same core code. It also allows for supporting the original stand alone 68000 cpu in its own right. There is also a generalization of the clock support of the ColdFire parts, some merging of common ColdFire code, and a couple of bug fixes as well." * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: modify clock code so it can be used by all ColdFire CPU types m68knommu: add clock definitions for 54xx ColdFire CPU types m68knommu: add clock definitions for 5407 ColdFire CPU types m68knommu: add clock definitions for 5307 ColdFire CPU types m68knommu: add clock definitions for 528x ColdFire CPU types m68knommu: add clock definitions for 527x ColdFire CPU types m68knommu: add clock definitions for 5272 ColdFire CPU types m68knommu: add clock definitions for 525x ColdFire CPU types m68knommu: add clock definitions for 5249 ColdFire CPU types m68knommu: add clock definitions for 523x ColdFire CPU types m68knommu: add clock definitions for 5206 ColdFire CPU types m68knommu: add clock creation support macro for other ColdFire CPUs m68k: fix unused variable warning in mempcy.c m68knommu: make non-MMU page_to_virt() return a void * m68knommu: merge ColdFire 5249 and 525x definitions m68knommu: disable MC68000 cpu target when MMU is selected m68knommu: allow for configuration of true 68000 based systems m68knommu: platform code merge for 68000 core cpus
Diffstat (limited to 'include/linux/compiler-gcc3.h')
0 files changed, 0 insertions, 0 deletions
lds <torvalds@linux-foundation.org> 2010-05-25 11:07:02 -0400 err.h: add __must_check to error pointer handlers' href='/cgit/cgit.cgi/litmus-rt.git/commit/include/linux/err.h?id=e47103b1af5df52fa69e18b14d3012472f78817d'>e47103b1af5d
603c4ba96be9



d1bc8e954452






e47103b1af5d
d1bc8e954452




fa9ee9c4b988







ebba5f9fcb88

1da177e4c3f4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65














                                                              

                            

                    
                                                                  
 
                                                     



                              
                                                        



                          
                                                       
 
                                                

 
                                                               



                                                        






                                                                             
                                                           




                                 







                                                       

      
                         
#ifndef _LINUX_ERR_H
#define _LINUX_ERR_H

#include <linux/compiler.h>

#include <asm/errno.h>

/*
 * Kernel pointers have redundant information, so we can use a
 * scheme where we can return either an error code or a dentry
 * pointer with the same return value.
 *
 * This should be a per-architecture thing, to allow different
 * error and pointer decisions.
 */
#define MAX_ERRNO	4095

#ifndef __ASSEMBLY__

#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)

static inline void * __must_check ERR_PTR(long error)
{
	return (void *) error;
}

static inline long __must_check PTR_ERR(const void *ptr)
{
	return (long) ptr;
}

static inline long __must_check IS_ERR(const void *ptr)
{
	return IS_ERR_VALUE((unsigned long)ptr);
}

static inline long __must_check IS_ERR_OR_NULL(const void *ptr)
{
	return !ptr || IS_ERR_VALUE((unsigned long)ptr);
}

/**
 * ERR_CAST - Explicitly cast an error-valued pointer to another pointer type
 * @ptr: The pointer to cast.
 *
 * Explicitly cast an error-valued pointer to another pointer type in such a
 * way as to make it clear that's what's going on.
 */
static inline void * __must_check ERR_CAST(const void *ptr)
{
	/* cast away the const */
	return (void *) ptr;
}

static inline int __must_check PTR_RET(const void *ptr)
{
	if (IS_ERR(ptr))
		return PTR_ERR(ptr);
	else
		return 0;
}

#endif

#endif /* _LINUX_ERR_H */