driver core: Replace printf() specifier and drop unneeded casting
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 1 Apr 2021 17:10:42 +0000 (20:10 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Apr 2021 15:02:45 +0000 (17:02 +0200)
The size_t type has very well established specifier, i.e. "%zu",
use it directly instead of casting to unsigned long with "%lu".

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210401171042.60612-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/devres.c

index 7ce57e88cf4b20b74d1855487e20d086641a560d..8746f2212781b5153afa2307aee5dc6493248250 100644 (file)
@@ -58,8 +58,8 @@ static void devres_log(struct device *dev, struct devres_node *node,
                       const char *op)
 {
        if (unlikely(log_devres))
-               dev_err(dev, "DEVRES %3s %p %s (%lu bytes)\n",
-                       op, node, node->name, (unsigned long)node->size);
+               dev_err(dev, "DEVRES %3s %p %s (%zu bytes)\n",
+                       op, node, node->name, node->size);
 }
 #else /* CONFIG_DEBUG_DEVRES */
 #define set_node_dbginfo(node, n, s)   do {} while (0)