From: Jean Delvare <jdelvare-l3A5Bk7waGM@public.gmane.org>
To: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Cc: Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] i2c-dev: Fix typo in ioctl name reference
Date: Thu, 10 Sep 2015 23:30:36 +0200 [thread overview]
Message-ID: <20150910233036.0d2c9f35@endymion.delvare> (raw)
In-Reply-To: <20150910180012.GA2893@katana>
On Thu, 10 Sep 2015 20:00:12 +0200, Wolfram Sang wrote:
> On Tue, Sep 08, 2015 at 11:05:49AM +0200, Jean Delvare wrote:
> > The ioctl is named I2C_RDWR for "I2C read/write". But references to it
> > were misspelled "rdrw". Fix them.
> >
> > Signed-off-by: Jean Delvare <jdelvare-l3A5Bk7waGM@public.gmane.org>
> > Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
>
> Wow! Amazing how long this went unnoticed/unfixed.
Indeed :/
I don't think this constant was much (or ever) used in user-space
before i2ctransfer. That would be why.
> > -#define I2C_RDRW_IOCTL_MAX_MSGS 42
> > +#define I2C_RDWR_IOCTL_MAX_MSGS 42
> > +/* Originally defined with a typo, keep if for now for compatibility */
>
> I would drop the 'for now' and keep it forever. A define doesn't hurt
> and if it increases backwards compatibility, why not? I will also do
> s/if/it/. No need to resend.
Sorry for the typo and thanks for catching it. "for now" or not is up
to you, my idea was that it probably wasn't used in user-space yet so
getting rid of it shouldn't hurt, while keeping it would encourage
people to use the wrong one instead of the good one. So on second
thought a better strategy may be to NOT keep the compatibility in the
first place.
It's not an ABI change anyway, and it's a minor thing really. Nobody is
ever going to hit this limit in practice, and if one does and did not
check beforehand, he/she will simply get -EINVAL from ioctl(), which
can be reported to the user just the same. IMHO I2C_RDWR_IOCTL_MAX_MSGS
should not have been made visible from user-space in the first place.
> > +#define I2C_RDRW_IOCTL_MAX_MSGS I2C_RDWR_IOCTL_MAX_MSGS
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2015-09-10 21:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-08 9:05 [PATCH] i2c-dev: Fix typo in ioctl name reference Jean Delvare
[not found] ` <20150908110549.411e99a8-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2015-09-10 18:00 ` Wolfram Sang
2015-09-10 21:30 ` Jean Delvare [this message]
2015-10-23 21:25 ` Wolfram Sang
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=20150910233036.0d2c9f35@endymion.delvare \
--to=jdelvare-l3a5bk7wagm@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@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).