Re: [PATCH 09/10] rc-core: lirc use unsigned int

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

 



On Wed, 04 May 2011 12:23:03 -0300, Mauro Carvalho Chehab
<mchehab@xxxxxxxxxx> wrote:
> Em 28-04-2011 12:13, David HÃrdeman escreveu:
>> Durations can never be negative, so it makes sense to consistently use
>> unsigned int for LIRC transmission. Contrary to the initial impression,
>> this shouldn't actually change the userspace API.
> 
> Patch looked ok to me (except for one small issue - see bellow). 
> 
...
>> diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
>> index 569b07b..2b1d2df 100644
>> --- a/drivers/media/rc/ene_ir.c
>> +++ b/drivers/media/rc/ene_ir.c
>> @@ -953,13 +953,13 @@ static void ene_set_idle(struct rc_dev *rdev,
bool
>> idle)
>>  }
>>  
>>  /* outside interface: transmit */
>> -static int ene_transmit(struct rc_dev *rdev, int *buf, u32 n)
>> +static int ene_transmit(struct rc_dev *rdev, unsigned *buf, unsigned
n)
>>  {
>>  	struct ene_device *dev = rdev->priv;
>>  	unsigned long flags;
>>  
>>  	dev->tx_buffer = buf;
>> -	dev->tx_len = n / sizeof(int);
>> +	dev->tx_len = n;
> 
> That hunk seems wrong to me. Or is it a bug fix that you're solving?

My fault, I didn't mention in the patch description that the third
argument of the tx function is also changed to mean array size rather
than size in number of bytes.

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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux