From: Richard Knutsson <ricknu-0@student.ltu.se>
To: WANG Cong <xiyou.wangcong@gmail.com>
Cc: mchehab@infradead.org, v4l-dvb-maintainer@linuxtv.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] [VIDEO]: Complement va_start() with va_end() + style fixes
Date: Tue, 27 Nov 2007 10:21:27 +0100 [thread overview]
Message-ID: <474BE197.9060402@student.ltu.se> (raw)
In-Reply-To: <20071127090101.GA2626@hacking>
Complement va_start() with va_end() + minor style fixes in the same function.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Compile-tested on i386 with allyesconfig and allmodconfig.
Thanks to WANG Cong for pointing out the missing 'style fix'-description.
saa5246a.c | 10 ++++++----
saa5249.c | 8 +++++---
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c
index ad02329..996b494 100644
--- a/drivers/media/video/saa5246a.c
+++ b/drivers/media/video/saa5246a.c
@@ -187,12 +187,14 @@ static int i2c_senddata(struct saa5246a_device *t, ...)
{
unsigned char buf[64];
int v;
- int ct=0;
+ int ct = 0;
va_list argp;
- va_start(argp,t);
+ va_start(argp, t);
- while((v=va_arg(argp,int))!=-1)
- buf[ct++]=v;
+ while ((v = va_arg(argp, int)) != -1)
+ buf[ct++] = v;
+
+ va_end(argp);
return i2c_sendbuf(t, buf[0], ct-1, buf+1);
}
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c
index 94bb59a..da5ca30 100644
--- a/drivers/media/video/saa5249.c
+++ b/drivers/media/video/saa5249.c
@@ -282,12 +282,14 @@ static int i2c_senddata(struct saa5249_device *t, ...)
{
unsigned char buf[64];
int v;
- int ct=0;
+ int ct = 0;
va_list argp;
va_start(argp,t);
- while((v=va_arg(argp,int))!=-1)
- buf[ct++]=v;
+ while ((v = va_arg(argp, int)) != -1)
+ buf[ct++] = v;
+
+ va_end(argp);
return i2c_sendbuf(t, buf[0], ct-1, buf+1);
}
next prev parent reply other threads:[~2007-11-27 9:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 7:06 [PATCH] [VIDEO]: Complement va_start() with va_end() Richard Knutsson
2007-11-27 9:01 ` WANG Cong
2007-11-27 9:21 ` Richard Knutsson [this message]
2007-11-27 9:52 ` [PATCH] [VIDEO]: Complement va_start() with va_end() + style fixes Richard Knutsson
-- strict thread matches above, loose matches on Subject: below --
2007-11-27 9:59 Richard Knutsson
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=474BE197.9060402@student.ltu.se \
--to=ricknu-0@student.ltu.se \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=v4l-dvb-maintainer@linuxtv.org \
--cc=xiyou.wangcong@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