driver core: fix gcc 4.3.3 warnings about string literals
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 2 Jun 2009 22:39:55 +0000 (15:39 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Jun 2009 04:30:25 +0000 (21:30 -0700)
This removes the
warning: format not a string literal and no format arguments
warnings in the driver core that gcc 4.3.3 complains about.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/core.c
drivers/base/firmware_class.c
drivers/base/platform.c
drivers/base/sys.c

index 7e8576d7822d1144206eb57160b5d38540cc09ad..4d59975c24a850c4d134a178211ae9ab520730f7 100644 (file)
@@ -875,7 +875,7 @@ int device_add(struct device *dev)
         * the name, and force the use of dev_name()
         */
        if (dev->init_name) {
-               dev_set_name(dev, dev->init_name);
+               dev_set_name(dev, "%s", dev->init_name);
                dev->init_name = NULL;
        }
 
@@ -1272,7 +1272,7 @@ struct device *__root_device_register(const char *name, struct module *owner)
        if (!root)
                return ERR_PTR(err);
 
-       err = dev_set_name(&root->dev, name);
+       err = dev_set_name(&root->dev, "%s", name);
        if (err) {
                kfree(root);
                return ERR_PTR(err);
index 3591ba7ff6f7adf1f7dd29880ade094dc44c43ce..ddeb819c8f878a3cf07c18ed9d6d2c3ffe082e46 100644 (file)
@@ -399,7 +399,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name,
        fw_priv->timeout.data = (u_long) fw_priv;
        init_timer(&fw_priv->timeout);
 
-       dev_set_name(f_dev, dev_name(device));
+       dev_set_name(f_dev, "%s", dev_name(device));
        f_dev->parent = device;
        f_dev->class = &firmware_class;
        dev_set_drvdata(f_dev, fw_priv);
index 59df6290951b7d9da7f733b573ab8322797e7141..81cb01bfc356294865a4e04721d77d5a9c64ffff 100644 (file)
@@ -245,7 +245,7 @@ int platform_device_add(struct platform_device *pdev)
        if (pdev->id != -1)
                dev_set_name(&pdev->dev, "%s.%d", pdev->name,  pdev->id);
        else
-               dev_set_name(&pdev->dev, pdev->name);
+               dev_set_name(&pdev->dev, "%s", pdev->name);
 
        for (i = 0; i < pdev->num_resources; i++) {
                struct resource *p, *r = &pdev->resource[i];
index 162355cd745a1323fc4ee2a0b1860d9e635a7047..79a9ae5238acc1b9fa06a2fed1ed70d2440a9416 100644 (file)
@@ -141,7 +141,7 @@ int sysdev_class_register(struct sysdev_class *cls)
        cls->kset.kobj.ktype = &ktype_sysdev_class;
        cls->kset.kobj.kset = system_kset;
 
-       retval = kobject_set_name(&cls->kset.kobj, cls->name);
+       retval = kobject_set_name(&cls->kset.kobj, "%s", cls->name);
        if (retval)
                return retval;