[PATCH] char/drivers/random.c - fix warning

From: Sam Ravnborg (sam@ravnborg.org)
Date: Mon Feb 17 2003 - 16:58:24 EST


When compiling random.c without SYSCTL defined a warning is
issued about free_entropy_store being defined but not used.
Put ifdef's around the functions.
I could have moved the whole function, but it logically belongs
to this part of the file.

        Sam

===== drivers/char/random.c 1.30 vs edited =====
--- 1.30/drivers/char/random.c Mon Dec 30 13:47:26 2002
+++ edited/drivers/char/random.c Mon Feb 17 22:45:20 2003
@@ -535,14 +535,14 @@
         r->extract_count = 0;
         memset(r->pool, 0, r->poolinfo.POOLBYTES);
 }
-
+#ifdef CONFIG_SYSCTL
 static void free_entropy_store(struct entropy_store *r)
 {
         if (r->pool)
                 kfree(r->pool);
         kfree(r);
 }
-
+#endif
 /*
  * This function adds a byte into the entropy "pool". It does not
  * update the entropy estimate. The caller should call
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:19 EST