From f27d011f67d5e00ead196b0fcc2585537c2f2380 Mon Sep 17 00:00:00 2001 From: Manu Abraham Date: Thu, 4 Sep 2008 14:18:08 +0200 Subject: [PATCH] DVB Code review: explicitly display offending parameters Code review #1 Explicitly display the offending parameters, while doing parameter conversion. Thanks to Oliver Endriss for the code review From: Manu Abraham Signed-off-by: Manu Abraham diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index e6ae5e6..037199a 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -224,7 +224,7 @@ static int newfec_to_oldfec(enum dvbfe_fec new_fec, enum fe_code_rate *old_fec) *old_fec = FEC_AUTO; break; default: - printk("%s: Unsupported FEC\n", __func__); + printk("%s: Unsupported FEC %x\n", __func__, new_fec); return -EINVAL; } @@ -265,7 +265,7 @@ static int oldfec_to_newfec(enum fe_code_rate old_fec, enum dvbfe_fec *new_fec) *new_fec = DVBFE_FEC_AUTO; break; default: - printk("%s: Unsupported FEC\n", __func__); + printk("%s: Unsupported FEC %x\n", __func__, old_fec); return -EINVAL; } @@ -303,7 +303,7 @@ static int newmod_to_oldmod(enum dvbfe_modulation new_mod, enum fe_modulation *o *old_mod = VSB_16; break; default: - printk("%s: Unsupported Modulation\n", __func__); + printk("%s: Unsupported Modulation %x\n", __func__, new_mod); return -EINVAL; } @@ -341,7 +341,7 @@ static int oldmod_to_newmod(enum fe_modulation old_mod, enum dvbfe_modulation *n *new_mod = DVBFE_MOD_VSB16; break; default: - printk("%s: Unsupported Modulation\n", __func__); + printk("%s: Unsupported Modulation %x\n", __func__, old_mod); return -EINVAL; } @@ -390,7 +390,7 @@ int newapi_to_olddrv(struct dvbfe_params *params, ofdm->bandwidth = BANDWIDTH_AUTO; break; default: - dprintk("%s: Unsupported bandwidth\n", __func__); + dprintk("%s: Unsupported bandwidth %x\n", __func__, dvbt->bandwidth); return -EINVAL; } newfec_to_oldfec(dvbt->code_rate_HP, &ofdm->code_rate_HP); @@ -407,7 +407,7 @@ int newapi_to_olddrv(struct dvbfe_params *params, ofdm->transmission_mode = TRANSMISSION_MODE_AUTO; break; default: - dprintk("%s: Unsupported transmission mode\n", __func__); + dprintk("%s: Unsupported transmission mode %x\n", __func__, dvbt->bandwidth); return -EINVAL; } switch (dvbt->guard_interval) { @@ -452,7 +452,7 @@ int newapi_to_olddrv(struct dvbfe_params *params, newmod_to_oldmod(atsc->modulation, &vsb->modulation); break; default: - dprintk("%s: Unsupported delivery system\n", __func__); + dprintk("%s: Unsupported delivery system %x\n", __func__, delsys); return -EINVAL; break; } @@ -558,7 +558,7 @@ int olddrv_to_newapi(struct dvb_frontend *fe, newmod_to_oldmod(atsc->modulation, &vsb->modulation); break; default: - dprintk("%s: Unsupported delivery system\n", __func__); + dprintk("%s: Unsupported delivery system %x\n", __func__, fe_type); return -EINVAL; break; }