| .. | .. |
|---|
| 6 | 6 | |
|---|
| 7 | 7 | #include <asm/machdep.h> |
|---|
| 8 | 8 | |
|---|
| 9 | | -static inline int arch_get_random_long(unsigned long *v) |
|---|
| 9 | +static inline bool __must_check arch_get_random_long(unsigned long *v) |
|---|
| 10 | 10 | { |
|---|
| 11 | | - return 0; |
|---|
| 11 | + return false; |
|---|
| 12 | 12 | } |
|---|
| 13 | 13 | |
|---|
| 14 | | -static inline int arch_get_random_int(unsigned int *v) |
|---|
| 14 | +static inline bool __must_check arch_get_random_int(unsigned int *v) |
|---|
| 15 | 15 | { |
|---|
| 16 | | - return 0; |
|---|
| 16 | + return false; |
|---|
| 17 | 17 | } |
|---|
| 18 | 18 | |
|---|
| 19 | | -static inline int arch_get_random_seed_long(unsigned long *v) |
|---|
| 19 | +static inline bool __must_check arch_get_random_seed_long(unsigned long *v) |
|---|
| 20 | 20 | { |
|---|
| 21 | 21 | if (ppc_md.get_random_seed) |
|---|
| 22 | 22 | return ppc_md.get_random_seed(v); |
|---|
| 23 | 23 | |
|---|
| 24 | | - return 0; |
|---|
| 24 | + return false; |
|---|
| 25 | 25 | } |
|---|
| 26 | | -static inline int arch_get_random_seed_int(unsigned int *v) |
|---|
| 26 | + |
|---|
| 27 | +static inline bool __must_check arch_get_random_seed_int(unsigned int *v) |
|---|
| 27 | 28 | { |
|---|
| 28 | 29 | unsigned long val; |
|---|
| 29 | | - int rc; |
|---|
| 30 | + bool rc; |
|---|
| 30 | 31 | |
|---|
| 31 | 32 | rc = arch_get_random_seed_long(&val); |
|---|
| 32 | 33 | if (rc) |
|---|
| 33 | 34 | *v = val; |
|---|
| 34 | 35 | |
|---|
| 35 | 36 | return rc; |
|---|
| 36 | | -} |
|---|
| 37 | | - |
|---|
| 38 | | -static inline int arch_has_random(void) |
|---|
| 39 | | -{ |
|---|
| 40 | | - return 0; |
|---|
| 41 | | -} |
|---|
| 42 | | - |
|---|
| 43 | | -static inline int arch_has_random_seed(void) |
|---|
| 44 | | -{ |
|---|
| 45 | | - return !!ppc_md.get_random_seed; |
|---|
| 46 | 37 | } |
|---|
| 47 | 38 | #endif /* CONFIG_ARCH_RANDOM */ |
|---|
| 48 | 39 | |
|---|