]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mei: bus: use cldev in prints
authorAlexander Usyskin <alexander.usyskin@intel.com>
Thu, 17 Jul 2025 14:11:10 +0000 (17:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Jul 2025 07:57:53 +0000 (09:57 +0200)
For unifomity, print using client device on bus where possible.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Link: https://lore.kernel.org/r/20250717141112.1696482-2-alexander.usyskin@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/bus-fixup.c
drivers/misc/mei/bus.c

index 9eebeffcd8fd0645cecba167e2a4452bd3bbf203..90dba20b2de7afea7f5622633580b930b6fa2ebb 100644 (file)
@@ -463,14 +463,14 @@ static void mei_nfc(struct mei_cl_device *cldev)
        if (IS_ERR(cl)) {
                ret = PTR_ERR(cl);
                cl = NULL;
-               dev_err(bus->dev, "nfc hook alloc failed %d\n", ret);
+               dev_err(&cldev->dev, "nfc hook alloc failed %d\n", ret);
                goto out;
        }
 
        me_cl = mei_me_cl_by_uuid(bus, &mei_nfc_info_guid);
        if (!me_cl) {
                ret = -ENOTTY;
-               dev_err(bus->dev, "Cannot find nfc info %d\n", ret);
+               dev_err(&cldev->dev, "Cannot find nfc info %d\n", ret);
                goto out;
        }
 
@@ -496,13 +496,13 @@ static void mei_nfc(struct mei_cl_device *cldev)
                goto disconnect;
        }
 
-       dev_dbg(bus->dev, "nfc radio %s\n", radio_name);
+       dev_dbg(&cldev->dev, "nfc radio %s\n", radio_name);
        strscpy(cldev->name, radio_name, sizeof(cldev->name));
 
 disconnect:
        mutex_lock(&bus->device_lock);
        if (mei_cl_disconnect(cl) < 0)
-               dev_err(bus->dev, "Can't disconnect the NFC INFO ME\n");
+               dev_err(&cldev->dev, "Can't disconnect the NFC INFO ME\n");
 
        mei_cl_flush_queues(cl, NULL);
 
@@ -515,7 +515,7 @@ out:
        if (ret)
                cldev->do_match = 0;
 
-       dev_dbg(bus->dev, "end of fixup match = %d\n", cldev->do_match);
+       dev_dbg(&cldev->dev, "end of fixup match = %d\n", cldev->do_match);
 }
 
 /**
index 9cdbb45fcf751e4d30c4d87f2aaf51ab755202d5..5cc3ad07d5be6feb28fbea5da575b4806e30c274 100644 (file)
@@ -875,14 +875,14 @@ int mei_cldev_disable(struct mei_cl_device *cldev)
        mei_cl_bus_vtag_free(cldev);
 
        if (!mei_cl_is_connected(cl)) {
-               dev_dbg(bus->dev, "Already disconnected\n");
+               dev_dbg(&cldev->dev, "Already disconnected\n");
                err = 0;
                goto out;
        }
 
        err = mei_cl_disconnect(cl);
        if (err < 0)
-               dev_err(bus->dev, "Could not disconnect from the ME client\n");
+               dev_err(&cldev->dev, "Could not disconnect from the ME client\n");
 
 out:
        /* Flush queues and remove any pending read unless we have mapped DMA */
@@ -935,7 +935,7 @@ ssize_t mei_cldev_send_gsc_command(struct mei_cl_device *cldev,
        cl = cldev->cl;
        bus = cldev->bus;
 
-       dev_dbg(bus->dev, "client_id %u, fence_id %u\n", client_id, fence_id);
+       dev_dbg(&cldev->dev, "client_id %u, fence_id %u\n", client_id, fence_id);
 
        if (!bus->hbm_f_gsc_supported)
                return -EOPNOTSUPP;
@@ -983,11 +983,11 @@ ssize_t mei_cldev_send_gsc_command(struct mei_cl_device *cldev,
        /* send the message to GSC */
        ret = __mei_cl_send(cl, (u8 *)ext_hdr, buf_sz, 0, MEI_CL_IO_SGL);
        if (ret < 0) {
-               dev_err(bus->dev, "__mei_cl_send failed, returned %zd\n", ret);
+               dev_err(&cldev->dev, "__mei_cl_send failed, returned %zd\n", ret);
                goto end;
        }
        if (ret != buf_sz) {
-               dev_err(bus->dev, "__mei_cl_send returned %zd instead of expected %zd\n",
+               dev_err(&cldev->dev, "__mei_cl_send returned %zd instead of expected %zd\n",
                        ret, buf_sz);
                ret = -EIO;
                goto end;
@@ -997,7 +997,7 @@ ssize_t mei_cldev_send_gsc_command(struct mei_cl_device *cldev,
        ret = __mei_cl_recv(cl, (u8 *)&rx_msg, sizeof(rx_msg), NULL, MEI_CL_IO_SGL, 0);
 
        if (ret != sizeof(rx_msg)) {
-               dev_err(bus->dev, "__mei_cl_recv returned %zd instead of expected %zd\n",
+               dev_err(&cldev->dev, "__mei_cl_recv returned %zd instead of expected %zd\n",
                        ret, sizeof(rx_msg));
                if (ret >= 0)
                        ret = -EIO;
@@ -1006,13 +1006,13 @@ ssize_t mei_cldev_send_gsc_command(struct mei_cl_device *cldev,
 
        /* check rx_msg.client_id and rx_msg.fence_id match the ones we send */
        if (rx_msg.client_id != client_id || rx_msg.fence_id != fence_id) {
-               dev_err(bus->dev, "received client_id/fence_id  %u/%u  instead of %u/%u sent\n",
+               dev_err(&cldev->dev, "received client_id/fence_id  %u/%u  instead of %u/%u sent\n",
                        rx_msg.client_id, rx_msg.fence_id, client_id, fence_id);
                ret = -EFAULT;
                goto end;
        }
 
-       dev_dbg(bus->dev, "gsc command: successfully written %u bytes\n",  rx_msg.written);
+       dev_dbg(&cldev->dev, "gsc command: successfully written %u bytes\n", rx_msg.written);
        ret = rx_msg.written;
 
 end:
@@ -1404,7 +1404,7 @@ static int mei_cl_bus_dev_add(struct mei_cl_device *cldev)
 {
        int ret;
 
-       dev_dbg(cldev->bus->dev, "adding %pUL:%02X\n",
+       dev_dbg(&cldev->dev, "adding %pUL:%02X\n",
                mei_me_cl_uuid(cldev->me_cl),
                mei_me_cl_ver(cldev->me_cl));
        ret = device_add(&cldev->dev);