Skip to contentSkip to conversation

char/drivers/random.c - fix warning

PATCH New Sam Ravnborg 1 participant 1 message Feb 17, 2003 Random number driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 char/drivers/random.c - fix warning

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 =====

drivers/char/random.c +2 -2
@@ -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