diff mbox

[1/1] usb: musb: dsps: fix build on i386 when COMPILE_TEST is set

Message ID 1427318317-13927-1-git-send-email-tony@atomide.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tony Lindgren March 25, 2015, 9:18 p.m. UTC
Commit 3e457371f436 ("usb: musb: Fix fifo reads for dm816x with musb_dsps")
fixed a USB error on dm816x, but introduced a new build error on i386
when COMPILE_TEST is set:

drivers/usb/musb/musb_dsps.c: In function ‘dsps_read_fifo32’:
drivers/usb/musb/musb_dsps.c:624:3: error: implicit declaration of function
‘readsl’ [-Werror=implicit-function-declaration]
readsl(fifo, dst, len >> 2);

Let's fix this by using ioread32_rep() instead of readsl() as that's
more portable.

Fixes: 3e457371f436 ("usb: musb: Fix fifo reads for dm816x with musb_dsps")
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Bin Liu <binmlist@gmail.com>
Cc: Brian Hutchinson <b.hutchman@gmail.com>
Cc: George Cherian <george.cherian@ti.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/usb/musb/musb_dsps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Felipe Balbi April 3, 2015, 3:14 p.m. UTC | #1
Hi Greg,

On Wed, Mar 25, 2015 at 02:18:37PM -0700, Tony Lindgren wrote:
> Commit 3e457371f436 ("usb: musb: Fix fifo reads for dm816x with musb_dsps")
> fixed a USB error on dm816x, but introduced a new build error on i386
> when COMPILE_TEST is set:
> 
> drivers/usb/musb/musb_dsps.c: In function ‘dsps_read_fifo32’:
> drivers/usb/musb/musb_dsps.c:624:3: error: implicit declaration of function
> ‘readsl’ [-Werror=implicit-function-declaration]
> readsl(fifo, dst, len >> 2);
> 
> Let's fix this by using ioread32_rep() instead of readsl() as that's
> more portable.
> 
> Fixes: 3e457371f436 ("usb: musb: Fix fifo reads for dm816x with musb_dsps")
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Cc: Bin Liu <binmlist@gmail.com>
> Cc: Brian Hutchinson <b.hutchman@gmail.com>
> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Can you apply this one directly ? It fixes a build error on i386.

Signed-off-by: Felipe Balbi <balbi@ti.com>

> ---
>  drivers/usb/musb/musb_dsps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
> index 2c0750e..8e089c1 100644
> --- a/drivers/usb/musb/musb_dsps.c
> +++ b/drivers/usb/musb/musb_dsps.c
> @@ -661,7 +661,7 @@ static void dsps_read_fifo32(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
>  	void __iomem *fifo = hw_ep->fifo;
>  
>  	if (len >= 4) {
> -		readsl(fifo, dst, len >> 2);
> +		ioread32_rep(fifo, dst, len >> 2);
>  		dst += len & ~0x03;
>  		len &= 0x03;
>  	}
> -- 
> 2.1.4
>
Greg KH April 3, 2015, 5:10 p.m. UTC | #2
On Fri, Apr 03, 2015 at 10:14:14AM -0500, Felipe Balbi wrote:
> Hi Greg,
> 
> On Wed, Mar 25, 2015 at 02:18:37PM -0700, Tony Lindgren wrote:
> > Commit 3e457371f436 ("usb: musb: Fix fifo reads for dm816x with musb_dsps")
> > fixed a USB error on dm816x, but introduced a new build error on i386
> > when COMPILE_TEST is set:
> > 
> > drivers/usb/musb/musb_dsps.c: In function ‘dsps_read_fifo32’:
> > drivers/usb/musb/musb_dsps.c:624:3: error: implicit declaration of function
> > ‘readsl’ [-Werror=implicit-function-declaration]
> > readsl(fifo, dst, len >> 2);
> > 
> > Let's fix this by using ioread32_rep() instead of readsl() as that's
> > more portable.
> > 
> > Fixes: 3e457371f436 ("usb: musb: Fix fifo reads for dm816x with musb_dsps")
> > Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> > Cc: Bin Liu <binmlist@gmail.com>
> > Cc: Brian Hutchinson <b.hutchman@gmail.com>
> > Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> Can you apply this one directly ? It fixes a build error on i386.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>

Now queued up, thanks.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 2c0750e..8e089c1 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -661,7 +661,7 @@  static void dsps_read_fifo32(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
 	void __iomem *fifo = hw_ep->fifo;
 
 	if (len >= 4) {
-		readsl(fifo, dst, len >> 2);
+		ioread32_rep(fifo, dst, len >> 2);
 		dst += len & ~0x03;
 		len &= 0x03;
 	}