]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
greybus: core: add device prefix to error messages
authorJohan Hovold <johan@hovoldconsulting.com>
Thu, 11 Feb 2016 12:52:47 +0000 (13:52 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 12 Feb 2016 05:44:17 +0000 (21:44 -0800)
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 <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/debugfs.c
drivers/staging/greybus/hd.c
drivers/staging/greybus/operation.c

index 725565de5d4375e49280ffab015939916d036ce9..a9d4d3da99a0da60daada42c0d9348d4fa4fd5b1 100644 (file)
@@ -7,8 +7,6 @@
  * Released under the GPLv2 only.
  */
 
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
 #include <linux/debugfs.h>
 
 #include "greybus.h"
index d1aab29d3da4ed8371247623c1996a2c8721f5c4..147a92d14cfc1d566759f9e28e245f8087b3e788 100644 (file)
@@ -7,8 +7,6 @@
  * Released under the GPLv2 only.
  */
 
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
 #include <linux/kernel.h>
 #include <linux/slab.h>
 
@@ -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);
        }
 
index d6b3d1f22b281a17e81f32796889a6fdf0e57cd7..bd79f81da0206d431233a80ced8762a9b56b09f2 100644 (file)
@@ -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;
        }