Merge remote branch 'wireless-next/master' into ath6kl-next
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / udp.c
index 609397ee78fbd3ec9d16c249a6f023dd6903594f..eaca73644e7965e5405b6e61f362a3be3e0d2e2f 100644 (file)
@@ -2192,26 +2192,16 @@ void __init udp_table_init(struct udp_table *table, const char *name)
 {
        unsigned int i;
 
-       if (!CONFIG_BASE_SMALL)
-               table->hash = alloc_large_system_hash(name,
-                       2 * sizeof(struct udp_hslot),
-                       uhash_entries,
-                       21, /* one slot per 2 MB */
-                       0,
-                       &table->log,
-                       &table->mask,
-                       64 * 1024);
-       /*
-        * Make sure hash table has the minimum size
-        */
-       if (CONFIG_BASE_SMALL || table->mask < UDP_HTABLE_SIZE_MIN - 1) {
-               table->hash = kmalloc(UDP_HTABLE_SIZE_MIN *
-                                     2 * sizeof(struct udp_hslot), GFP_KERNEL);
-               if (!table->hash)
-                       panic(name);
-               table->log = ilog2(UDP_HTABLE_SIZE_MIN);
-               table->mask = UDP_HTABLE_SIZE_MIN - 1;
-       }
+       table->hash = alloc_large_system_hash(name,
+                                             2 * sizeof(struct udp_hslot),
+                                             uhash_entries,
+                                             21, /* one slot per 2 MB */
+                                             0,
+                                             &table->log,
+                                             &table->mask,
+                                             UDP_HTABLE_SIZE_MIN,
+                                             64 * 1024);
+
        table->hash2 = table->hash + (table->mask + 1);
        for (i = 0; i <= table->mask; i++) {
                INIT_HLIST_NULLS_HEAD(&table->hash[i].head, i);