All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: bcm43xx-dev@lists.berlios.de
Cc: Stefano Brivio <stefano.brivio@polimi.it>,
	Larry Finger <larry.finger@lwfinger.net>,
	linux-wireless@vger.kernel.org
Subject: Re: [RFT] [PATCH] bcm43xx: ACI fixes
Date: Wed, 14 Mar 2007 15:17:52 +0100	[thread overview]
Message-ID: <200703141517.52624.mb@bu3sch.de> (raw)
In-Reply-To: <20070314074118.466bb9f0@localhost>

On Wednesday 14 March 2007 07:41, Stefano Brivio wrote:
> > > -	   aci_hw_rssi:1;
> > > +	   aci_hw_rssi:1,
> > > +	   aci_delay:5;
> > Should this be a bit field? Why not just make it a u8?
> 
> We only need 5 bits, as aci_delay will never be > 20.

I actually try to move away from the foo:x notation, as it generates bad code.
There's no benefit in saving 3 bits here and adding 100byte of additional
code, which is generated by gcc to mask and shift the bits. :)

> > > +	u8 aci_start;
> > >  };
> > >  
> > >  /* Data structures for DMA transmission, per 80211 core. */
> > > @@ -699,6 +708,18 @@ struct bcm43xx_noise_calculation {
> > >  	s8 samples[8][4];
> > >  };
> > >  
> > > +/* Statscounter data (currently ACI only). */
> > > +struct bcm43xx_statscounter_saved {
> > > +	u16 aci;
> > > +};
> > > +
> > > +/* Values for ACI moving average calculation. */
> > > +struct bcm43xx_aci_saved {
> > > +	u16 value[8];
> > > +	u8 next:3,
> > > +	   set:3;
> > As I will explain later, I don't think 'set' is needed. I also recommend
> > having 'next' be a plain u8.
> 
> Both values will never be > 7.

Please do u8 nevertheless to get better code.

-- 
Greetings Michael.

      reply	other threads:[~2007-03-14 14:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-12  0:04 [RFT] [PATCH] bcm43xx: ACI fixes Stefano Brivio
2007-03-12  3:29 ` Larry Finger
2007-03-12  5:51   ` Larry Finger
2007-03-12  6:05     ` Stefano Brivio
2007-03-12 20:28       ` Larry Finger
2007-03-12 20:53         ` Michael Buesch
2007-03-12 21:14           ` Larry Finger
2007-03-14  5:14 ` Larry Finger
2007-03-14  6:41   ` Stefano Brivio
2007-03-14 14:17     ` 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=200703141517.52624.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=larry.finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stefano.brivio@polimi.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.