* [PATCH] [media] dvb-frontends: remove self assignments
@ 2017-12-18 17:14 Nick Desaulniers
2017-12-22 19:02 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 2+ messages in thread
From: Nick Desaulniers @ 2017-12-18 17:14 UTC (permalink / raw)
Cc: Nick Desaulniers, Mauro Carvalho Chehab, Hans Verkuil,
Colin Ian King, Markus Elfring, Sakari Ailus, linux-media,
linux-kernel
These were leftover from:
commit 469ffe083665 ("[media] tda18271c2dd: Remove the CHK_ERROR macro")
and
commit 58d5eaec9f87 ("[media] drxd: Don't use a macro for CHK_ERROR ...")
that programmatically removed the CHK_ERROR macro, which left behind a
few self assignments that Clang warns about. These instances aren't
errors.
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
drivers/media/dvb-frontends/drxd_hard.c | 3 ---
drivers/media/dvb-frontends/tda18271c2dd.c | 1 -
2 files changed, 4 deletions(-)
diff --git a/drivers/media/dvb-frontends/drxd_hard.c b/drivers/media/dvb-frontends/drxd_hard.c
index 0696bc62dcc9..ff18a0f7dc41 100644
--- a/drivers/media/dvb-frontends/drxd_hard.c
+++ b/drivers/media/dvb-frontends/drxd_hard.c
@@ -2140,7 +2140,6 @@ static int DRX_Start(struct drxd_state *state, s32 off)
}
break;
}
- status = status;
if (status < 0)
break;
@@ -2251,7 +2250,6 @@ static int DRX_Start(struct drxd_state *state, s32 off)
break;
}
- status = status;
if (status < 0)
break;
@@ -2318,7 +2316,6 @@ static int DRX_Start(struct drxd_state *state, s32 off)
}
break;
}
- status = status;
if (status < 0)
break;
diff --git a/drivers/media/dvb-frontends/tda18271c2dd.c b/drivers/media/dvb-frontends/tda18271c2dd.c
index 2d2778be2d2f..45cd5ba0cf8a 100644
--- a/drivers/media/dvb-frontends/tda18271c2dd.c
+++ b/drivers/media/dvb-frontends/tda18271c2dd.c
@@ -674,7 +674,6 @@ static int PowerScan(struct tda_state *state,
Count = 200000;
wait = true;
}
- status = status;
if (status < 0)
break;
if (CID_Gain >= CID_Target) {
--
2.15.1.504.g5279b80103-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [media] dvb-frontends: remove self assignments
2017-12-18 17:14 [PATCH] [media] dvb-frontends: remove self assignments Nick Desaulniers
@ 2017-12-22 19:02 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2017-12-22 19:02 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Hans Verkuil, Colin Ian King, Markus Elfring, Sakari Ailus,
linux-media, linux-kernel
Em Mon, 18 Dec 2017 09:14:50 -0800
Nick Desaulniers <ndesaulniers@google.com> escreveu:
> These were leftover from:
> commit 469ffe083665 ("[media] tda18271c2dd: Remove the CHK_ERROR macro")
> and
> commit 58d5eaec9f87 ("[media] drxd: Don't use a macro for CHK_ERROR ...")
> that programmatically removed the CHK_ERROR macro, which left behind a
> few self assignments that Clang warns about. These instances aren't
> errors.
>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Thanks for the patch, but a similar one was already merged:
commit 2ddc125de832f4d8e1820dc923cb2029170beea0
Author: Colin Ian King <colin.king@canonical.com>
Date: Thu Nov 23 05:19:19 2017 -0500
media: dvb_frontend: remove redundant status self assignment
The assignment status to itself is redundant and can be removed.
Detected with Coccinelle.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
> drivers/media/dvb-frontends/drxd_hard.c | 3 ---
> drivers/media/dvb-frontends/tda18271c2dd.c | 1 -
> 2 files changed, 4 deletions(-)
>
> diff --git a/drivers/media/dvb-frontends/drxd_hard.c b/drivers/media/dvb-frontends/drxd_hard.c
> index 0696bc62dcc9..ff18a0f7dc41 100644
> --- a/drivers/media/dvb-frontends/drxd_hard.c
> +++ b/drivers/media/dvb-frontends/drxd_hard.c
> @@ -2140,7 +2140,6 @@ static int DRX_Start(struct drxd_state *state, s32 off)
> }
> break;
> }
> - status = status;
> if (status < 0)
> break;
>
> @@ -2251,7 +2250,6 @@ static int DRX_Start(struct drxd_state *state, s32 off)
> break;
>
> }
> - status = status;
> if (status < 0)
> break;
>
> @@ -2318,7 +2316,6 @@ static int DRX_Start(struct drxd_state *state, s32 off)
> }
> break;
> }
> - status = status;
> if (status < 0)
> break;
>
> diff --git a/drivers/media/dvb-frontends/tda18271c2dd.c b/drivers/media/dvb-frontends/tda18271c2dd.c
> index 2d2778be2d2f..45cd5ba0cf8a 100644
> --- a/drivers/media/dvb-frontends/tda18271c2dd.c
> +++ b/drivers/media/dvb-frontends/tda18271c2dd.c
> @@ -674,7 +674,6 @@ static int PowerScan(struct tda_state *state,
> Count = 200000;
> wait = true;
> }
> - status = status;
> if (status < 0)
> break;
> if (CID_Gain >= CID_Target) {
Thanks,
Mauro
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-22 19:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-18 17:14 [PATCH] [media] dvb-frontends: remove self assignments Nick Desaulniers
2017-12-22 19:02 ` Mauro Carvalho Chehab
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).