+Cc: David

On Wed, Oct 15, 2025 at 05:37:15PM +0200, Youssef Samir wrote:
> 
> Use min_t() instead of min() to resolve compiler warnings for mismatched
> types.

I believe it's the opposite to what has to be done here.
At first glance it should be umin(), but I Cc'ed David
who is the expert in this topic.

> --- a/drivers/accel/qaic/sahara.c
> +++ b/drivers/accel/qaic/sahara.c
> @@ -615,7 +615,7 @@ static void sahara_parse_dump_table(struct sahara_context 
> *context)
>  
>       /* Request the first chunk of the first image */
>       context->dump_image = &image_out_table[0];
> -     dump_length = min(context->dump_image->length, SAHARA_READ_MAX_SIZE);
> +     dump_length = min_t(u64, context->dump_image->length, 
> SAHARA_READ_MAX_SIZE);
>       /* Avoid requesting EOI sized data so that we can identify errors */
>       if (dump_length == SAHARA_END_OF_IMAGE_LENGTH)
>               dump_length = SAHARA_END_OF_IMAGE_LENGTH / 2;
> @@ -663,7 +663,7 @@ static void sahara_parse_dump_image(struct sahara_context 
> *context)
>  
>       /* Get next image chunk */
>       dump_length = context->dump_image->length - context->dump_image_offset;
> -     dump_length = min(dump_length, SAHARA_READ_MAX_SIZE);
> +     dump_length = min_t(u64, dump_length, SAHARA_READ_MAX_SIZE);
>       /* Avoid requesting EOI sized data so that we can identify errors */
>       if (dump_length == SAHARA_END_OF_IMAGE_LENGTH)
>               dump_length = SAHARA_END_OF_IMAGE_LENGTH / 2;

-- 
With Best Regards,
Andy Shevchenko


Reply via email to