Re: [PATCH 1/3] iio: drop timestamp parameter in push_to_buffer() and store_to()

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

 



On 08/06/2012 10:19 AM, Peter Meerwald wrote:
> Hello,
> 
>> This commit message needs a explanation why they should be dropped.
> 
> thanks for looking at this!
> 
> the patch is moreless a reminder:
> http://www.spinics.net/lists/linux-iio/msg06102.html
> 
> the timestamp parameter should be dropped because it is not used; there 
> can be a timestamp channel and providing an additional timestamp when 
> pushing the buffer is confusing

I know that, you know that, but somebody going through the commit log in 6
months might not know that. But if it's not supposed to be the final commit
I guess it is OK.

> 
>> Also the drivers affected by this change should be updated by the patch itself,
>> not by follow-up patches. It is not good style to knowingly break drivers,
>> since it will break proper bisectabillity of the drivers.
> 
> I know; I split it up to clearly show what the fundamental change is, and 
> how it affects drivers -- for submission it should be one patch
> 

Btw. in case you did the removal by hand. This would have been the perfect
job for coccinelle:

@@
expression ns;
@@
 iio_push_to_buffer(...,
-ns
 )

@@
expression ns;
expression ops;
@@
 ops->store_to(...,
-ns
 )

- Lars


>>> Signed-off-by: Peter Meerwald <pmeerw@xxxxxxxxxx>
>>> ---
>>>  drivers/iio/industrialio-buffer.c |    5 ++---
>>>  include/linux/iio/buffer.h        |    6 ++----
>>>  2 files changed, 4 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
>>> index 4add9bb..243810a 100644
>>> --- a/drivers/iio/industrialio-buffer.c
>>> +++ b/drivers/iio/industrialio-buffer.c
>>> @@ -682,12 +682,11 @@ static unsigned char *iio_demux(struct iio_buffer *buffer,
>>>  	return buffer->demux_bounce;
>>>  }
>>>  
>>> -int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data,
>>> -		       s64 timestamp)
>>> +int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data)
>>>  {
>>>  	unsigned char *dataout = iio_demux(buffer, data);
>>>  
>>> -	return buffer->access->store_to(buffer, dataout, timestamp);
>>> +	return buffer->access->store_to(buffer, dataout);
>>>  }
>>>  EXPORT_SYMBOL_GPL(iio_push_to_buffer);
>>>  
>>> diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h
>>> index 8ba516f..c629b3a 100644
>>> --- a/include/linux/iio/buffer.h
>>> +++ b/include/linux/iio/buffer.h
>>> @@ -36,7 +36,7 @@ struct iio_buffer;
>>>   * any of them not existing.
>>>   **/
>>>  struct iio_buffer_access_funcs {
>>> -	int (*store_to)(struct iio_buffer *buffer, u8 *data, s64 timestamp);
>>> +	int (*store_to)(struct iio_buffer *buffer, u8 *data);
>>>  	int (*read_first_n)(struct iio_buffer *buffer,
>>>  			    size_t n,
>>>  			    char __user *buf);
>>> @@ -118,10 +118,8 @@ int iio_scan_mask_set(struct iio_dev *indio_dev,
>>>   * iio_push_to_buffer() - push to a registered buffer.
>>>   * @buffer:		IIO buffer structure for device
>>>   * @data:		the data to push to the buffer
>>> - * @timestamp:		timestamp to associate with the data
>>>   */
>>> -int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data,
>>> -		       s64 timestamp);
>>> +int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data);
>>>  
>>>  int iio_update_demux(struct iio_dev *indio_dev);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux