Skip to content

Commit 18662a1

Browse files
Jiri Slabygregkh
authored andcommitted
tty: serial: mpc52xx_uart: make rx/tx hooks return unsigned
All these return bitmasks, so it makes more sense to return unsigned -- this is what a reader and also all the callers expect. Signed-off-by: Jiri Slaby <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5318f70 commit 18662a1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

drivers/tty/serial/mpc52xx_uart.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ static irqreturn_t mpc5xxx_uart_process_int(struct uart_port *port);
8383

8484
struct psc_ops {
8585
void (*fifo_init)(struct uart_port *port);
86-
int (*raw_rx_rdy)(struct uart_port *port);
87-
int (*raw_tx_rdy)(struct uart_port *port);
88-
int (*rx_rdy)(struct uart_port *port);
89-
int (*tx_rdy)(struct uart_port *port);
90-
int (*tx_empty)(struct uart_port *port);
86+
unsigned int (*raw_rx_rdy)(struct uart_port *port);
87+
unsigned int (*raw_tx_rdy)(struct uart_port *port);
88+
unsigned int (*rx_rdy)(struct uart_port *port);
89+
unsigned int (*tx_rdy)(struct uart_port *port);
90+
unsigned int (*tx_empty)(struct uart_port *port);
9191
void (*stop_rx)(struct uart_port *port);
9292
void (*start_tx)(struct uart_port *port);
9393
void (*stop_tx)(struct uart_port *port);
@@ -203,34 +203,34 @@ static void mpc52xx_psc_fifo_init(struct uart_port *port)
203203
out_be16(&psc->mpc52xx_psc_imr, port->read_status_mask);
204204
}
205205

206-
static int mpc52xx_psc_raw_rx_rdy(struct uart_port *port)
206+
static unsigned int mpc52xx_psc_raw_rx_rdy(struct uart_port *port)
207207
{
208208
return in_be16(&PSC(port)->mpc52xx_psc_status)
209209
& MPC52xx_PSC_SR_RXRDY;
210210
}
211211

212-
static int mpc52xx_psc_raw_tx_rdy(struct uart_port *port)
212+
static unsigned int mpc52xx_psc_raw_tx_rdy(struct uart_port *port)
213213
{
214214
return in_be16(&PSC(port)->mpc52xx_psc_status)
215215
& MPC52xx_PSC_SR_TXRDY;
216216
}
217217

218218

219-
static int mpc52xx_psc_rx_rdy(struct uart_port *port)
219+
static unsigned int mpc52xx_psc_rx_rdy(struct uart_port *port)
220220
{
221221
return in_be16(&PSC(port)->mpc52xx_psc_isr)
222222
& port->read_status_mask
223223
& MPC52xx_PSC_IMR_RXRDY;
224224
}
225225

226-
static int mpc52xx_psc_tx_rdy(struct uart_port *port)
226+
static unsigned int mpc52xx_psc_tx_rdy(struct uart_port *port)
227227
{
228228
return in_be16(&PSC(port)->mpc52xx_psc_isr)
229229
& port->read_status_mask
230230
& MPC52xx_PSC_IMR_TXRDY;
231231
}
232232

233-
static int mpc52xx_psc_tx_empty(struct uart_port *port)
233+
static unsigned int mpc52xx_psc_tx_empty(struct uart_port *port)
234234
{
235235
u16 sts = in_be16(&PSC(port)->mpc52xx_psc_status);
236236

@@ -1365,7 +1365,7 @@ static const struct uart_ops mpc52xx_uart_ops = {
13651365
/* Interrupt handling */
13661366
/* ======================================================================== */
13671367

1368-
static inline int
1368+
static inline unsigned int
13691369
mpc52xx_uart_int_rx_chars(struct uart_port *port)
13701370
{
13711371
struct tty_port *tport = &port->state->port;

0 commit comments

Comments
 (0)