mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
chardev: mark explicitly first argument as poisoned
Since commit 9894dc0cdc
"char: convert
from GIOChannel to QIOChannel", the first argument to the watch callback
can actually be a QIOChannel, which is not a GIOChannel (but a QEMU
Object).
Even though we never used that pointer, change the callback type to warn
the users. Possibly a better fix later, we may want to store the
callback and call it from intermediary functions.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
30f80be34b
commit
bf7b1eab25
12 changed files with 19 additions and 13 deletions
|
@ -288,7 +288,7 @@ static void uart_write_rx_fifo(void *opaque, const uint8_t *buf, int size)
|
|||
uart_update_status(s);
|
||||
}
|
||||
|
||||
static gboolean cadence_uart_xmit(GIOChannel *chan, GIOCondition cond,
|
||||
static gboolean cadence_uart_xmit(void *do_not_use, GIOCondition cond,
|
||||
void *opaque)
|
||||
{
|
||||
CadenceUARTState *s = opaque;
|
||||
|
|
|
@ -191,7 +191,7 @@ static uint64_t uart_read(void *opaque, hwaddr offset, unsigned size)
|
|||
/* Try to send tx data, and arrange to be called back later if
|
||||
* we can't (ie the char backend is busy/blocking).
|
||||
*/
|
||||
static gboolean uart_transmit(GIOChannel *chan, GIOCondition cond, void *opaque)
|
||||
static gboolean uart_transmit(void *do_not_use, GIOCondition cond, void *opaque)
|
||||
{
|
||||
CMSDKAPBUART *s = CMSDK_APB_UART(opaque);
|
||||
int ret;
|
||||
|
|
|
@ -135,7 +135,7 @@ static void ibex_uart_receive(void *opaque, const uint8_t *buf, int size)
|
|||
ibex_uart_update_irqs(s);
|
||||
}
|
||||
|
||||
static gboolean ibex_uart_xmit(GIOChannel *chan, GIOCondition cond,
|
||||
static gboolean ibex_uart_xmit(void *do_not_use, GIOCondition cond,
|
||||
void *opaque)
|
||||
{
|
||||
IbexUartState *s = opaque;
|
||||
|
|
|
@ -75,7 +75,7 @@ static uint64_t uart_read(void *opaque, hwaddr addr, unsigned int size)
|
|||
return r;
|
||||
}
|
||||
|
||||
static gboolean uart_transmit(GIOChannel *chan, GIOCondition cond, void *opaque)
|
||||
static gboolean uart_transmit(void *do_not_use, GIOCondition cond, void *opaque)
|
||||
{
|
||||
NRF51UARTState *s = NRF51_UART(opaque);
|
||||
int r;
|
||||
|
|
|
@ -220,7 +220,7 @@ static void serial_update_msl(SerialState *s)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean serial_watch_cb(GIOChannel *chan, GIOCondition cond,
|
||||
static gboolean serial_watch_cb(void *do_not_use, GIOCondition cond,
|
||||
void *opaque)
|
||||
{
|
||||
SerialState *s = opaque;
|
||||
|
|
|
@ -38,7 +38,7 @@ struct VirtConsole {
|
|||
* Callback function that's called from chardevs when backend becomes
|
||||
* writable.
|
||||
*/
|
||||
static gboolean chr_write_unblocked(GIOChannel *chan, GIOCondition cond,
|
||||
static gboolean chr_write_unblocked(void *do_not_use, GIOCondition cond,
|
||||
void *opaque)
|
||||
{
|
||||
VirtConsole *vcon = opaque;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue