* [PATCH][media-next] media: dvb-frontends/stv0910: make various local variables static
@ 2017-07-21 11:06 Colin King
2017-07-22 10:59 ` Daniel Scheller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-07-21 11:06 UTC (permalink / raw)
To: Daniel Scheller, Mauro Carvalho Chehab, linux-media
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The list stvlist and arrays padc_lookup, s1_sn_lookup and s2_sn_lookup
do not need to be in global scope, so make them all static.
Cleans up a bunch of smatch warnings:
symbol 'padc_lookup' was not declared. Should it be static?
symbol 's1_sn_lookup' was not declared. Should it be static?
symbol 's2_sn_lookup' was not declared. Should it be static?
symbol 'stvlist' was not declared. Should it be static?
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/media/dvb-frontends/stv0910.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c
index 7e8a460449c5..bae1da3fdb2d 100644
--- a/drivers/media/dvb-frontends/stv0910.c
+++ b/drivers/media/dvb-frontends/stv0910.c
@@ -34,7 +34,7 @@
#define BER_SRC_S 0x20
#define BER_SRC_S2 0x20
-LIST_HEAD(stvlist);
+static LIST_HEAD(stvlist);
enum receive_mode { RCVMODE_NONE, RCVMODE_DVBS, RCVMODE_DVBS2, RCVMODE_AUTO };
@@ -207,7 +207,7 @@ static int write_shared_reg(struct stv *state, u16 reg, u8 mask, u8 val)
return status;
}
-struct slookup s1_sn_lookup[] = {
+static struct slookup s1_sn_lookup[] = {
{ 0, 9242 }, /*C/N= 0dB*/
{ 5, 9105 }, /*C/N=0.5dB*/
{ 10, 8950 }, /*C/N=1.0dB*/
@@ -264,7 +264,7 @@ struct slookup s1_sn_lookup[] = {
{ 510, 425 } /*C/N=51.0dB*/
};
-struct slookup s2_sn_lookup[] = {
+static struct slookup s2_sn_lookup[] = {
{ -30, 13950 }, /*C/N=-2.5dB*/
{ -25, 13580 }, /*C/N=-2.5dB*/
{ -20, 13150 }, /*C/N=-2.0dB*/
@@ -327,7 +327,7 @@ struct slookup s2_sn_lookup[] = {
{ 510, 463 }, /*C/N=51.0dB*/
};
-struct slookup padc_lookup[] = {
+static struct slookup padc_lookup[] = {
{ 0, 118000 }, /* PADC=+0dBm */
{ -100, 93600 }, /* PADC=-1dBm */
{ -200, 74500 }, /* PADC=-2dBm */
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][media-next] media: dvb-frontends/stv0910: make various local variables static
2017-07-21 11:06 [PATCH][media-next] media: dvb-frontends/stv0910: make various local variables static Colin King
@ 2017-07-22 10:59 ` Daniel Scheller
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Scheller @ 2017-07-22 10:59 UTC (permalink / raw)
To: Colin King
Cc: Mauro Carvalho Chehab, linux-media, kernel-janitors, linux-kernel
Am Fri, 21 Jul 2017 12:06:35 +0100
schrieb Colin King <colin.king@canonical.com>:
> From: Colin Ian King <colin.king@canonical.com>
>
> The list stvlist and arrays padc_lookup, s1_sn_lookup and s2_sn_lookup
> do not need to be in global scope, so make them all static.
>
> Cleans up a bunch of smatch warnings:
> symbol 'padc_lookup' was not declared. Should it be static?
> symbol 's1_sn_lookup' was not declared. Should it be static?
> symbol 's2_sn_lookup' was not declared. Should it be static?
> symbol 'stvlist' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks,
Acked-by: Daniel Scheller <d.scheller@gmx.net>
> ---
> drivers/media/dvb-frontends/stv0910.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/dvb-frontends/stv0910.c
> b/drivers/media/dvb-frontends/stv0910.c index
> 7e8a460449c5..bae1da3fdb2d 100644 ---
> a/drivers/media/dvb-frontends/stv0910.c +++
> b/drivers/media/dvb-frontends/stv0910.c @@ -34,7 +34,7 @@
> #define BER_SRC_S 0x20
> #define BER_SRC_S2 0x20
>
> -LIST_HEAD(stvlist);
> +static LIST_HEAD(stvlist);
>
> enum receive_mode { RCVMODE_NONE, RCVMODE_DVBS, RCVMODE_DVBS2,
> RCVMODE_AUTO };
> @@ -207,7 +207,7 @@ static int write_shared_reg(struct stv *state,
> u16 reg, u8 mask, u8 val) return status;
> }
>
> -struct slookup s1_sn_lookup[] = {
> +static struct slookup s1_sn_lookup[] = {
> { 0, 9242 }, /*C/N= 0dB*/
> { 5, 9105 }, /*C/N=0.5dB*/
> { 10, 8950 }, /*C/N=1.0dB*/
> @@ -264,7 +264,7 @@ struct slookup s1_sn_lookup[] = {
> { 510, 425 } /*C/N=51.0dB*/
> };
>
> -struct slookup s2_sn_lookup[] = {
> +static struct slookup s2_sn_lookup[] = {
> { -30, 13950 }, /*C/N=-2.5dB*/
> { -25, 13580 }, /*C/N=-2.5dB*/
> { -20, 13150 }, /*C/N=-2.0dB*/
> @@ -327,7 +327,7 @@ struct slookup s2_sn_lookup[] = {
> { 510, 463 }, /*C/N=51.0dB*/
> };
>
> -struct slookup padc_lookup[] = {
> +static struct slookup padc_lookup[] = {
> { 0, 118000 }, /* PADC=+0dBm */
> { -100, 93600 }, /* PADC=-1dBm */
> { -200, 74500 }, /* PADC=-2dBm */
Best regards,
Daniel Scheller
--
https://github.com/herrnst
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-22 10:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-21 11:06 [PATCH][media-next] media: dvb-frontends/stv0910: make various local variables static Colin King
2017-07-22 10:59 ` Daniel Scheller
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).