From: Dan Carpenter <error27@gmail.com>
To: linux-media@vger.kernel.org
Cc: Matthias Schwarzott <zzam@gentoo.de>,
Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: weird array index in zl10036.c
Date: Sun, 27 Dec 2009 15:15:29 +0200 [thread overview]
Message-ID: <20091227131529.GJ6075@bicker> (raw)
drivers/media/dvb/frontends/zl10036.c
397 /* could also be one block from reg 2 to 13 and additional 10/11 */
398 u8 zl10036_init_tab[][2] = {
399 { 0x04, 0x00 }, /* 2/3: div=0x400 - arbitrary value */
400 { 0x8b, _RDIV_REG }, /* 4/5: rfg=0 ba=1 bg=1 len=? */
401 /* p0=0 c=0 r=_RDIV_REG */
402 { 0xc0, 0x20 }, /* 6/7: rsd=0 bf=0x10 */
403 { 0xd3, 0x40 }, /* 8/9: from datasheet */
404 { 0xe3, 0x5b }, /* 10/11: lock window level */
405 { 0xf0, 0x28 }, /* 12/13: br=0xa clr=0 tl=0*/
406 { 0xe3, 0xf9 }, /* 10/11: unlock window level */
407 };
408
409 /* invalid values to trigger writing */
410 state->br = 0xff;
411 state->bf = 0xff;
412
413 if (!state->config->rf_loop_enable)
414 zl10036_init_tab[1][2] |= 0x01;
This seems like an off by one error. I think it maybe should say
zl10036_init_tab[1][1] |= 0x01;?
regards,
dan carpenter
next reply other threads:[~2009-12-27 13:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-27 13:15 Dan Carpenter [this message]
2009-12-27 17:02 ` weird array index in zl10036.c Matthias Schwarzott
2009-12-28 17:48 ` [patch] fix " Dan Carpenter
2009-12-29 10:08 ` Matthias Schwarzott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091227131529.GJ6075@bicker \
--to=error27@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=zzam@gentoo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox