linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Improvements for random.h/archrandom.h
@ 2019-10-28 21:05 Richard Henderson
  2019-10-28 21:05 ` [PATCH 1/6] random: Mark CONFIG_ARCH_RANDOM functions __must_check Richard Henderson
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Richard Henderson @ 2019-10-28 21:05 UTC (permalink / raw)
  To: linux-arch; +Cc: linux-s390, x86, linuxppc-dev, linux-arm-kernel

During patch review for an addition of archrandom.h for arm64,
it was suggeted that the arch_random_get_* functions should be
marked __must_check.  Which does sound like a good idea, since
the by-reference integer output may be uninitialized when the
boolean result is false.

In addition, I noticed a few other minor inconsistencies between
the different architectures: x86 defines some functional macros
outside CONFIG_ARCH_RANDOM, and powerpc isn't using bool.


r~


Richard Henderson (6):
  random: Mark CONFIG_ARCH_RANDOM functions __must_check
  x86: Move arch_has_random* inside CONFIG_ARCH_RANDOM
  x86: Mark archrandom.h functions __must_check
  powerpc: Use bool in archrandom.h
  powerpc: Mark archrandom.h functions __must_check
  s390x: Mark archrandom.h functions __must_check

 arch/powerpc/include/asm/archrandom.h | 24 +++++++++++++-----------
 arch/s390/include/asm/archrandom.h    |  8 ++++----
 arch/x86/include/asm/archrandom.h     | 24 ++++++++++++------------
 include/linux/random.h                |  8 ++++----
 4 files changed, 33 insertions(+), 31 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-10-30 11:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 21:05 [PATCH 0/6] Improvements for random.h/archrandom.h Richard Henderson
2019-10-28 21:05 ` [PATCH 1/6] random: Mark CONFIG_ARCH_RANDOM functions __must_check Richard Henderson
2019-10-29  8:21   ` Ard Biesheuvel
2019-10-28 21:05 ` [PATCH 2/6] x86: Move arch_has_random* inside CONFIG_ARCH_RANDOM Richard Henderson
2019-10-28 21:05 ` [PATCH 3/6] x86: Mark archrandom.h functions __must_check Richard Henderson
2019-10-28 21:05 ` [PATCH 4/6] powerpc: Use bool in archrandom.h Richard Henderson
2019-10-28 21:05 ` [PATCH 5/6] powerpc: Mark archrandom.h functions __must_check Richard Henderson
2019-10-30 11:37   ` Michael Ellerman
2019-10-28 21:05 ` [PATCH 6/6] s390x: " Richard Henderson
2019-10-29  7:26   ` Harald Freudenberger
2019-10-29 13:18     ` Richard Henderson
2019-10-30  7:56       ` Harald Freudenberger
2019-10-29  8:22 ` [PATCH 0/6] Improvements for random.h/archrandom.h Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).