[PATCH] rtl2832.c: minor cleanup
- Subject: [PATCH] rtl2832.c: minor cleanup
- From: "Hans-Frieder Vogt" <hfvogt@xxxxxxx>
- Date: Sun, 15 Jul 2012 19:56:47 +0200
- User-agent: KMail/1.13.7 (Linux/3.5.0-rc7-a64; KDE/4.8.4; x86_64; ; )
The current formulation of the bw_params loop uses the counter j as an index for the first dimension of the
bw_params array which is later incremented by the variable i.
It is evaluated correctly only, because j is initialized to 0 at the beginning of the loop.
I think that explicitly using the index 0 better reflects the intent of the expression.
Signed-off-by: Hans-Frieder Vogt <hfvogt@xxxxxxx>
rtl2832.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/dvb/frontends/rtl2832.c 2012-07-06 05:45:16.000000000 +0200
+++ b/drivers/media/dvb/frontends/rtl2832.c 2012-07-15 19:05:28.428017449 +0200
@@ -589,7 +589,7 @@ static int rtl2832_set_frontend(struct d
return -EINVAL;
}
- for (j = 0; j < sizeof(bw_params[j]); j++) {
+ for (j = 0; j < sizeof(bw_params[0]); j++) {
ret = rtl2832_wr_regs(priv, 0x1c+j, 1, &bw_params[i][j], 1);
if (ret)
goto err;
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Input]
[Video for Linux]
[Mplayer Users]
[Linux USB Devel]
[Linux Audio Users]
[Photos]
[Yosemite Photos]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Yosemite Backpacking]