Commit 630b2abf authored by Mark Hounschell's avatar Mark Hounschell Committed by Greg Kroah-Hartman

staging: dgap: fix a few misc sparse warnings

This patch fixes a few misc sparse warnings related to __iomem
Signed-off-by: default avatarMark Hounschell <markh@compro.net>
Tested-by: default avatarMark Hounschell <markh@compro.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6a30cddb
...@@ -1365,8 +1365,8 @@ static int dgap_tty_init(struct board_t *brd) ...@@ -1365,8 +1365,8 @@ static int dgap_tty_init(struct board_t *brd)
ch = brd->channels[0]; ch = brd->channels[0];
vaddr = brd->re_map_membase; vaddr = brd->re_map_membase;
bs = (struct bs_t *) ((ulong) vaddr + CHANBUF); bs = (struct bs_t __iomem *) ((ulong) vaddr + CHANBUF);
cm = (struct cm_t *) ((ulong) vaddr + CMDBUF); cm = (struct cm_t __iomem *) ((ulong) vaddr + CMDBUF);
brd->bd_bs = bs; brd->bd_bs = bs;
...@@ -1786,7 +1786,7 @@ static void dgap_input(struct channel_t *ch) ...@@ -1786,7 +1786,7 @@ static void dgap_input(struct channel_t *ch)
if (s <= 0) if (s <= 0)
break; break;
memcpy_fromio(buf, (char *) ch->ch_raddr + tail, s); memcpy_fromio(buf, ch->ch_raddr + tail, s);
dgap_sniff_nowait_nolock(ch, "USER READ", buf, s); dgap_sniff_nowait_nolock(ch, "USER READ", buf, s);
tail += s; tail += s;
...@@ -2742,7 +2742,7 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf, ...@@ -2742,7 +2742,7 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf,
struct channel_t *ch = NULL; struct channel_t *ch = NULL;
struct un_t *un = NULL; struct un_t *un = NULL;
struct bs_t __iomem *bs; struct bs_t __iomem *bs;
char *vaddr = NULL; char __iomem *vaddr;
u16 head, tail, tmask, remain; u16 head, tail, tmask, remain;
int bufcount = 0, n = 0; int bufcount = 0, n = 0;
int orig_count = 0; int orig_count = 0;
...@@ -4935,7 +4935,7 @@ static void dgap_cmdw_ext(struct channel_t *ch, u16 cmd, u16 word, uint ncmds) ...@@ -4935,7 +4935,7 @@ static void dgap_cmdw_ext(struct channel_t *ch, u16 cmd, u16 word, uint ncmds)
if (!vaddr) if (!vaddr)
return; return;
cm_addr = (struct cm_t *) (vaddr + CMDBUF); cm_addr = (struct cm_t __iomem *) (vaddr + CMDBUF);
head = readw(&(cm_addr->cm_head)); head = readw(&(cm_addr->cm_head));
/* /*
...@@ -4951,19 +4951,19 @@ static void dgap_cmdw_ext(struct channel_t *ch, u16 cmd, u16 word, uint ncmds) ...@@ -4951,19 +4951,19 @@ static void dgap_cmdw_ext(struct channel_t *ch, u16 cmd, u16 word, uint ncmds)
*/ */
/* Write an FF to tell the FEP that we want an extended command */ /* Write an FF to tell the FEP that we want an extended command */
writeb((u8) 0xff, (char *) (vaddr + head + CMDSTART + 0)); writeb((u8) 0xff, (vaddr + head + CMDSTART + 0));
writeb((u8) ch->ch_portnum, (u8 *) (vaddr + head + CMDSTART + 1)); writeb((u8) ch->ch_portnum, (vaddr + head + CMDSTART + 1));
writew((u16) cmd, (char *) (vaddr + head + CMDSTART + 2)); writew((u16) cmd, (vaddr + head + CMDSTART + 2));
/* /*
* If the second part of the command won't fit, * If the second part of the command won't fit,
* put it at the beginning of the circular buffer. * put it at the beginning of the circular buffer.
*/ */
if (((head + 4) >= ((CMDMAX - CMDSTART)) || (head & 03))) if (((head + 4) >= ((CMDMAX - CMDSTART)) || (head & 03)))
writew((u16) word, (char *) (vaddr + CMDSTART)); writew((u16) word, (vaddr + CMDSTART));
else else
writew((u16) word, (char *) (vaddr + head + CMDSTART + 4)); writew((u16) word, (vaddr + head + CMDSTART + 4));
head = (head + 8) & (CMDMAX - CMDSTART - 4); head = (head + 8) & (CMDMAX - CMDSTART - 4);
......
...@@ -971,9 +971,9 @@ struct channel_t { ...@@ -971,9 +971,9 @@ struct channel_t {
struct bs_t __iomem *ch_bs; /* Base structure pointer */ struct bs_t __iomem *ch_bs; /* Base structure pointer */
struct cm_t __iomem *ch_cm; /* Command queue pointer */ struct cm_t __iomem *ch_cm; /* Command queue pointer */
struct board_t *ch_bd; /* Board structure pointer */ struct board_t *ch_bd; /* Board structure pointer */
unsigned char *ch_vaddr; /* FEP memory origin */ u8 __iomem *ch_vaddr; /* FEP memory origin */
unsigned char *ch_taddr; /* Write buffer origin */ u8 __iomem *ch_taddr; /* Write buffer origin */
unsigned char *ch_raddr; /* Read buffer origin */ u8 __iomem *ch_raddr; /* Read buffer origin */
struct digi_t ch_digi; /* Transparent Print structure */ struct digi_t ch_digi; /* Transparent Print structure */
struct un_t ch_tun; /* Terminal unit info */ struct un_t ch_tun; /* Terminal unit info */
struct un_t ch_pun; /* Printer unit info */ struct un_t ch_pun; /* Printer unit info */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment