diff options
Diffstat (limited to 'common/ratp')
-rw-r--r-- | common/ratp/mw.c | 2 | ||||
-rw-r--r-- | common/ratp/ratp.c | 12 |
2 files changed, 6 insertions, 8 deletions
diff --git a/common/ratp/mw.c b/common/ratp/mw.c index 55e79bbaf0..772910b39d 100644 --- a/common/ratp/mw.c +++ b/common/ratp/mw.c @@ -125,7 +125,7 @@ static int ratp_cmd_mw(const struct ratp_bb *req, int req_len, /* Validate buffer size */ if (buffer_size < (path_size + data_size)) { - pr_err("ignored: size mismatch (%d < %hu): path or data not be fully given\n", + pr_err("ignored: size mismatch (%d < %u): path or data not be fully given\n", req_len, path_size + data_size); ret = -EINVAL; goto out; diff --git a/common/ratp/ratp.c b/common/ratp/ratp.c index 9aea1786d6..e84ad22167 100644 --- a/common/ratp/ratp.c +++ b/common/ratp/ratp.c @@ -259,19 +259,17 @@ static int ratp_console_tstc(struct console_device *cdev) return kfifo_len(ctx->console_recv_fifo) ? 1 : 0; } -static int ratp_console_puts(struct console_device *cdev, const char *s) +static int ratp_console_puts(struct console_device *cdev, const char *s, + size_t nbytes) { struct ratp_ctx *ctx = container_of(cdev, struct ratp_ctx, ratp_console); - int len = 0; - - len = strlen(s); if (ratp_busy(&ctx->ratp)) - return len; + return nbytes; - kfifo_put(ctx->console_transmit_fifo, s, len); + kfifo_put(ctx->console_transmit_fifo, s, nbytes); - return len; + return nbytes; } static void ratp_console_putc(struct console_device *cdev, char c) |