aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorMarcelo Diop-Gonzalez <marcgonzalez@google.com>2019-11-20 15:21:00 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-22 11:32:54 +0100
commit96a8b2912fe56f49193879a771baf214b4f209e4 (patch)
treee9d6b79de762ad258966077cb19b62e2ed169bf7 /drivers/staging
parentstaging: vchiq: Fix block comment format in vchiq_dump() (diff)
downloadlinux-dev-96a8b2912fe56f49193879a771baf214b4f209e4.tar.xz
linux-dev-96a8b2912fe56f49193879a771baf214b4f209e4.zip
staging: vchiq_dump: Replace min with min_t
Replacing this fixes checkpatch warnings. Signed-off-by: Marcelo Diop-Gonzalez <marcgonzalez@google.com> Link: https://lore.kernel.org/r/20191120202102.249121-3-marcgonzalez@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 6328abcaeeeb..942b4768c88e 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -2081,7 +2081,7 @@ vchiq_dump(void *dump_context, const char *str, int len)
int copy_bytes;
if (context->offset > 0) {
- int skip_bytes = min(len, (int)context->offset);
+ int skip_bytes = min_t(int, len, context->offset);
str += skip_bytes;
len -= skip_bytes;
@@ -2089,7 +2089,7 @@ vchiq_dump(void *dump_context, const char *str, int len)
if (context->offset > 0)
return;
}
- copy_bytes = min(len, (int)(context->space - context->actual));
+ copy_bytes = min_t(int, len, context->space - context->actual);
if (copy_bytes == 0)
return;
if (copy_to_user(context->buf + context->actual, str,