2005-03-23 15:29:58

by Corey Minyard

[permalink] [raw]
Subject: [PATCH] I2C Part 1 - Remove some redundancy from the i2c-core.c file

This is a series of patches to add a non-blocking interface to the I2C
driver. Hopefully it is broken into small enough functional changes.
I'm not posting the whole series right now, just the first few.


Attachments:
i2c_remove_redundant_check.diff (2.99 kB)

2005-03-23 21:44:15

by Jean Delvare

[permalink] [raw]
Subject: Re: [PATCH] I2C Part 1 - Remove some redundancy from the i2c-core.c file

Hi Corey,

> Call i2c_transfer() from i2c_master_send() and i2c_master_recv()
> to avoid the redundant code that was in all three functions.

I like this. You're right, there is code duplication here, which we can
get rid of, so let's do so. I'd only have one comments about your patch:

You can get rid of the dev_dbg calls in i2c_master_send() and
i2c_master_recv() altogether IMHO. I recently updated i2c_transfer() to
make it more verbose in debug mode [1], so the debug messages in
i2c_master_send() and i2c_master_recv() are mostly redundant now as far
as I can see.

[1] http://archives.andrew.net.au/lm-sensors/msg29859.html

Thanks,
--
Jean Delvare

2005-03-31 22:04:18

by Corey Minyard

[permalink] [raw]
Subject: Re: [PATCH] I2C Part 1 - Remove some redundancy from the i2c-core.c file

Ok, I have taken some time from suffering (packaging perl modules) to
get back to this.

Here's a new patch with the debug calls removed, as you requested.

Thanks,

-Corey

Jean Delvare wrote:

>Hi Corey,
>
>
>
>>Call i2c_transfer() from i2c_master_send() and i2c_master_recv()
>>to avoid the redundant code that was in all three functions.
>>
>>
>
>I like this. You're right, there is code duplication here, which we can
>get rid of, so let's do so. I'd only have one comments about your patch:
>
>You can get rid of the dev_dbg calls in i2c_master_send() and
>i2c_master_recv() altogether IMHO. I recently updated i2c_transfer() to
>make it more verbose in debug mode [1], so the debug messages in
>i2c_master_send() and i2c_master_recv() are mostly redundant now as far
>as I can see.
>
>[1] http://archives.andrew.net.au/lm-sensors/msg29859.html
>
>Thanks,
>
>


Attachments:
i2c_remove_redundant_check.diff (2.80 kB)