lkml.org 
[lkml]   [2018]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] random: Remove unnecessary cast
Date
Currently we are casting an argument to the macro min_t().  This is
unnecessary since the macro already includes a cast.

Remove unnecessary cast from argument to macro min_t()

Signed-off-by: Tobin C. Harding <me@tobin.cc>
---
drivers/char/random.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index d686aa2a129b..03bd13876901 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1736,7 +1736,7 @@ int __must_check get_random_bytes_arch(void *buf, int nbytes)
trace_get_random_bytes_arch(left, _RET_IP_);
while (left) {
unsigned long v;
- int chunk = min_t(int, left, (int)sizeof(unsigned long));
+ int chunk = min_t(int, left, sizeof(unsigned long));

if (!arch_get_random_long(&v))
break;
--
2.17.1
\
 
 \ /
  Last update: 2018-07-10 02:28    [W:0.089 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site