From b933fa4a40962c77254405a5274c8927f53b5074 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Fri, 4 Dec 2015 21:30:10 +0530 Subject: [PATCH] greybus: Prefix hexadecimal values with 0x while printing them To clearly specify the base for printed values, prefix hexadecimal values with 0x. Suggested-by: Johan Hovold Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/es2.c | 2 +- drivers/staging/greybus/sdio.c | 4 ++-- drivers/staging/greybus/svc.c | 10 +++++----- drivers/staging/greybus/uart.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index ed22b6c0a73e..02cd2f6b8d3b 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -890,7 +890,7 @@ static int ap_probe(struct usb_interface *interface, endpoint->bEndpointAddress; } else { dev_err(&udev->dev, - "Unknown endpoint type found, address %02x\n", + "Unknown endpoint type found, address 0x%02x\n", endpoint->bEndpointAddress); } } diff --git a/drivers/staging/greybus/sdio.c b/drivers/staging/greybus/sdio.c index beb35747a4f8..da9093738d4a 100644 --- a/drivers/staging/greybus/sdio.c +++ b/drivers/staging/greybus/sdio.c @@ -398,7 +398,7 @@ static int gb_sdio_command(struct gb_sdio_host *host, struct mmc_command *cmd) cmd_flags = GB_SDIO_RSP_R3_R4; break; default: - dev_err(mmc_dev(host->mmc), "cmd flag invalid %04x\n", + dev_err(mmc_dev(host->mmc), "cmd flag invalid 0x%04x\n", mmc_resp_type(cmd)); ret = -EINVAL; goto out; @@ -418,7 +418,7 @@ static int gb_sdio_command(struct gb_sdio_host *host, struct mmc_command *cmd) cmd_type = GB_SDIO_CMD_ADTC; break; default: - dev_err(mmc_dev(host->mmc), "cmd type invalid %04x\n", + dev_err(mmc_dev(host->mmc), "cmd type invalid 0x%04x\n", mmc_cmd_type(cmd)); ret = -EINVAL; goto out; diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index 4514e869a288..5ae64d7d3ecf 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -85,14 +85,14 @@ int gb_svc_dme_peer_get(struct gb_svc *svc, u8 intf_id, u16 attr, u16 selector, &request, sizeof(request), &response, sizeof(response)); if (ret) { - dev_err(&svc->dev, "failed to get DME attribute (%u %04x %u): %d\n", + dev_err(&svc->dev, "failed to get DME attribute (%u 0x%04x %u): %d\n", intf_id, attr, selector, ret); return ret; } result = le16_to_cpu(response.result_code); if (result) { - dev_err(&svc->dev, "UniPro error while getting DME attribute (%u %04x %u): %u\n", + dev_err(&svc->dev, "UniPro error while getting DME attribute (%u 0x%04x %u): %u\n", intf_id, attr, selector, result); return -EIO; } @@ -121,14 +121,14 @@ int gb_svc_dme_peer_set(struct gb_svc *svc, u8 intf_id, u16 attr, u16 selector, &request, sizeof(request), &response, sizeof(response)); if (ret) { - dev_err(&svc->dev, "failed to set DME attribute (%u %04x %u %u): %d\n", + dev_err(&svc->dev, "failed to set DME attribute (%u 0x%04x %u %u): %d\n", intf_id, attr, selector, value, ret); return ret; } result = le16_to_cpu(response.result_code); if (result) { - dev_err(&svc->dev, "UniPro error while setting DME attribute (%u %04x %u %u): %u\n", + dev_err(&svc->dev, "UniPro error while setting DME attribute (%u 0x%04x %u %u): %u\n", intf_id, attr, selector, value, result); return -EIO; } @@ -502,7 +502,7 @@ static void gb_svc_process_deferred_request(struct work_struct *work) gb_svc_process_intf_hot_unplug(operation); break; default: - dev_err(&svc->dev, "bad deferred request type: %02x\n", type); + dev_err(&svc->dev, "bad deferred request type: 0x%02x\n", type); } gb_operation_put(operation); diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index ec978a451b17..1ba8476ce982 100644 --- a/drivers/staging/greybus/uart.c +++ b/drivers/staging/greybus/uart.c @@ -122,7 +122,7 @@ static int gb_uart_request_recv(u8 type, struct gb_operation *op) break; default: dev_err(&connection->bundle->dev, - "unsupported unsolicited request: %02x\n", type); + "unsupported unsolicited request: 0x%02x\n", type); ret = -EINVAL; } -- 2.39.5