From: Johan Hovold Date: Thu, 11 Feb 2016 12:52:47 +0000 (+0100) Subject: greybus: core: add device prefix to error messages X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~717 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b427572ebff3abba436a9ae45db73c78fa3ddcf8;p=karo-tx-linux.git greybus: core: add device prefix to error messages Use dev_err and dev_warn where appropriate and remove now unused pr_fmt defines. Testing Done: Tested on DB3.5 with the generic bridge firmware on APB2. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/debugfs.c b/drivers/staging/greybus/debugfs.c index 725565de5d43..a9d4d3da99a0 100644 --- a/drivers/staging/greybus/debugfs.c +++ b/drivers/staging/greybus/debugfs.c @@ -7,8 +7,6 @@ * Released under the GPLv2 only. */ -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - #include #include "greybus.h" diff --git a/drivers/staging/greybus/hd.c b/drivers/staging/greybus/hd.c index d1aab29d3da4..147a92d14cfc 100644 --- a/drivers/staging/greybus/hd.c +++ b/drivers/staging/greybus/hd.c @@ -7,8 +7,6 @@ * Released under the GPLv2 only. */ -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - #include #include @@ -55,7 +53,7 @@ struct gb_host_device *gb_hd_create(struct gb_hd_driver *driver, * so that we don't have to every time we make them. */ if ((!driver->message_send) || (!driver->message_cancel)) { - pr_err("Must implement all gb_hd_driver callbacks!\n"); + dev_err(parent, "mandatory hd-callbacks missing\n"); return ERR_PTR(-EINVAL); } diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index d6b3d1f22b28..bd79f81da020 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -327,7 +327,7 @@ gb_operation_message_alloc(struct gb_host_device *hd, u8 type, size_t message_size = payload_size + sizeof(*header); if (message_size > hd->buffer_size_max) { - pr_warn("requested message size too big (%zu > %zu)\n", + dev_warn(&hd->dev, "requested message size too big (%zu > %zu)\n", message_size, hd->buffer_size_max); return NULL; }