From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Subject: Re: Re: [PATCH v2 04/13] musb: Do not use musb_read[b|w] / _write[b|w] wrappers in generic fifo functions Date: Mon, 11 May 2015 20:14:12 +0200 Message-ID: <5550F174.6000709@redhat.com> References: <1426878682-14521-1-git-send-email-hdegoede@redhat.com> <1426878682-14521-5-git-send-email-hdegoede@redhat.com> <20150511155846.GH19476@saruman.tx.rr.com> Reply-To: hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Return-path: In-Reply-To: <20150511155846.GH19476-HgARHv6XitJaoMGHk7MhZQC/G2K4zDHf@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: balbi-l0cyMroinI0@public.gmane.org Cc: Kishon Vijay Abraham I , Maxime Ripard , Chen-Yu Tsai , Roman Byshko , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree , linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: devicetree@vger.kernel.org Hi, On 11-05-15 17:58, Felipe Balbi wrote: > On Fri, Mar 20, 2015 at 08:11:13PM +0100, Hans de Goede wrote: >> The generic fifo functions already use non wrapped accesses in various >> cases through the iowrite#_rep functions, and all platforms which override >> the default musb_read[b|w] / _write[b|w] functions also provide their own >> fifo access functions, so we can safely drop the unnecessary indirection >> from the fifo access functions. >> >> Signed-off-by: Hans de Goede >> --- >> drivers/usb/musb/musb_core.c | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c >> index 01ed3a6..016b5b9 100644 >> --- a/drivers/usb/musb/musb_core.c >> +++ b/drivers/usb/musb/musb_core.c >> @@ -313,7 +313,7 @@ static void musb_default_write_fifo(struct musb_hw_ep *hw_ep, u16 len, >> index += len & ~0x03; >> } >> if (len & 0x02) { >> - musb_writew(fifo, 0, *(u16 *)&src[index]); >> + __raw_writew(*(u16 *)&src[index], fifo); > > not all architectures provide __raw_* accessors, right ? As Arnd mentions in his reply, these are available everywhere. Also note, that as I've tried to explain in the commit message already this commit makes no functional changes what so ever, the generic musb_default_read/write_fifo functions are only used by musb platforms which do not overwrite musb_write* / musb_read* and musb_write* / musb_read* are already just thin wrappers around the __raw_* functions. Regards, Hans