lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87po8sy6je.fsf@anholt.net>
Date:   Wed, 08 Nov 2017 10:22:29 -0800
From:   Eric Anholt <eric@...olt.net>
To:     Florian Fainelli <f.fainelli@...il.com>,
        linux-kernel@...r.kernel.org
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        Matt Mackall <mpm@...enic.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        "maintainer\:BROADCOM BCM281XX\/BCM11XXX\/BCM216XX ARM ARCHITE..." 
        <bcm-kernel-feedback-list@...adcom.com>,
        Stefan Wahren <stefan.wahren@...e.com>,
        PrasannaKumar Muralidharan <prasannatsmkumar@...il.com>,
        Russell King <rmk+kernel@...linux.org.uk>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Harald Freudenberger <freude@...ux.vnet.ibm.com>,
        Sean Wang <sean.wang@...iatek.com>,
        Martin Kaiser <martin@...ser.cx>,
        Steffen Trumtrar <s.trumtrar@...gutronix.de>,
        "open list\:HARDWARE RANDOM NUMBER GENERATOR CORE" 
        <linux-crypto@...r.kernel.org>,
        "open list\:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        "moderated list\:BROADCOM BCM2835 ARM ARCHITECTURE" 
        <linux-rpi-kernel@...ts.infradead.org>,
        "moderated list\:BRO ADCOM BCM2835 ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 02/12] hwrng: bcm2835-rng: Define a driver private context

Florian Fainelli <f.fainelli@...il.com> writes:

> Instead of making hwrng::priv host the base register address, define a
> driver private context, make it per platform device instance and pass it
> down the different functions.
>
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
>  drivers/char/hw_random/bcm2835-rng.c | 55 ++++++++++++++++++++++--------------
>  1 file changed, 34 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c
> index a818418a7e4c..0d72147ab45b 100644
> --- a/drivers/char/hw_random/bcm2835-rng.c
> +++ b/drivers/char/hw_random/bcm2835-rng.c

> -static struct hwrng bcm2835_rng_ops = {
> -	.name	= "bcm2835",
> -	.read	= bcm2835_rng_read,
> -};
> -

>  	/* map peripheral */
> -	rng_base = devm_ioremap_resource(dev, r);
> -	if (IS_ERR(rng_base)) {
> +	priv->base = devm_ioremap_resource(dev, r);
> +	if (IS_ERR(priv->base)) {
>  		dev_err(dev, "failed to remap rng regs");
> -		return PTR_ERR(rng_base);
> +		return PTR_ERR(priv->base);
>  	}
> -	bcm2835_rng_ops.priv = (unsigned long)rng_base;
> +
> +	priv->rng.name = "bcm2835-rng";

Looks like an unintentional change from the previous "bcm2835" here?

Other than that, 1-2 are:

Reviewed-by: Eric Anholt <eric@...olt.net>

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ