linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-wireless@vger.kernel.org,
	Gertjan van Wingerde <gwingerde@gmail.com>
Subject: Re: [PATCH 8/9] rt2800: add eFuse EEPROM support code to rt2800lib
Date: Sun, 8 Nov 2009 19:08:23 +0100	[thread overview]
Message-ID: <200911081908.23307.IvDoorn@gmail.com> (raw)
In-Reply-To: <200911081834.51635.bzolnier@gmail.com>

On Sunday 08 November 2009, Bartlomiej Zolnierkiewicz wrote:
> On Sunday 08 November 2009 14:55:59 Ivo van Doorn wrote:
> > On Sunday 08 November 2009, Bartlomiej Zolnierkiewicz wrote:
> > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > > Subject: [PATCH] rt2800: add eFuse EEPROM support code to rt2800lib
> > > 
> > > eFuse EEPROM is used also by USB chips (i.e. RT3070)
> > > so move the needed code from rt2800pci to rt2800lib.
> > > 
> > > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > > ---
> > >  drivers/net/wireless/rt2x00/rt2800.h    |   29 +++++++++++++++++++++
> > >  drivers/net/wireless/rt2x00/rt2800lib.c |   43 ++++++++++++++++++++++++++++++++
> > >  drivers/net/wireless/rt2x00/rt2800lib.h |    2 +
> > >  drivers/net/wireless/rt2x00/rt2800pci.c |   38 ++--------------------------
> > >  drivers/net/wireless/rt2x00/rt2800pci.h |   29 ---------------------
> > >  5 files changed, 77 insertions(+), 64 deletions(-)
> > 
> > 
> > > ===================================================================
> > > --- a/drivers/net/wireless/rt2x00/rt2800pci.c
> > > +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
> > > @@ -147,44 +147,12 @@ static void rt2800pci_read_eeprom_pci(st
> > >  
> > >  static int rt2800pci_efuse_detect(struct rt2x00_dev *rt2x00dev)
> > >  {
> > > -	u32 reg;
> > > -
> > > -	rt2800_register_read(rt2x00dev, EFUSE_CTRL, &reg);
> > > -
> > > -	return rt2x00_get_field32(reg, EFUSE_CTRL_PRESENT);
> > > +	return rt2800_efuse_detect(rt2x00dev);
> > >  }
> > 
> > It would be better to fix all calls to rt2800pci_efuse_detect to use rt2800_efuse_detect
> > rather then adding a special wrapper function for it.
> > 
> > > -static void rt2800pci_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev)
> > > +static inline void rt2800pci_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev)
> > >  {
> > > -	unsigned int i;
> > > -
> > > -	for (i = 0; i < EEPROM_SIZE / sizeof(u16); i += 8)
> > > -		rt2800pci_efuse_read(rt2x00dev, i);
> > > +	rt2800_read_eeprom_efuse(rt2x00dev);
> > >  }
> > 
> > Same here.
> 
> Could you please explain some more what do you mean by that?
> (Please note that we have an extra SOC handling in rt2800pci.c.)

Your changes made the following 2 functions:

int rt2800pci_efuse_detect(struct rt2x00_dev *rt2x00dev)
{
	return rt2800_efuse_detect(rt2x00dev);
}

void rt2800pci_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev)
{
	rt2800_read_eeprom_efuse(rt2x00dev);
}

So why do we need rt2800pci_* versions in this case? They simply wrap
the rt2800 library function without providing anything extra...

Ivo

  reply	other threads:[~2009-11-08 18:08 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-08 13:38 [PATCH 1/9] rt2800: prepare for unification of EEPROM support code Bartlomiej Zolnierkiewicz
2009-11-08 13:39 ` [PATCH 2/9] rt2800: unify " Bartlomiej Zolnierkiewicz
2009-11-08 13:51   ` Ivo van Doorn
2009-11-08 14:19   ` Gertjan van Wingerde
2009-11-08 13:39 ` [PATCH 3/9] rt2800pci: add missing RF values to rf_vals table Bartlomiej Zolnierkiewicz
2009-11-08 13:51   ` Ivo van Doorn
2009-11-08 14:20   ` Gertjan van Wingerde
2009-11-08 13:39 ` [PATCH 4/9] rt2800usb: reorganize code in rt2800usb_probe_hw_mode() Bartlomiej Zolnierkiewicz
2009-11-08 13:52   ` Ivo van Doorn
2009-11-08 14:20   ` Gertjan van Wingerde
2009-11-08 13:39 ` [PATCH 5/9] rt2800: prepare for rt2800*_probe_hw_mode() unification Bartlomiej Zolnierkiewicz
2009-11-08 13:53   ` Ivo van Doorn
2009-11-08 14:35   ` Gertjan van Wingerde
2009-11-08 17:48     ` Bartlomiej Zolnierkiewicz
2009-11-08 19:09       ` Gertjan van Wingerde
2009-11-08 13:39 ` [PATCH 6/9] rt2800: unify rt2800*_probe_hw_mode() Bartlomiej Zolnierkiewicz
2009-11-08 13:53   ` Ivo van Doorn
2009-11-08 14:36   ` Gertjan van Wingerde
2009-11-08 13:39 ` [PATCH 7/9] rt2800usb: fix RX descriptor naming Bartlomiej Zolnierkiewicz
2009-11-08 13:54   ` Ivo van Doorn
2009-11-08 14:37   ` Gertjan van Wingerde
2009-11-08 13:39 ` [PATCH 8/9] rt2800: add eFuse EEPROM support code to rt2800lib Bartlomiej Zolnierkiewicz
2009-11-08 13:55   ` Ivo van Doorn
2009-11-08 17:34     ` Bartlomiej Zolnierkiewicz
2009-11-08 18:08       ` Ivo van Doorn [this message]
2009-11-08 18:13         ` Bartlomiej Zolnierkiewicz
2009-11-08 18:27           ` Ivo van Doorn
2009-11-08 18:32             ` Bartlomiej Zolnierkiewicz
2009-11-08 18:40               ` Ivo van Doorn
2009-11-08 18:47                 ` Bartlomiej Zolnierkiewicz
2009-11-08 19:14                   ` Kalle Valo
2009-11-08 19:21                   ` Bartlomiej Zolnierkiewicz
2009-11-08 19:35                     ` Ivo van Doorn
2009-11-08 19:38                       ` Bartlomiej Zolnierkiewicz
2009-11-08 19:25                   ` Ivo van Doorn
2009-11-08 19:34                     ` Bartlomiej Zolnierkiewicz
2009-11-08 14:38   ` Gertjan van Wingerde
2009-11-08 13:39 ` [PATCH 9/9] rt2800usb: add eFuse EEPROM support Bartlomiej Zolnierkiewicz
2009-11-08 13:56   ` Ivo van Doorn
2009-11-08 14:41   ` Gertjan van Wingerde
2009-11-08 13:50 ` [PATCH 1/9] rt2800: prepare for unification of EEPROM support code Ivo van Doorn
2009-11-08 14:16 ` Gertjan van Wingerde
2009-11-08 17:41   ` Bartlomiej Zolnierkiewicz
2009-11-08 19:07     ` Gertjan van Wingerde

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=200911081908.23307.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=bzolnier@gmail.com \
    --cc=gwingerde@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).