lkml.org 
[lkml]   [2022]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [EXT] Re: [PATCH v5 2/2] misc: nxp-sr1xx: UWB driver support for sr1xx series chip
From

On 9/14/2022 8:25 PM, Greg KH wrote:
> Caution: EXT Email
>
> On Wed, Sep 14, 2022 at 07:59:44PM +0530, Manjunatha Venkatesh wrote:
>> +/**
>> + * sr1xx_dev_transceive
>> + * @op_mode indicates write/read operation
>> + *
>> + * Write and Read logic implemented under same api with
>> + * mutex lock protection so write and read synchronized
>> + *
>> + * During Uwb ranging sequence(read) need to block write sequence
>> + * in order to avoid some race condition scenarios.
>> + *
>> + * Returns : Number of bytes write/read if read is success else (-1)
> I'm sure I mentioned this before, but NEVER use magic "-1" as an error
> value. Use the real in-kernel -ERROR numbers for error codes please.
> This needs to be fixed in many places in this code.
Will fix this in the next patch submission.
> thanks,
>
> greg k-h

\
 
 \ /
  Last update: 2022-10-07 16:20    [W:0.137 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site