net: Use bool for return value of dev_valid_name().
[pandora-kernel.git] / net / core / dev.c
index 763a0ed..0090809 100644 (file)
@@ -848,21 +848,21 @@ EXPORT_SYMBOL(dev_get_by_flags_rcu);
  *     to allow sysfs to work.  We also disallow any kind of
  *     whitespace.
  */
-int dev_valid_name(const char *name)
+bool dev_valid_name(const char *name)
 {
        if (*name == '\0')
-               return 0;
+               return false;
        if (strlen(name) >= IFNAMSIZ)
-               return 0;
+               return false;
        if (!strcmp(name, ".") || !strcmp(name, ".."))
-               return 0;
+               return false;
 
        while (*name) {
                if (*name == '/' || isspace(*name))
-                       return 0;
+                       return false;
                name++;
        }
-       return 1;
+       return true;
 }
 EXPORT_SYMBOL(dev_valid_name);
 
@@ -5834,12 +5834,12 @@ void netdev_run_todo(void)
 /* Convert net_device_stats to rtnl_link_stats64.  They have the same
  * fields in the same order, with only the type differing.
  */
-static void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64,
-                                   const struct net_device_stats *netdev_stats)
+void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64,
+                            const struct net_device_stats *netdev_stats)
 {
 #if BITS_PER_LONG == 64
-        BUILD_BUG_ON(sizeof(*stats64) != sizeof(*netdev_stats));
-        memcpy(stats64, netdev_stats, sizeof(*stats64));
+       BUILD_BUG_ON(sizeof(*stats64) != sizeof(*netdev_stats));
+       memcpy(stats64, netdev_stats, sizeof(*stats64));
 #else
        size_t i, n = sizeof(*stats64) / sizeof(u64);
        const unsigned long *src = (const unsigned long *)netdev_stats;
@@ -5851,6 +5851,7 @@ static void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64,
                dst[i] = src[i];
 #endif
 }
+EXPORT_SYMBOL(netdev_stats_to_stats64);
 
 /**
  *     dev_get_stats   - get network device statistics