From: zuoqilin1@163.com
To: mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
zuoqilin <zuoqilin@yulong.com>
Subject: [PATCH] drivers: media: Simplify the return expression of interpolate_value()
Date: Mon, 24 May 2021 20:47:54 +0800 [thread overview]
Message-ID: <20210524124754.1491-1-zuoqilin1@163.com> (raw)
From: zuoqilin <zuoqilin@yulong.com>
Simplify the return expression.
Signed-off-by: zuoqilin <zuoqilin@yulong.com>
---
drivers/media/dvb-frontends/mb86a20s.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c
index a7faf0c..fc80391 100644
--- a/drivers/media/dvb-frontends/mb86a20s.c
+++ b/drivers/media/dvb-frontends/mb86a20s.c
@@ -1346,7 +1346,7 @@ static u32 interpolate_value(u32 value, const struct linear_segments *segments,
{
u64 tmp64;
u32 dx, dy;
- int i, ret;
+ int i;
if (value >= segments[0].x)
return segments[0].y;
@@ -1367,9 +1367,7 @@ static u32 interpolate_value(u32 value, const struct linear_segments *segments,
tmp64 = value - segments[i].x;
tmp64 *= dy;
do_div(tmp64, dx);
- ret = segments[i].y - tmp64;
-
- return ret;
+ return segments[i].y - tmp64;
}
static int mb86a20s_get_main_CNR(struct dvb_frontend *fe)
--
1.9.1
next reply other threads:[~2021-05-24 12:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 12:47 zuoqilin1 [this message]
2021-05-26 10:06 ` [PATCH] drivers: media: Simplify the return expression of interpolate_value() Hans Verkuil
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=20210524124754.1491-1-zuoqilin1@163.com \
--to=zuoqilin1@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=zuoqilin@yulong.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;
as well as URLs for NNTP newsgroup(s).