RE: [tpmdd-devel] [PATCH] char/tpm: Convert struct i2c_msg initialization to C99 format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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@xxxxxxx>  for automating the conversion

Looks good to me,
Reviewed-by: Peter Huewe <peter.huewe@xxxxxxxxxxxx>

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.

Thanks,
Peter

--
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


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux