]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] cec: use __func__ in log messages
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 27 Feb 2017 13:54:09 +0000 (10:54 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 22 Mar 2017 14:13:58 +0000 (11:13 -0300)
The hardcoded function name is actually wrong. Use __func__ instead.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/cec/cec-adap.c

index 78a85c44d96efaf6393d928c4cdfd63b8b2e0447..4f1e571d10b74f2f527654f6c09c9ac26a73e590 100644 (file)
@@ -606,17 +606,17 @@ int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
 
        /* Sanity checks */
        if (msg->len == 0 || msg->len > CEC_MAX_MSG_SIZE) {
-               dprintk(1, "cec_transmit_msg: invalid length %d\n", msg->len);
+               dprintk(1, "%s: invalid length %d\n", __func__, msg->len);
                return -EINVAL;
        }
        if (msg->timeout && msg->len == 1) {
-               dprintk(1, "cec_transmit_msg: can't reply for poll msg\n");
+               dprintk(1, "%s: can't reply for poll msg\n", __func__);
                return -EINVAL;
        }
        memset(msg->msg + msg->len, 0, sizeof(msg->msg) - msg->len);
        if (msg->len == 1) {
                if (cec_msg_destination(msg) == 0xf) {
-                       dprintk(1, "cec_transmit_msg: invalid poll message\n");
+                       dprintk(1, "%s: invalid poll message\n", __func__);
                        return -EINVAL;
                }
                if (cec_has_log_addr(adap, cec_msg_destination(msg))) {
@@ -637,13 +637,13 @@ int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
        }
        if (msg->len > 1 && !cec_msg_is_broadcast(msg) &&
            cec_has_log_addr(adap, cec_msg_destination(msg))) {
-               dprintk(1, "cec_transmit_msg: destination is the adapter itself\n");
+               dprintk(1, "%s: destination is the adapter itself\n", __func__);
                return -EINVAL;
        }
        if (msg->len > 1 && adap->is_configured &&
            !cec_has_log_addr(adap, cec_msg_initiator(msg))) {
-               dprintk(1, "cec_transmit_msg: initiator has unknown logical address %d\n",
-                       cec_msg_initiator(msg));
+               dprintk(1, "%s: initiator has unknown logical address %d\n",
+                       __func__, cec_msg_initiator(msg));
                return -EINVAL;
        }
        if (!adap->is_configured && !adap->is_configuring &&
@@ -663,11 +663,11 @@ int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
        }
 
        if (msg->timeout)
-               dprintk(2, "cec_transmit_msg: %*ph (wait for 0x%02x%s)\n",
-                       msg->len, msg->msg, msg->reply, !block ? ", nb" : "");
+               dprintk(2, "%s: %*ph (wait for 0x%02x%s)\n",
+                       __func__, msg->len, msg->msg, msg->reply, !block ? ", nb" : "");
        else
-               dprintk(2, "cec_transmit_msg: %*ph%s\n",
-                       msg->len, msg->msg, !block ? " (nb)" : "");
+               dprintk(2, "%s: %*ph%s\n",
+                       __func__, msg->len, msg->msg, !block ? " (nb)" : "");
 
        data->msg = *msg;
        data->fh = fh;