Return-path: Received: from sh.osrg.net ([192.16.179.4]:50129 "EHLO sh.osrg.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753237Ab0C2BwZ (ORCPT ); Sun, 28 Mar 2010 21:52:25 -0400 Date: Mon, 29 Mar 2010 10:52:02 +0900 To: ben@decadent.org.uk Cc: bzolnier@gmail.com, gregkh@suse.de, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rt28xx: Make PCI_{MAP,UNMAP}_SINGLE type-safe From: FUJITA Tomonori In-Reply-To: <1269822285.8653.251.camel@localhost> References: <1269821357.8653.231.camel@localhost> <1269822285.8653.251.camel@localhost> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Message-Id: <20100329105129Y.fujita.tomonori@lab.ntt.co.jp> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Mon, 29 Mar 2010 01:24:45 +0100 Ben Hutchings wrote: > To avoid recurrence of bugs such as , > 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 > --- > 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.