Skip to content

Commit ddf70cb

Browse files
zmckevitquic-jhugo
authored andcommitted
accel/qaic: Fix mismatched types in min()
Use min_t() instead of min() to resolve compiler warnings for mismatched types. Signed-off-by: Zack McKevitt <zmckevit@qti.qualcomm.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251015153715.184143-1-youssef.abdulrahman@oss.qualcomm.com
1 parent 9cfe6ab commit ddf70cb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/accel/qaic/sahara.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ static void sahara_parse_dump_table(struct sahara_context *context)
657657

658658
/* Request the first chunk of the first image */
659659
context->dump_image = &image_out_table[0];
660-
dump_length = min(context->dump_image->length, SAHARA_READ_MAX_SIZE);
660+
dump_length = min_t(u64, context->dump_image->length, SAHARA_READ_MAX_SIZE);
661661
/* Avoid requesting EOI sized data so that we can identify errors */
662662
if (dump_length == SAHARA_END_OF_IMAGE_LENGTH)
663663
dump_length = SAHARA_END_OF_IMAGE_LENGTH / 2;
@@ -705,7 +705,7 @@ static void sahara_parse_dump_image(struct sahara_context *context)
705705

706706
/* Get next image chunk */
707707
dump_length = context->dump_image->length - context->dump_image_offset;
708-
dump_length = min(dump_length, SAHARA_READ_MAX_SIZE);
708+
dump_length = min_t(u64, dump_length, SAHARA_READ_MAX_SIZE);
709709
/* Avoid requesting EOI sized data so that we can identify errors */
710710
if (dump_length == SAHARA_END_OF_IMAGE_LENGTH)
711711
dump_length = SAHARA_END_OF_IMAGE_LENGTH / 2;

0 commit comments

Comments
 (0)