]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/sunrpc/cache.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
[karo-tx-linux.git] / net / sunrpc / cache.c
index a72de074172d81a031305dae2f1551b22d9ced36..ae333c1845bb42f28198cdfb957cd03e7412c14c 100644 (file)
@@ -619,7 +619,7 @@ static void cache_limit_defers(void)
 
        /* Consider removing either the first or the last */
        if (cache_defer_cnt > DFR_MAX) {
-               if (net_random() & 1)
+               if (prandom_u32() & 1)
                        discard = list_entry(cache_defer_list.next,
                                             struct cache_deferred_req, recent);
                else
@@ -1111,9 +1111,7 @@ void qword_addhex(char **bpp, int *lp, char *buf, int blen)
                *bp++ = 'x';
                len -= 2;
                while (blen && len >= 2) {
-                       unsigned char c = *buf++;
-                       *bp++ = '0' + ((c&0xf0)>>4) + (c>=0xa0)*('a'-'9'-1);
-                       *bp++ = '0' + (c&0x0f) + ((c&0x0f)>=0x0a)*('a'-'9'-1);
+                       bp = hex_byte_pack(bp, *buf++);
                        len -= 2;
                        blen--;
                }