diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-08-08 04:34:03 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-12 14:35:31 -0400 |
commit | 5a7daed81cd5ff6d4098b7f6342ba35988fcbb86 (patch) | |
tree | 252f701eaca7f73bd1b1a30a4ffe57241f3eefe3 | |
parent | edd173da2c9ce10ada0939e74ca579f9bef92337 (diff) |
serial: icom: fix casting warning
icom_port->uart_port.membase is (unsigned char __iomem *); thus,
casting (unsigned char __iomem *) is necessary to fix the
following warning. Also, local symbols are staticized.
drivers/tty/serial/icom.c:108:26: warning: symbol 'start_proc' was not declared. Should it be static?
drivers/tty/serial/icom.c:116:26: warning: symbol 'stop_proc' was not declared. Should it be static?
drivers/tty/serial/icom.c:123:25: warning: symbol 'int_mask_tbl' was not declared. Should it be static?
drivers/tty/serial/icom.c:1569:54: warning: incorrect type in assignment (different address spaces)
drivers/tty/serial/icom.c:1569:54: expected unsigned char [noderef] <asn:2>*membase
drivers/tty/serial/icom.c:1569:54: got char *<noident>
drivers/tty/serial/icom.c:1090:9: warning: cast truncates bits from constant value (ffffff7f becomes 7f)
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/icom.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c index 18ed5aebb166..06555dd73e87 100644 --- a/drivers/tty/serial/icom.c +++ b/drivers/tty/serial/icom.c | |||
@@ -105,7 +105,7 @@ static const struct pci_device_id icom_pci_table[] = { | |||
105 | {} | 105 | {} |
106 | }; | 106 | }; |
107 | 107 | ||
108 | struct lookup_proc_table start_proc[4] = { | 108 | static struct lookup_proc_table start_proc[4] = { |
109 | {NULL, ICOM_CONTROL_START_A}, | 109 | {NULL, ICOM_CONTROL_START_A}, |
110 | {NULL, ICOM_CONTROL_START_B}, | 110 | {NULL, ICOM_CONTROL_START_B}, |
111 | {NULL, ICOM_CONTROL_START_C}, | 111 | {NULL, ICOM_CONTROL_START_C}, |
@@ -113,14 +113,14 @@ struct lookup_proc_table start_proc[4] = { | |||
113 | }; | 113 | }; |
114 | 114 | ||
115 | 115 | ||
116 | struct lookup_proc_table stop_proc[4] = { | 116 | static struct lookup_proc_table stop_proc[4] = { |
117 | {NULL, ICOM_CONTROL_STOP_A}, | 117 | {NULL, ICOM_CONTROL_STOP_A}, |
118 | {NULL, ICOM_CONTROL_STOP_B}, | 118 | {NULL, ICOM_CONTROL_STOP_B}, |
119 | {NULL, ICOM_CONTROL_STOP_C}, | 119 | {NULL, ICOM_CONTROL_STOP_C}, |
120 | {NULL, ICOM_CONTROL_STOP_D} | 120 | {NULL, ICOM_CONTROL_STOP_D} |
121 | }; | 121 | }; |
122 | 122 | ||
123 | struct lookup_int_table int_mask_tbl[4] = { | 123 | static struct lookup_int_table int_mask_tbl[4] = { |
124 | {NULL, ICOM_INT_MASK_PRC_A}, | 124 | {NULL, ICOM_INT_MASK_PRC_A}, |
125 | {NULL, ICOM_INT_MASK_PRC_B}, | 125 | {NULL, ICOM_INT_MASK_PRC_B}, |
126 | {NULL, ICOM_INT_MASK_PRC_C}, | 126 | {NULL, ICOM_INT_MASK_PRC_C}, |
@@ -1087,8 +1087,7 @@ static void icom_close(struct uart_port *port) | |||
1087 | 1087 | ||
1088 | /* stop receiver */ | 1088 | /* stop receiver */ |
1089 | cmdReg = readb(&ICOM_PORT->dram->CmdReg); | 1089 | cmdReg = readb(&ICOM_PORT->dram->CmdReg); |
1090 | writeb(cmdReg & (unsigned char) ~CMD_RCV_ENABLE, | 1090 | writeb(cmdReg & ~CMD_RCV_ENABLE, &ICOM_PORT->dram->CmdReg); |
1091 | &ICOM_PORT->dram->CmdReg); | ||
1092 | 1091 | ||
1093 | shutdown(ICOM_PORT); | 1092 | shutdown(ICOM_PORT); |
1094 | 1093 | ||
@@ -1567,7 +1566,7 @@ static int icom_probe(struct pci_dev *dev, | |||
1567 | icom_port->uart_port.type = PORT_ICOM; | 1566 | icom_port->uart_port.type = PORT_ICOM; |
1568 | icom_port->uart_port.iotype = UPIO_MEM; | 1567 | icom_port->uart_port.iotype = UPIO_MEM; |
1569 | icom_port->uart_port.membase = | 1568 | icom_port->uart_port.membase = |
1570 | (char *) icom_adapter->base_addr_pci; | 1569 | (unsigned char __iomem *)icom_adapter->base_addr_pci; |
1571 | icom_port->uart_port.fifosize = 16; | 1570 | icom_port->uart_port.fifosize = 16; |
1572 | icom_port->uart_port.ops = &icom_ops; | 1571 | icom_port->uart_port.ops = &icom_ops; |
1573 | icom_port->uart_port.line = | 1572 | icom_port->uart_port.line = |