backports: fix a few sparse warnings
authorJohannes Berg <johannes.berg@intel.com>
Wed, 17 Apr 2013 07:50:47 +0000 (09:50 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 17 Apr 2013 07:50:47 +0000 (09:50 +0200)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
backport/compat/compat-2.6.34.c
backport/compat/compat-3.8.c
backport/compat/compat-3.9.c

index 031d1694feca6701b0f7c40c467a28819ed8cf5a..863be64ce3cfe28316afb7d5466f9024b7910a7f 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <linux/mmc/sdio_func.h>
 #include <linux/seq_file.h>
+#include "compat-2.6.34.h"
 
 static mmc_pm_flag_t backport_mmc_pm_flags;
 
@@ -35,7 +36,8 @@ int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags)
  *
  * Called at seq_file->op->start().
  */
-struct hlist_node *seq_hlist_start(struct hlist_head *head, loff_t pos)
+static struct hlist_node *
+seq_hlist_start(struct hlist_head *head, loff_t pos)
 {
        struct hlist_node *node;
 
index 8134323453ac60551b585efdb0e81e195d21f1d6..a3d8f4b6daab42d4672b075061b96854e4824fcd 100644 (file)
@@ -12,7 +12,6 @@
  * published by the Free Software Foundation.
  */
 
-#include <linux/hid.h>
 #include <linux/hid.h>
 #include <linux/module.h>
 #include "hid-ids.h"
@@ -278,8 +277,8 @@ static bool hid_match_one_id(struct hid_device *hdev,
                (id->product == HID_ANY_ID || id->product == hdev->product);
 }
 
-const struct hid_device_id *hid_match_id(struct hid_device *hdev,
-               const struct hid_device_id *id)
+static const struct hid_device_id *
+hid_match_id(struct hid_device *hdev, const struct hid_device_id *id)
 {
        for (; id->bus; id++)
                if (hid_match_one_id(hdev, id))
index 996e91c9ab28235505722aa55d5ced2d46932b9a..5ae236c0478063df21260996a37e5b7ff91de01d 100644 (file)
@@ -103,7 +103,7 @@ void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res)
 
        dest_ptr = devm_ioremap_resource(dev, res);
        if (!dest_ptr)
-               return ERR_PTR(-ENOMEM);
+               return (void __iomem *)ERR_PTR(-ENOMEM);
        return dest_ptr;
 }
 EXPORT_SYMBOL_GPL(devm_ioremap_resource);