mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: bcm43xx-dev@lists.berlios.de
Cc: akpm@osdl.org, Deepak Saxena <dsaxena@plexity.net>,
	bcm43xx-dev@lists.berlios.de, linux-kernel@vger.kernel.org,
	Sergey Vlasov <vsu@altlinux.ru>
Subject: Re: [patch 9/9] Add bcm43xx HW RNG support
Date: Fri, 12 May 2006 22:51:52 +0200	[thread overview]
Message-ID: <200605122251.52561.mb@bu3sch.de> (raw)
In-Reply-To: <200605121816.55025.vda@ilport.com.ua>

On Friday 12 May 2006 17:16, Denis Vlasenko wrote:
> On Friday 12 May 2006 13:35, Michael Buesch wrote:
> > +static int bcm43xx_rng_read(struct hwrng *rng, u32 *data)
> > +{
> > +	struct bcm43xx_private *bcm = (struct bcm43xx_private *)rng->priv;
> > +	unsigned long flags;
> > +
> > +	bcm43xx_lock(bcm, flags);
> > +	*data = bcm43xx_read16(bcm, BCM43xx_MMIO_RNG);
> 
> You are storing random 16-bit value _and_ 16 zero bits
> into 32-bit memory location. Probably not a problem for
> little-endian machine (you return 2, indicating that there
> are only 2 bytes of randomness), but on big endian?
> 
> Didn't you mean
> 
> 	*(u16*)data = bcm43xx_read16(bcm, BCM43xx_MMIO_RNG); ?


Nope, the code is correct.

-- 
Greetings Michael.

      parent reply	other threads:[~2006-05-12 20:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-12 10:35 [patch 0/9] New Generic HW RNG (#3) mb
2006-05-12 10:35 ` [patch 1/9] Remove old HW RNG support mb
2006-05-12 10:35 ` [patch 2/9] Add new generic HW RNG core mb
2006-05-12 10:35 ` [patch 3/9] Add Intel HW RNG driver mb
2006-05-12 11:08   ` Sergey Vlasov
2006-05-12 20:48     ` Michael Buesch
2006-05-12 10:35 ` [patch 4/9] Add AMD " mb
2006-05-12 10:35 ` [patch 5/9] Add Geode " mb
2006-05-12 11:05   ` David Vrabel
2006-05-12 20:46     ` Michael Buesch
2006-05-12 21:06       ` David Vrabel
2006-05-15 15:35       ` Jordan Crouse
2006-05-12 10:35 ` [patch 6/9] Add VIA " mb
2006-05-12 10:35 ` [patch 7/9] Add ixp4xx " mb
2006-05-12 10:35 ` [patch 8/9] Add TI OMAP CPU family " mb
2006-05-12 10:35 ` [patch 9/9] Add bcm43xx HW RNG support mb
2006-05-12 15:16   ` Denis Vlasenko
2006-05-12 15:20     ` Johannes Berg
2006-05-12 20:51     ` Michael Buesch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200605122251.52561.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=akpm@osdl.org \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=dsaxena@plexity.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vsu@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome