Commit b427572e authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

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: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent a0b5542d
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
* Released under the GPLv2 only. * Released under the GPLv2 only.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include "greybus.h" #include "greybus.h"
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
* Released under the GPLv2 only. * Released under the GPLv2 only.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -55,7 +53,7 @@ struct gb_host_device *gb_hd_create(struct gb_hd_driver *driver, ...@@ -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. * so that we don't have to every time we make them.
*/ */
if ((!driver->message_send) || (!driver->message_cancel)) { 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); return ERR_PTR(-EINVAL);
} }
......
...@@ -327,7 +327,7 @@ gb_operation_message_alloc(struct gb_host_device *hd, u8 type, ...@@ -327,7 +327,7 @@ gb_operation_message_alloc(struct gb_host_device *hd, u8 type,
size_t message_size = payload_size + sizeof(*header); size_t message_size = payload_size + sizeof(*header);
if (message_size > hd->buffer_size_max) { 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); message_size, hd->buffer_size_max);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment