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@xxxxxxx> > > Cc: Wolfram Sang <wsa@xxxxxxxxxxxxx> > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html