* [PATCH] drivers: media: Simplify the return expression of interpolate_value()
@ 2021-05-24 12:47 zuoqilin1
2021-05-26 10:06 ` Hans Verkuil
0 siblings, 1 reply; 2+ messages in thread
From: zuoqilin1 @ 2021-05-24 12:47 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, linux-kernel, zuoqilin
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers: media: Simplify the return expression of interpolate_value()
2021-05-24 12:47 [PATCH] drivers: media: Simplify the return expression of interpolate_value() zuoqilin1
@ 2021-05-26 10:06 ` Hans Verkuil
0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2021-05-26 10:06 UTC (permalink / raw)
To: zuoqilin1, mchehab; +Cc: linux-media, linux-kernel, zuoqilin
Please include the driver you are changing in the subject line. I asked for that
before. Just saying 'drivers: media:' suggests it is a media-subsystem wide change.
Rejecting this and the other patch you posted on the same day with the same problem.
Regards,
Hans
On 24/05/2021 14:47, zuoqilin1@163.com wrote:
> 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)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-26 10:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 12:47 [PATCH] drivers: media: Simplify the return expression of interpolate_value() zuoqilin1
2021-05-26 10:06 ` Hans Verkuil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.