From: Bryan Wu <cooloney@kernel.org>
To: felipe.balbi@nokia.com, linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Bryan Wu <cooloney@kernel.org>,
Mike Frysinger <vapier.adi@gmail.com>
Subject: [PATCH 6/6] usb: musb: - kill the compile warning
Date: Tue, 18 Nov 2008 16:23:40 +0800 [thread overview]
Message-ID: <1226996620-11388-7-git-send-email-cooloney@kernel.org> (raw)
In-Reply-To: <1226996620-11388-1-git-send-email-cooloney@kernel.org>
drivers/usb/musb/musb_core.c:1433: warning: assignment makes pointer
from integer without a cast
hw_ep->target_regs = musb_read_target_reg_base(i, mbase);
static inline u16 musb_read_target_reg_base(u8 i, void __iomem *mbase);
this is a common bug, but a bug still ? mbase is a 32/64 bit pointer,
but we return a u16 to assign to a pointer ? seems odd :)
So return right pointer in the stub.
Cc: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/usb/musb/musb_regs.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/musb/musb_regs.h b/drivers/usb/musb/musb_regs.h
index 37f90f0..6f6b1f9 100644
--- a/drivers/usb/musb/musb_regs.h
+++ b/drivers/usb/musb/musb_regs.h
@@ -331,9 +331,9 @@ static inline u16 musb_read_hwvers(void __iomem *mbase)
return musb_readw(mbase, MUSB_HWVERS);
}
-static inline u16 musb_read_target_reg_base(u8 i, void __iomem *mbase)
+static inline void __iomem *musb_read_target_reg_base(u8 i, void __iomem *mbase)
{
- return (MUSB_BUSCTL_OFFSET(i, 0) + mbase);
+ return (void __iomem *)(MUSB_BUSCTL_OFFSET(i, 0) + mbase);
}
static inline void musb_write_rxfunaddr(void __iomem *ep_target_regs,
@@ -473,9 +473,9 @@ static inline u16 musb_read_hwvers(void __iomem *mbase)
return 0;
}
-static inline u16 musb_read_target_reg_base(u8 i, void __iomem *mbase)
+static inline void __iomem *musb_read_target_reg_base(u8 i, void __iomem *mbase)
{
- return 0;
+ return NULL;
}
static inline void musb_write_rxfunaddr(void __iomem *ep_target_regs,
--
1.5.6.3
prev parent reply other threads:[~2008-11-18 8:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 8:23 Bryan Wu
2008-11-18 8:23 ` [PATCH 1/6] usb: musb: add Blackfin specific configuration to MUSB (add missing file changes) Bryan Wu
2008-11-18 8:23 ` [PATCH 2/6] usb: musb: Blackfin provides read/write I/O accessor in header files Bryan Wu
2008-11-18 8:23 ` [PATCH 3/6] usb: musb: Kill some compiling warning in musb Blackfin part Bryan Wu
2008-11-18 8:23 ` [PATCH 4/6] usb: musb: use static inline functions to replace the macros in Blackfin version Bryan Wu
2008-11-18 8:23 ` [PATCH 5/6] usb: musb: tweak musb_read_fifo() to avoid unused warnings Bryan Wu
2008-11-18 8:23 ` Bryan Wu [this message]
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=1226996620-11388-7-git-send-email-cooloney@kernel.org \
--to=cooloney@kernel.org \
--cc=felipe.balbi@nokia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=vapier.adi@gmail.com \
/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