From: Ben Hutchings on
On Mon, 2010-03-29 at 10:52 +0900, FUJITA Tomonori wrote:
> On Mon, 29 Mar 2010 01:24:45 +0100
> Ben Hutchings <ben(a)decadent.org.uk> wrote:
>
> > To avoid recurrence of bugs such as <http://bugs.debian.org/575726>,
> > change the type of the first parameter to linux_pci_{map,unmap}_single()
> > from void * to struct rt_rtmp_adapter *. Also do not define the macros
> > PCI_{MAP,UNMAP}_SINGLE() when building the rt2870sta driver; they are
> > not used and if they were that would be a bug.
> >
> > Signed-off-by: Ben Hutchings <ben(a)decadent.org.uk>
> > ---
> > drivers/staging/rt2860/rt_linux.h | 14 +++++---------
> > drivers/staging/rt2860/rt_pci_rbus.c | 12 ++++--------
> > 2 files changed, 9 insertions(+), 17 deletions(-)
>
> I think using dma_map_single directly instead of inventing a wrapper
> function make the code more readable.

These functions are not quite simple wrappers, unfortunately. So while
I think that is worth doing it is a separate change.

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
From: FUJITA Tomonori on
On Mon, 29 Mar 2010 01:24:45 +0100
Ben Hutchings <ben(a)decadent.org.uk> wrote:

> To avoid recurrence of bugs such as <http://bugs.debian.org/575726>,
> change the type of the first parameter to linux_pci_{map,unmap}_single()
> from void * to struct rt_rtmp_adapter *. Also do not define the macros
> PCI_{MAP,UNMAP}_SINGLE() when building the rt2870sta driver; they are
> not used and if they were that would be a bug.
>
> Signed-off-by: Ben Hutchings <ben(a)decadent.org.uk>
> ---
> drivers/staging/rt2860/rt_linux.h | 14 +++++---------
> drivers/staging/rt2860/rt_pci_rbus.c | 12 ++++--------
> 2 files changed, 9 insertions(+), 17 deletions(-)

I think using dma_map_single directly instead of inventing a wrapper
function make the code more readable.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: FUJITA Tomonori on
On Mon, 29 Mar 2010 02:58:48 +0100
Ben Hutchings <ben(a)decadent.org.uk> wrote:

> On Mon, 2010-03-29 at 10:52 +0900, FUJITA Tomonori wrote:
> > On Mon, 29 Mar 2010 01:24:45 +0100
> > Ben Hutchings <ben(a)decadent.org.uk> wrote:
> >
> > > To avoid recurrence of bugs such as <http://bugs.debian.org/575726>,
> > > change the type of the first parameter to linux_pci_{map,unmap}_single()
> > > from void * to struct rt_rtmp_adapter *. Also do not define the macros
> > > PCI_{MAP,UNMAP}_SINGLE() when building the rt2870sta driver; they are
> > > not used and if they were that would be a bug.
> > >
> > > Signed-off-by: Ben Hutchings <ben(a)decadent.org.uk>
> > > ---
> > > drivers/staging/rt2860/rt_linux.h | 14 +++++---------
> > > drivers/staging/rt2860/rt_pci_rbus.c | 12 ++++--------
> > > 2 files changed, 9 insertions(+), 17 deletions(-)
> >
> > I think using dma_map_single directly instead of inventing a wrapper
> > function make the code more readable.
>
> These functions are not quite simple wrappers, unfortunately. So while
> I think that is worth doing it is a separate change.

Well, the current wrapper functions looks terrible. Needs to fix them
before moving the driver out of the staging anyway, I think.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/