From: Thomas Mair <thomas.mair86@googlemail.com>
To: Hans-Frieder Vogt <hfvogt@gmx.net>
Cc: linux-media@vger.kernel.org, thomas.mair86@gmail.com
Subject: Re: [PATCH] rtl2832.c: minor cleanup
Date: Mon, 23 Jul 2012 21:49:40 +0200 [thread overview]
Message-ID: <500DAAD4.6040008@googlemail.com> (raw)
In-Reply-To: <201207151956.47423.hfvogt@gmx.net>
On 15.07.2012 19:56, Hans-Frieder Vogt wrote:
> 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.
You are right. It makes the code more readeable.
>
> Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
>
> 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
>
prev parent reply other threads:[~2012-07-23 19:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-15 17:56 [PATCH] rtl2832.c: minor cleanup Hans-Frieder Vogt
2012-07-23 19:49 ` Thomas Mair [this message]
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=500DAAD4.6040008@googlemail.com \
--to=thomas.mair86@googlemail.com \
--cc=hfvogt@gmx.net \
--cc=linux-media@vger.kernel.org \
--cc=thomas.mair86@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).