Re: [PATCH 1/2] hwrng: OMAP3 ROM Random Number Generator support

From: Joe Perches
Date: Wed Sep 18 2013 - 16:22:54 EST


On Wed, 2013-09-18 at 22:05 +0200, Pali Rohár wrote:
> This driver provides kernel-side support for the Random Number
> Generator hardware found on OMAP34xx processors.

[]

> diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c

trivial note:

It produces smaller overall code to add
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
before any #include and use

> +static void omap3_rom_rng_idle(unsigned long data)
> +{
> + int r;
> +
> + r = omap3_rom_rng_call(0, 0, RNG_RESET);
> + if (r != 0) {
> + printk(KERN_ERR "%s: reset failed: %d\n",
> + omap3_rom_rng_name, r);

pr_err("reset failed: %d\n", r);

> +static int omap3_rom_rng_get_random(void *buf, unsigned int count)
> +{
[]
> + if (r != 0) {
> + clk_disable_unprepare(rng_clk);
> + printk(KERN_ERR "%s: HW init failed: %d\n",
> + omap3_rom_rng_name, r);

pr_err("HW init failed: %d\n", r);

etc...


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/