Skip to content

Commit 96a8b29

Browse files
Marcelo Diop-Gonzalezgregkh
authored andcommitted
staging: vchiq_dump: Replace min with min_t
Replacing this fixes checkpatch warnings. Signed-off-by: Marcelo Diop-Gonzalez <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent eacb77a commit 96a8b29

File tree

1 file changed

+2
-2
lines changed
  • drivers/staging/vc04_services/interface/vchiq_arm

1 file changed

+2
-2
lines changed

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,15 +2081,15 @@ vchiq_dump(void *dump_context, const char *str, int len)
20812081
int copy_bytes;
20822082

20832083
if (context->offset > 0) {
2084-
int skip_bytes = min(len, (int)context->offset);
2084+
int skip_bytes = min_t(int, len, context->offset);
20852085

20862086
str += skip_bytes;
20872087
len -= skip_bytes;
20882088
context->offset -= skip_bytes;
20892089
if (context->offset > 0)
20902090
return;
20912091
}
2092-
copy_bytes = min(len, (int)(context->space - context->actual));
2092+
copy_bytes = min_t(int, len, context->space - context->actual);
20932093
if (copy_bytes == 0)
20942094
return;
20952095
if (copy_to_user(context->buf + context->actual, str,

0 commit comments

Comments
 (0)