Jean Delvare wrote:
> Hi Troy,
>
> On Fri, 25 Apr 2008 09:58:11 -0700, Troy Kisky wrote:
>> Previously the dev_dbg only printed if no error.
>> Printing also on an error is more useful
>>
>> Signed-off-by: Troy Kisky <[EMAIL PROTECTED]>
>> Signed-off-by: Kevin Hilman <[EMAIL PROTECTED]>
>> ---
>> drivers/i2c/busses/i2c-davinci.c | 4 +---
>> 1 files changed, 1 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-davinci.c
>> b/drivers/i2c/busses/i2c-davinci.c
>> index 0e5a39c..318579b 100644
>> --- a/drivers/i2c/busses/i2c-davinci.c
>> +++ b/drivers/i2c/busses/i2c-davinci.c
>> @@ -345,12 +345,10 @@ i2c_davinci_xfer(struct i2c_adapter *adap, struct
>> i2c_msg msgs[], int num)
>>
>> for (i = 0; i < num; i++) {
>> ret = i2c_davinci_xfer_msg(adap, &msgs[i], (i == (num - 1)));
>> + dev_dbg(dev->dev, "%s ret: %d\n", __func__, ret);
>> if (ret < 0)
>> return ret;
>> }
>
> I would like to suggest an improvement. Right now, if a transaction has
> several messages, you will print as many debug lines. If several
> transactions happen in a row, all the lines in the logs will look
> alike, and you won't be able to differentiate the various transactions.
>
> I suggest the following:
>
> dev_dbg(dev->dev, "%s [%d/%d] ret: %d\n", __func__, i + 1, num,
> ret);
>
> So you know how many messages there are in every transaction. What do
> you think?
>
>> -
>> - dev_dbg(dev->dev, "%s:%d ret: %d\n", __func__, __LINE__, ret);
>> -
>> return num;
>> }
>>
>
>
Looks better to me.
Do you want to handle it, or me to send a patch?
Thanks
Troy
_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c