Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdf07b02 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] v4l/dvb: fix compiler warnings



media_build/v4l/stb6100.c: In function 'stb6100_read_reg':
media_build/v4l/stb6100.c:161:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
media_build/v4l/cx24110.c: In function 'cx24110_read_ucblocks':
media_build/v4l/cx24110.c:515:6: warning: variable 'lastbyer' set but not used [-Wunused-but-set-variable]
media_build/v4l/dib9000.c: In function 'dib9000_mbx_process':
media_build/v4l/dib9000.c:711:6: warning: variable 'tmp' set but not used [-Wunused-but-set-variable]
media_build/v4l/zl10353.c: In function 'zl10353_init':
media_build/v4l/zl10353.c:562:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
media_build/v4l/stv0297.c: In function 'stv0297_set_frontend':
media_build/v4l/stv0297.c:417:16: warning: variable 'starttime' set but not used [-Wunused-but-set-variable]
media_build/v4l/lgs8gxx.c: In function 'lgs8gxx_set_mode_manual':
media_build/v4l/lgs8gxx.c:265:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
media_build/v4l/af9013.c: In function 'af9013_statistics_work':
media_build/v4l/af9013.c:517:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
media_build/v4l/stv090x.c: In function 'stv090x_optimize_track':
media_build/v4l/stv090x.c:2845:23: warning: variable 'rolloff' set but not used [-Wunused-but-set-variable]
media_build/v4l/stv090x.c: In function 'stv090x_algo':
media_build/v4l/stv090x.c:3177:28: warning: variable 'no_signal' set but not used [-Wunused-but-set-variable]
media_build/v4l/it913x-fe.c: In function 'it913x_fe_read_ber':
media_build/v4l/it913x-fe.c:636:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
media_build/v4l/it913x-fe.c: In function 'it913x_fe_get_frontend':
media_build/v4l/it913x-fe.c:661:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
media_build/v4l/it913x-fe.c: In function 'it913x_fe_set_frontend':
media_build/v4l/it913x-fe.c:694:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
media_build/v4l/m88rs2000.c: In function 'm88rs2000_set_fec':
media_build/v4l/m88rs2000.c:657:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
media_build/v4l/dst_ca.c: In function 'ca_send_message':
media_build/v4l/dst_ca.c:480:15: warning: variable 'ca_message_header_len' set but not used [-Wunused-but-set-variable]
media_build/v4l/smssdio.c: In function 'smssdio_interrupt':
media_build/v4l/smssdio.c:117:11: warning: variable 'isr' set but not used [-Wunused-but-set-variable]

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8173090a
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -477,7 +477,6 @@ static int dst_check_ca_pmt(struct dst_state *state, struct ca_msg *p_ca_message
static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg)
{
	int i = 0;
	unsigned int ca_message_header_len;

	u32 command = 0;
	struct ca_msg *hw_buffer;
@@ -496,7 +495,6 @@ static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message,


	if (p_ca_message->msg) {
		ca_message_header_len = p_ca_message->length;	/*	Restore it back when you are done	*/
		/*	EN50221 tag	*/
		command = 0;

+5 −8
Original line number Diff line number Diff line
@@ -514,7 +514,6 @@ static int af9013_statistics_signal_strength(struct dvb_frontend *fe)

static void af9013_statistics_work(struct work_struct *work)
{
	int ret;
	struct af9013_state *state = container_of(work,
		struct af9013_state, statistics_work.work);
	unsigned int next_msec;
@@ -530,27 +529,27 @@ static void af9013_statistics_work(struct work_struct *work)
	default:
		state->statistics_step = 0;
	case 0:
		ret = af9013_statistics_signal_strength(&state->fe);
		af9013_statistics_signal_strength(&state->fe);
		state->statistics_step++;
		next_msec = 300;
		break;
	case 1:
		ret = af9013_statistics_snr_start(&state->fe);
		af9013_statistics_snr_start(&state->fe);
		state->statistics_step++;
		next_msec = 200;
		break;
	case 2:
		ret = af9013_statistics_ber_unc_start(&state->fe);
		af9013_statistics_ber_unc_start(&state->fe);
		state->statistics_step++;
		next_msec = 1000;
		break;
	case 3:
		ret = af9013_statistics_snr_result(&state->fe);
		af9013_statistics_snr_result(&state->fe);
		state->statistics_step++;
		next_msec = 400;
		break;
	case 4:
		ret = af9013_statistics_ber_unc_result(&state->fe);
		af9013_statistics_ber_unc_result(&state->fe);
		state->statistics_step++;
		next_msec = 100;
		break;
@@ -558,8 +557,6 @@ static void af9013_statistics_work(struct work_struct *work)

	schedule_delayed_work(&state->statistics_work,
		msecs_to_jiffies(next_msec));

	return;
}

static int af9013_get_tune_settings(struct dvb_frontend *fe,
+3 −4
Original line number Diff line number Diff line
@@ -512,12 +512,11 @@ static int cx24110_read_snr(struct dvb_frontend* fe, u16* snr)
static int cx24110_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
{
	struct cx24110_state *state = fe->demodulator_priv;
	u32 lastbyer;

	if(cx24110_readreg(state,0x10)&0x40) {
		/* the RS error counter has finished one counting window */
		cx24110_writereg(state,0x10,0x60); /* select the byer reg */
		lastbyer=cx24110_readreg(state,0x12)|
		cx24110_readreg(state, 0x12) |
			(cx24110_readreg(state, 0x13) << 8) |
			(cx24110_readreg(state, 0x14) << 16);
		cx24110_writereg(state,0x10,0x70); /* select the bler reg */
+1 −2
Original line number Diff line number Diff line
@@ -708,7 +708,6 @@ static u8 dib9000_mbx_count(struct dib9000_state *state, u8 risc_id, u16 attr)
static int dib9000_mbx_process(struct dib9000_state *state, u16 attr)
{
	int ret = 0;
	u16 tmp;

	if (!state->platform.risc.fw_is_running)
		return -1;
@@ -721,7 +720,7 @@ static int dib9000_mbx_process(struct dib9000_state *state, u16 attr)
	if (dib9000_mbx_count(state, 1, attr))	/* 1=RiscB */
		ret = dib9000_mbx_fetch_to_cache(state, attr);

	tmp = dib9000_read_word_attr(state, 1229, attr);	/* Clear the IRQ */
	dib9000_read_word_attr(state, 1229, attr);	/* Clear the IRQ */
/*      if (tmp) */
/*              dprintk( "cleared IRQ: %x", tmp); */
	DibReleaseLock(&state->platform.risc.mbx_lock);
+12 −14
Original line number Diff line number Diff line
@@ -633,10 +633,9 @@ static int it913x_fe_read_snr(struct dvb_frontend *fe, u16 *snr)
static int it913x_fe_read_ber(struct dvb_frontend *fe, u32 *ber)
{
	struct it913x_fe_state *state = fe->demodulator_priv;
	int ret;
	u8 reg[5];
	/* Read Aborted Packets and Pre-Viterbi error rate 5 bytes */
	ret = it913x_read_reg(state, RSD_ABORT_PKT_LSB, reg, sizeof(reg));
	it913x_read_reg(state, RSD_ABORT_PKT_LSB, reg, sizeof(reg));
	state->ucblocks += (u32)(reg[1] << 8) | reg[0];
	*ber = (u32)(reg[4] << 16) | (reg[3] << 8) | reg[2];
	return 0;
@@ -658,10 +657,9 @@ static int it913x_fe_get_frontend(struct dvb_frontend *fe)
{
	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
	struct it913x_fe_state *state = fe->demodulator_priv;
	int ret;
	u8 reg[8];

	ret = it913x_read_reg(state, REG_TPSD_TX_MODE, reg, sizeof(reg));
	it913x_read_reg(state, REG_TPSD_TX_MODE, reg, sizeof(reg));

	if (reg[3] < 3)
		p->modulation = fe_con[reg[3]];
@@ -691,25 +689,25 @@ static int it913x_fe_set_frontend(struct dvb_frontend *fe)
{
	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
	struct it913x_fe_state *state = fe->demodulator_priv;
	int ret, i;
	int i;
	u8 empty_ch, last_ch;

	state->it913x_status = 0;

	/* Set bw*/
	ret = it913x_fe_select_bw(state, p->bandwidth_hz,
	it913x_fe_select_bw(state, p->bandwidth_hz,
		state->adcFrequency);

	/* Training Mode Off */
	ret = it913x_write_reg(state, PRO_LINK, TRAINING_MODE, 0x0);
	it913x_write_reg(state, PRO_LINK, TRAINING_MODE, 0x0);

	/* Clear Empty Channel */
	ret = it913x_write_reg(state, PRO_DMOD, EMPTY_CHANNEL_STATUS, 0x0);
	it913x_write_reg(state, PRO_DMOD, EMPTY_CHANNEL_STATUS, 0x0);

	/* Clear bits */
	ret = it913x_write_reg(state, PRO_DMOD, MP2IF_SYNC_LK, 0x0);
	it913x_write_reg(state, PRO_DMOD, MP2IF_SYNC_LK, 0x0);
	/* LED on */
	ret = it913x_write_reg(state, PRO_LINK, GPIOH3_O, 0x1);
	it913x_write_reg(state, PRO_LINK, GPIOH3_O, 0x1);
	/* Select Band*/
	if ((p->frequency >= 51000000) && (p->frequency <= 230000000))
		i = 0;
@@ -720,7 +718,7 @@ static int it913x_fe_set_frontend(struct dvb_frontend *fe)
	else
		return -EOPNOTSUPP;

	ret = it913x_write_reg(state, PRO_DMOD, FREE_BAND, i);
	it913x_write_reg(state, PRO_DMOD, FREE_BAND, i);

	deb_info("Frontend Set Tuner Type %02x", state->tuner_type);
	switch (state->tuner_type) {
@@ -730,7 +728,7 @@ static int it913x_fe_set_frontend(struct dvb_frontend *fe)
	case IT9135_60:
	case IT9135_61:
	case IT9135_62:
		ret = it9137_set_tuner(state,
		it9137_set_tuner(state,
			p->bandwidth_hz, p->frequency);
		break;
	default:
@@ -742,9 +740,9 @@ static int it913x_fe_set_frontend(struct dvb_frontend *fe)
		break;
	}
	/* LED off */
	ret = it913x_write_reg(state, PRO_LINK, GPIOH3_O, 0x0);
	it913x_write_reg(state, PRO_LINK, GPIOH3_O, 0x0);
	/* Trigger ofsm */
	ret = it913x_write_reg(state, PRO_DMOD, TRIGGER_OFSM, 0x0);
	it913x_write_reg(state, PRO_DMOD, TRIGGER_OFSM, 0x0);
	last_ch = 2;
	for (i = 0; i < 40; ++i) {
		empty_ch = it913x_read_reg_u8(state, EMPTY_CHANNEL_STATUS);
Loading