mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
x86, asm: use bool for bitops and other assembly outputs
The gcc people have confirmed that using "bool" when combined with inline assembly always is treated as a byte-sized operand that can be assumed to be 0 or 1, which is exactly what the SET instruction emits. Change the output types and intermediate variables of as many operations as practical to "bool". Signed-off-by: H. Peter Anvin <hpa@zytor.com> Link: http://lkml.kernel.org/r/1465414726-197858-3-git-send-email-hpa@linux.intel.com Reviewed-by: Andy Lutomirski <luto@kernel.org> Reviewed-by: Borislav Petkov <bp@suse.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
This commit is contained in:
parent
2823d4da5d
commit
117780eef7
13 changed files with 69 additions and 66 deletions
|
@ -95,27 +95,27 @@ static inline void prandom_seed_state(struct rnd_state *state, u64 seed)
|
|||
#ifdef CONFIG_ARCH_RANDOM
|
||||
# include <asm/archrandom.h>
|
||||
#else
|
||||
static inline int arch_get_random_long(unsigned long *v)
|
||||
static inline bool arch_get_random_long(unsigned long *v)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int arch_get_random_int(unsigned int *v)
|
||||
static inline bool arch_get_random_int(unsigned int *v)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int arch_has_random(void)
|
||||
static inline bool arch_has_random(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int arch_get_random_seed_long(unsigned long *v)
|
||||
static inline bool arch_get_random_seed_long(unsigned long *v)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int arch_get_random_seed_int(unsigned int *v)
|
||||
static inline bool arch_get_random_seed_int(unsigned int *v)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int arch_has_random_seed(void)
|
||||
static inline bool arch_has_random_seed(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue