Message ID | CACXcFmk-aYykec-paGy9S-kRy4ipZkhX009qdtJo+fPjopPCiQ@mail.gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
Series | Subject: [PATCH 1/4] random: Simple utility functions | expand |
On Thu, Feb 10, 2022 at 10:32:58PM +0800, Sandy Harris wrote: > Simple utilty functions used by patches later in the series > > Signed-off-by: Sandy Harris <sandyinchina@gmail.com> > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You sent multiple patches, yet no indication of which ones should be applied in which order. Greg could just guess, but if you are receiving this email, he guessed wrong and the patches didn't apply. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for a description of how to do this so that Greg has a chance to apply these correctly. - You did not specify a description of why the patch is needed, or possibly, any description at all, in the email body. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what is needed in order to properly describe the change. - You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what a proper Subject: line should look like. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot
diff --git a/drivers/char/random.c b/drivers/char/random.c index 3404a91edf29..c8618020b49f 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -356,6 +356,27 @@ #define CREATE_TRACE_POINTS #include <trace/events/random.h> +static void xor128(u32 *target, u32 *source) +{ + int i ; + for (i = 0 ; i < 4 ; i++) + *target++ ^= *source++ ; +} + +static void add128(u32 *target, u32 *source) +{ + int i ; + for (i = 0 ; i < 4 ; i++) + *target++ += *source++ ; +} + +static int get_hw_long(unsigned long *x) +{ + int ret ; + ret = get_random_bytes_arch((u8 *) x, 8) ; + return (ret == 8) ? 1 : 0 ; +} + /* #define ADD_INTERRUPT_BENCH */ /*
Simple utilty functions used by patches later in the series Signed-off-by: Sandy Harris <sandyinchina@gmail.com> --- drivers/char/random.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)