Re: [PATCH v2] hwrng: add Zhaoxin rng driver base on rep_xstore instruction

From: Herbert Xu
Date: Fri Dec 01 2023 - 04:38:50 EST


On Tue, Nov 21, 2023 at 11:29:39AM +0800, LeoLiu-oc wrote:
>
> +config HW_RANDOM_ZHAOXIN
> + tristate "Zhaoxin HW Random Number Generator support"
> + depends on X86
> + default HW_RANDOM

Please remove this default.

> diff --git a/drivers/char/hw_random/via-rng.c b/drivers/char/hw_random/via-rng.c
> index a9a0a3b09c8b..6d1312845802 100644
> --- a/drivers/char/hw_random/via-rng.c
> +++ b/drivers/char/hw_random/via-rng.c
> @@ -35,9 +35,6 @@
> #include <asm/cpufeature.h>
> #include <asm/fpu/api.h>
>
> -
> -
> -

Please don't make unrelated changes in a patch.

> pr_info("VIA RNG detected\n");
> err = hwrng_register(&via_rng);
> if (err) {
> - pr_err(PFX "RNG registering failed (%d)\n",
> - err);
> + pr_err(PFX "RNG registering failed (%d)\n", err);

Ditto.

> +#include <crypto/padlock.h>
> +#include <linux/module.h>
> +#include <linux/kernel.h>
> +#include <linux/hw_random.h>
> +#include <linux/delay.h>
> +#include <linux/io.h>
> +#include <linux/cpufeature.h>
> +#include <asm/cpu_device_id.h>
> +#include <asm/fpu/api.h>

Please sort this alphabetically.

Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt