From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com>,
David Laight <david.laight.linux@gmail.com>
Cc: jeff.hugo@oss.qualcomm.com, carl.vanderlip@oss.qualcomm.com,
troy.hanson@oss.qualcomm.com, zachary.mckevitt@oss.qualcomm.com,
ogabbay@kernel.org, lizhi.hou@amd.com,
karol.wachowski@linux.intel.com, linux-arm-msm@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] accel/qaic: Fix mismatched types in min()
Date: Tue, 25 Nov 2025 21:07:11 +0100 [thread overview]
Message-ID: <aSYMb4EKFCaYrWTI@black.igk.intel.com> (raw)
In-Reply-To: <20251015153715.184143-1-youssef.abdulrahman@oss.qualcomm.com>
+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
next prev parent reply other threads:[~2025-11-25 20:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 15:37 [PATCH] accel/qaic: Fix mismatched types in min() Youssef Samir
2025-10-15 16:02 ` Carl Vanderlip
2025-10-15 16:44 ` Jeff Hugo
2025-10-17 15:14 ` Falkowski, Maciej
2025-10-20 14:41 ` Jeff Hugo
2025-11-25 20:07 ` Andy Shevchenko [this message]
2025-11-25 22:28 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aSYMb4EKFCaYrWTI@black.igk.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=carl.vanderlip@oss.qualcomm.com \
--cc=david.laight.linux@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=karol.wachowski@linux.intel.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=ogabbay@kernel.org \
--cc=troy.hanson@oss.qualcomm.com \
--cc=youssef.abdulrahman@oss.qualcomm.com \
--cc=zachary.mckevitt@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox