Linux Media Controller development
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Qasim Ijaz <qasdev00@gmail.com>,
	linux-media@vger.kernel.org,
	Benjamin Mugnier <benjamin.mugnier@foss.st.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Sylvain Petinot <sylvain.petinot@foss.st.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: i2c: Replace nested min() with single min3()
Date: Tue, 25 Feb 2025 17:34:21 +0100	[thread overview]
Message-ID: <ef3f1c7e-30d8-4cdd-b07a-41162adf245d@web.de> (raw)
In-Reply-To: <20250225125937.20413-1-qasdev00@gmail.com>

…
> +++ b/drivers/media/i2c/vgxy61.c
> @@ -892,8 +892,8 @@ static u32 vgxy61_get_expo_long_max(struct vgxy61_dev *sensor,
>  	third_rot_max_expo = (sensor->frame_length / 71) * short_expo_ratio;
>
>  	/* Take the minimum from all rules */
> -	return min(min(first_rot_max_expo, second_rot_max_expo),
> -		   third_rot_max_expo);
> +	return min3(first_rot_max_expo, second_rot_max_expo,
> +		    third_rot_max_expo);
…

Can the following source code variant be applied?

+	return min3(first_rot_max_expo, second_rot_max_expo, third_rot_max_expo);


Regards,
Markus

  reply	other threads:[~2025-02-25 16:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25 12:59 [PATCH] media: i2c: Replace nested min() with single min3() Qasim Ijaz
2025-02-25 16:34 ` Markus Elfring [this message]
2025-02-26 13:03 ` Sakari Ailus

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=ef3f1c7e-30d8-4cdd-b07a-41162adf245d@web.de \
    --to=markus.elfring@web.de \
    --cc=benjamin.mugnier@foss.st.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=qasdev00@gmail.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sylvain.petinot@foss.st.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