From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Peter.Huewe-d0qZbvYSIPpWk0Htik3J/w@public.gmane.org
Cc: shubhrajyoti-l0cyMroinI0@public.gmane.org,
tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
tpmdd-iBygD9l97zzQT0dZR+AlfA@public.gmane.org,
mail-ZlhrYzitvtWsTnJN9+BGXg@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
key-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Subject: Re: [tpmdd-devel] [PATCH] char/tpm: Convert struct i2c_msg initialization to C99 format
Date: Tue, 9 Oct 2012 18:32:08 +0200 [thread overview]
Message-ID: <20121009183208.56716682@endymion.delvare> (raw)
In-Reply-To: <74A44E99E3274B4CB570415926B37D440EC6CD-KSUqXBOclpKBCnxIfz/NYa7q7RIIQec8@public.gmane.org>
On Tue, 9 Oct 2012 16:07:18 +0000, Peter.Huewe-d0qZbvYSIPpWk0Htik3J/w@public.gmane.org wrote:
> > Convert the struct i2c_msg initialization to C99 format. This makes
> > maintaining and editing the code simpler. Also helps once other fields
> > like transferred are added in future.
>
> > Thanks to Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org> for automating the conversion
>
> Looks good to me,
> Reviewed-by: Peter Huewe <peter.huewe-d0qZbvYSIPpWk0Htik3J/w@public.gmane.org>
>
> BUT maybe we should probably wait for the outcome of the
> "introduce macros for i2c_msg initialization" discussion also by Julia:
> https://lkml.org/lkml/2012/10/7/92
> which would wrap this initialization into a macro:
>
> struct i2c_msg msg1 = I2C_MSG_WRITE(tpm_dev.client->addr, 1, &addr);
> struct i2c_msg msg2 I2C_MSG_READ(tpm_dev.client->addr, len, buffer);
> ...
> struct i2c_msg msg1 = I2C_MSG_WRITE(tpm_dev.client->addr, len + 1, tpm_dev.buf);
>
> When the discussion is settled I'd probably go directly to I2C_MSG_ macros in order to avoid a double conversion.
I thought about it, but actually I'd rather pick Shubhrajyoti's patches
first. We don't know where Julia's patch will be going at this point,
and other patches depend on the patches Shubhrajyoti sent, which I do
not want to delay. Julia's changes, if applied, will touch over 200
drivers anyway, so 4 more or less don't make any difference. I also
suspect that Julia's scripts won't catch the non-C99 initializations,
so she probably won't see them Shubhrajyoti's patches are applied -
that's one more reason to apply them immediately.
--
Jean Delvare
next prev parent reply other threads:[~2012-10-09 16:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 11:42 [PATCH] char/tpm: Convert struct i2c_msg initialization to C99 format Shubhrajyoti D
[not found] ` <1349782951-9175-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-10-09 16:07 ` [tpmdd-devel] " Peter.Huewe-d0qZbvYSIPpWk0Htik3J/w
[not found] ` <74A44E99E3274B4CB570415926B37D440EC6CD-KSUqXBOclpKBCnxIfz/NYa7q7RIIQec8@public.gmane.org>
2012-10-09 16:32 ` Jean Delvare [this message]
[not found] ` <20121009183208.56716682-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-10-09 16:59 ` Peter.Huewe-d0qZbvYSIPpWk0Htik3J/w
2012-10-10 9:06 ` Jean Delvare
[not found] ` <20121010110638.498f0a50-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-10-10 11:31 ` Shubhrajyoti Datta
[not found] ` <CAM=Q2cv2-85S7NoVEpcuCohQs=CFxKcyVdm62g4d5q7pJzcpXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-10 14:15 ` [tpmdd-devel] " Peter.Huewe-d0qZbvYSIPpWk0Htik3J/w
2012-12-10 16:54 ` Peter.Huewe-d0qZbvYSIPpWk0Htik3J/w
[not found] ` <74A44E99E3274B4CB570415926B37D44101A60-KSUqXBOclpKBCnxIfz/NYa7q7RIIQec8@public.gmane.org>
2012-12-10 22:09 ` Jean Delvare
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=20121009183208.56716682@endymion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=Peter.Huewe-d0qZbvYSIPpWk0Htik3J/w@public.gmane.org \
--cc=key-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mail-ZlhrYzitvtWsTnJN9+BGXg@public.gmane.org \
--cc=shubhrajyoti-l0cyMroinI0@public.gmane.org \
--cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=tpmdd-iBygD9l97zzQT0dZR+AlfA@public.gmane.org \
/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).