27
27
28
28
/* Unconditional execution of RDRAND and RDSEED */
29
29
30
- static inline bool rdrand_long (unsigned long * v )
30
+ static inline bool __must_check rdrand_long (unsigned long * v )
31
31
{
32
32
bool ok ;
33
33
unsigned int retry = RDRAND_RETRY_LOOPS ;
@@ -41,7 +41,7 @@ static inline bool rdrand_long(unsigned long *v)
41
41
return false;
42
42
}
43
43
44
- static inline bool rdrand_int (unsigned int * v )
44
+ static inline bool __must_check rdrand_int (unsigned int * v )
45
45
{
46
46
bool ok ;
47
47
unsigned int retry = RDRAND_RETRY_LOOPS ;
@@ -55,7 +55,7 @@ static inline bool rdrand_int(unsigned int *v)
55
55
return false;
56
56
}
57
57
58
- static inline bool rdseed_long (unsigned long * v )
58
+ static inline bool __must_check rdseed_long (unsigned long * v )
59
59
{
60
60
bool ok ;
61
61
asm volatile (RDSEED_LONG
@@ -64,7 +64,7 @@ static inline bool rdseed_long(unsigned long *v)
64
64
return ok ;
65
65
}
66
66
67
- static inline bool rdseed_int (unsigned int * v )
67
+ static inline bool __must_check rdseed_int (unsigned int * v )
68
68
{
69
69
bool ok ;
70
70
asm volatile (RDSEED_INT
@@ -80,22 +80,22 @@ static inline bool rdseed_int(unsigned int *v)
80
80
*/
81
81
#ifdef CONFIG_ARCH_RANDOM
82
82
83
- static inline bool arch_get_random_long (unsigned long * v )
83
+ static inline bool __must_check arch_get_random_long (unsigned long * v )
84
84
{
85
85
return static_cpu_has (X86_FEATURE_RDRAND ) ? rdrand_long (v ) : false;
86
86
}
87
87
88
- static inline bool arch_get_random_int (unsigned int * v )
88
+ static inline bool __must_check arch_get_random_int (unsigned int * v )
89
89
{
90
90
return static_cpu_has (X86_FEATURE_RDRAND ) ? rdrand_int (v ) : false;
91
91
}
92
92
93
- static inline bool arch_get_random_seed_long (unsigned long * v )
93
+ static inline bool __must_check arch_get_random_seed_long (unsigned long * v )
94
94
{
95
95
return static_cpu_has (X86_FEATURE_RDSEED ) ? rdseed_long (v ) : false;
96
96
}
97
97
98
- static inline bool arch_get_random_seed_int (unsigned int * v )
98
+ static inline bool __must_check arch_get_random_seed_int (unsigned int * v )
99
99
{
100
100
return static_cpu_has (X86_FEATURE_RDSEED ) ? rdseed_int (v ) : false;
101
101
}
0 commit comments