]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
random-make-it-possible-to-enable-debugging-without-rebuild-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 25 Oct 2012 01:15:24 +0000 (12:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 25 Oct 2012 03:14:56 +0000 (14:14 +1100)
fix resulting printk warnings

Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Wu Fengguang <fengguang.wu@intel.com>a
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/char/random.c

index 9ac4443a185427c763b77b1e74ab6bdd2ff1455c..e360468991681efce468595aa876e7d266cd6386 100644 (file)
@@ -825,7 +825,7 @@ static void xfer_secondary_pool(struct entropy_store *r, size_t nbytes)
                bytes = min_t(int, bytes, sizeof(tmp));
 
                DEBUG_ENT("going to reseed %s with %d bits "
-                         "(%d of %d requested)\n",
+                         "(%zu of %d requested)\n",
                          r->name, bytes * 8, nbytes * 8, r->entropy_count);
 
                bytes = extract_entropy(r->pull, tmp, bytes,
@@ -856,7 +856,7 @@ static size_t account(struct entropy_store *r, size_t nbytes, int min,
        spin_lock_irqsave(&r->lock, flags);
 
        BUG_ON(r->entropy_count > r->poolinfo->POOLBITS);
-       DEBUG_ENT("trying to extract %d bits from %s\n",
+       DEBUG_ENT("trying to extract %zu bits from %s\n",
                  nbytes * 8, r->name);
 
        /* Can we pull enough? */
@@ -878,7 +878,7 @@ static size_t account(struct entropy_store *r, size_t nbytes, int min,
                }
        }
 
-       DEBUG_ENT("debiting %d entropy credits from %s%s\n",
+       DEBUG_ENT("debiting %zu entropy credits from %s%s\n",
                  nbytes * 8, r->name, r->limit ? "" : " (unlimited)");
 
        spin_unlock_irqrestore(&r->lock, flags);
@@ -1138,11 +1138,11 @@ random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
                if (n > SEC_XFER_SIZE)
                        n = SEC_XFER_SIZE;
 
-               DEBUG_ENT("reading %d bits\n", n*8);
+               DEBUG_ENT("reading %zd bits\n", n*8);
 
                n = extract_entropy_user(&blocking_pool, buf, n);
 
-               DEBUG_ENT("read got %d bits (%d still needed)\n",
+               DEBUG_ENT("read got %zd bits (%zd still needed)\n",
                          n*8, (nbytes-n)*8);
 
                if (n == 0) {