Re: [PATCH v5 2/2] iio: light: ROHM BH1745 colour sensor

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

 



On 25/06/2024 21:25, Mudit Sharma wrote:
> On 24/06/2024 23:27, Javier Carrasco wrote:
>>
>>> +static int bh1745_set_trigger_state(struct iio_trigger *trig, bool
>>> state)
>>> +{
>>> +    int ret;
>>
>> Why is value initialized here? If regmap returns an error, you will not
>> use value anyway. I caught my eye because it is initialized here, and
>> not in the other functions where you use the same pattern.
> 
> Hi Javier,
> 
> Thank you for the review on this.
> 
> 'value' is initialized here for case when we un-set the trigger. In that
> case, 'state' will be false and 'value' of 0 (default value for
> BH1745_INTR register) will be written.
> 

I missed that case. Thanks for clarifying.

By the way, it might be beneficial to wait a bit longer before sending a
new version to give more reviewers a chance to look at your series.

24 hours might be a bit too short, and your version count could easily
skyrocket if more reviewers get involved.

Best regards,
Javier Carrasco




[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